protected void Page_Load(object sender, EventArgs e) { try { #region 初始化控制項 txtReg_No_Show = (TextBox)this.Master.Master.FindControl("myForm").FindControl("MainContent").FindControl("txtReg_No_Show"); txtId_No_Show = (TextBox)this.Master.Master.FindControl("myForm").FindControl("MainContent").FindControl("txtId_No_Show"); txtName_Show = (TextBox)this.Master.Master.FindControl("myForm").FindControl("MainContent").FindControl("txtName_Show"); ddlSex_Show = (DropDownList)this.Master.Master.FindControl("myForm").FindControl("MainContent").FindControl("ddlSex_Show"); txtBirth_Date_Show = (TextBox)this.Master.Master.FindControl("myForm").FindControl("MainContent").FindControl("txtBirth_Date_Show"); PublicLib.queryCodeFile(ddlReg_Type, "26", " And (item_code='A' Or item_code='1' Or item_code='9')"); PublicLib.queryCodeFile(ddlTime_Shift, "25", ""); PublicLib.queryCodeFile(ddl_Dep_No, "07", " And item_code='I9'"); PublicLib.queryCodeFile(ddlRoom_No, "36", " And item_code='HE'"); PublicLib.queryCodeFile(ddlCard_No, "99", ""); PublicLib.queryDscweek(ddlDoc_Code); txtOpd_Date.Text = DateTime.Now.ToString("yyyy/MM/dd"); //txtOpd_Date.Text = DateTime.Now.ToString("yyyy/MM/dd" + DateTime.Now.DayOfWeek.ToString("d")); #endregion GetPatientData(Request.QueryString["ID"].ToString()); GetOpd_Reg(Request.QueryString["ID"].ToString()); } catch (Exception ex) { PublicLib.handleError("", this.GetType().Name, ex.Message); } }