/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlDuringWaterName_SelectedIndexChanged(object sender, EventArgs e) { string sel = this.ddlDuringWaterName.SelectedValue; int dwid = int.Parse(sel); if (dwid != 0) { DuringWaterClass dw = DuringWaterFactory.CreateDuringWater(dwid); this.txtBegin.Text = dw.BeginString; this.txtEnd.Text = dw.EndString; } else { this.txtBegin.Text = "01-01"; this.txtEnd.Text = "12-31"; } }
// TODO: 2011-06-10 // // 1. valid begin and end date // 2. valid exist name // /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (IsEdit()) { int id = this.DuringID; DataTable tbl = DuringWaterDBI.GetDuringDataTable(id); DuringWaterClass d = DuringWaterFactory.CreateDuringWater(id); if (d != null) { this.txtName.Text = d.Name; this.txtBegin.Text = d.BeginString; this.txtEnd.Text = d.EndString; } } } }