chore: 首次簽入 Thinkyu ASP.NET 專案

- 加入 Visual Studio / ASP.NET .gitignore
- 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
2026-09-10 09:42:37 +08:00
commit 577060bc78
2496 changed files with 501389 additions and 0 deletions
@@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebLib;
namespace Education.Forms.
{
public partial class : FormBase
{
protected void Page_Load(object sender, EventArgs e)
{
FunctionName = "課程基本資料";
Form_View = FormView1;
Grid_View = GridView1;
FormView_DataSource = dsForm;
GridView_DataSource = dsGrid;
AddTabButton(MultiView1, View處理, tab處理);
AddTabButton(MultiView1, View查詢, tab查詢);
if (!IsPostBack)
{
ActivateTab(MultiView1, View處理);
}
else
{
Grid_View.DataBind();
Form_View.DataBind();
}
if (Form_View.CurrentMode != FormViewMode.ReadOnly)
{
Grid_View.Visible = false;
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
Grid_View.PageIndex = 0;
Grid_View.DataBind();
}
protected void btnClear_Click(object sender, EventArgs e)
{
txt訓練對象_Search.Text = "";
txt課程名稱_Search.Text = "";
txt課程編號_Search.Text = "";
ddl課程類別_Search.SelectedValue = "";
}
protected override void FormView_InsertDataBound(object sender, EventArgs e)
{
base.FormView_InsertDataBound(sender, e);
FindControl<ITextControl>(Form_View, "txt課程時數").Text = "0";
}
protected override void FormView_ItemDeleting(object sender, FormViewDeleteEventArgs e)
{
base.FormView_ItemDeleting(sender, e);
if (Dao課程.IsOccipued(DAC.GetString(e.Keys["課程編號"])))
{
ClientShowMessage("此課程已經選用過,不可刪除!");
e.Cancel = true;
}
}
protected override void GridView_DataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
base.GridView_DataSource_Selected(sender, e);
if (MultiView1.ActiveViewIndex == 0)
{
if (e.ReturnValue is List list && list.Count > 0)
ActivateTab(MultiView1, View處理);
else
lbMessage.Text = "找不到合乎條件的資料";
}
}
protected void dsForm_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao課程;
}
protected void dsGrid_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao課程;
}
protected void dsBCLS_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
{
e.ObjectInstance = Dao類別;
}
}
}