chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text;
|
||||
|
||||
/// <summary>
|
||||
/// 外部人員帳號設定
|
||||
/// </summary>
|
||||
public partial class forms_basedata_fmBPAP : Wellan.Web.UI.WUserControlBase
|
||||
{
|
||||
private BpapDAC bpabDao;
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//if (IsPostBack)
|
||||
// GridView1.DataBind();
|
||||
}
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
bpabDao = new BpapDAC(Query);
|
||||
dsBPZON.ConnectionString = ConnectionString;
|
||||
dsBPBRH.ConnectionString = ConnectionString;
|
||||
dsBPZON.SelectCommand = GetListSql("BCLSEDIT", "BSPAR='BCUSZON'");
|
||||
dsBPBRH.SelectCommand = GetListSql("BCLSEDIT", "BSPAR='BPSNBRH' AND SUBSTRING(BSCLS, LEN(BSCLS) - 1, 2) = '00'");
|
||||
}
|
||||
|
||||
protected void dsBPAP_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
|
||||
{
|
||||
e.ObjectInstance = bpabDao;
|
||||
}
|
||||
|
||||
protected void btnInsert_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsValid)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
bpabDao.InsertOne(txtBPNME.Text, txtBPEML.Text, ddlBPZON.SelectedValue, ddlBPBRH.SelectedValue, UserId);
|
||||
txtBPNME.Text = "";
|
||||
txtBPEML.Text = "";
|
||||
ddlBPZON.SelectedValue = "";
|
||||
ddlBPBRH.SelectedValue = "";
|
||||
GridView1.DataBind();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
cvMessage.IsValid = false;
|
||||
cvMessage.ErrorMessage = ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
//GridView_RowDataBound_Shrink_ViewState(sender, e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user