chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebLib;
|
||||
|
||||
namespace Education.Forms.課程企劃
|
||||
{
|
||||
public partial class ChangeDate : FormBase
|
||||
{
|
||||
private DAC_訓練課程內容 Dao課程內容;
|
||||
private int 課程ID;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
FunctionName = "訓練課程企劃書 >> 日期異動";
|
||||
Title = FunctionName;
|
||||
|
||||
Dao課程內容 = new DAC_訓練課程內容(conn);
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
hf課程ID.Value = Request["ID"];
|
||||
}
|
||||
else
|
||||
{
|
||||
gv課程內容.DataBind();
|
||||
}
|
||||
|
||||
課程ID = DAC.GetInt32(hf課程ID.Value);
|
||||
if (!IsPostBack)
|
||||
UpdateUI();
|
||||
|
||||
(Master as PopupForm).RefreshOpener = true;
|
||||
}
|
||||
|
||||
protected void UpdateUI()
|
||||
{
|
||||
訓練課程企劃 v1 = Dao訓練課程企劃.SelectOne(課程ID).FirstOrDefault();
|
||||
if (v1 != null)
|
||||
{
|
||||
lb課程企劃.Text = String.Format("[{0}] {1}", v1.顯示編號, v1.訓練名稱);
|
||||
txt訓練日期.Value = v1.訓練日期;
|
||||
txt訓練日期迄.Value = v1.訓練日期迄;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ds課程內容_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = Dao課程內容;
|
||||
}
|
||||
|
||||
protected string Get選定講師(object 訓練課程企劃編號, object 課程序號)
|
||||
{
|
||||
講師 d = GetData.取得選定講師(DAC.GetInt32(訓練課程企劃編號), DAC.GetInt32(課程序號));
|
||||
if (d.編號 == 0)
|
||||
return "";
|
||||
else
|
||||
return string.Format("[{0:0000}]<br>{1}", d.編號, d.姓名);
|
||||
}
|
||||
|
||||
protected void btnSaveMaster_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.IsValid)
|
||||
{
|
||||
訓練課程企劃 v1 = Dao訓練課程企劃.SelectOne(課程ID).FirstOrDefault();
|
||||
if (v1 != null)
|
||||
{
|
||||
v1.訓練日期 = txt訓練日期.Value.Value;
|
||||
v1.訓練日期迄 = txt訓練日期迄.Value.Value;
|
||||
Dao訓練課程企劃.UpdateOne(v1);
|
||||
|
||||
UpdateUI();
|
||||
|
||||
ClientShowMessage("訓練日期儲存成功!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user