using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using WebLib; namespace Education.Forms.基本資料 { public partial class 場地基本資料 : FormBase { private bool fileOK = false; private int 新編號; private string 圖檔儲存路徑; protected void Page_Load(object sender, EventArgs e) { FunctionName = "場地基本資料"; 圖檔儲存路徑 = Server.MapPath(Education.PublicVariable.場地照片路徑); Form_View = FormView1; Grid_View = GridView1; FormView_DataSource = dsForm; GridView_DataSource = dsGrid; AddTabButton(MultiView1, 0, btnSearchTab); AddTabButton(MultiView1, 1, btnProcessTab); if (!IsPostBack) { BindSearchDDL(); ActivateTab(MultiView1, 1); } else { Grid_View.DataBind(); Form_View.DataBind(); } if (Form_View.CurrentMode != FormViewMode.ReadOnly) { Grid_View.Visible = false; } } private void BindSearchDDL() { ddl場地地區.DataSource = Dao場地.Select地區ForDropDown(); ddl場地地區.DataTextField = "Name"; ddl場地地區.DataValueField = "Value"; ddl場地地區.DataBind(); ddl場地教室類型.DataSource = Dao場地.Select教室類型ForDropDown(); ddl場地教室類型.DataTextField = "Name"; ddl場地教室類型.DataValueField = "Value"; ddl場地教室類型.DataBind(); } protected override void CalcFields(object sender, ObjectDataSourceMethodEventArgs e) { base.CalcFields(sender, e); } protected override void FormView_ReadOnlyDataBound(object sender, EventArgs e) { base.FormView_ReadOnlyDataBound(sender, e); int 編號 = 0; Label lb編號 = FindControl