protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CheckSignIn(); if (Request.QueryString[SystemConstants.CouncilID] != null) { int councilID = Convert.ToInt32(Request.QueryString[SystemConstants.CouncilID]); var dac = new AdministrationDAC(); AdministrationEDSC.CouncilDTRow dr = null; if (councilID != 0) { dr = dac.RetrieveCouncil(councilID); CouncilSetupUC.Mode = SystemConstants.FormMode.Edit; CouncilSetupUC.SetDDL(); CouncilSetupUC.SetData(dr); } else { CouncilSetupUC.Mode = SystemConstants.FormMode.New; } } } }
public void SetData(AdministrationEDSC.CouncilDTRow dr) { hdnCouncilID.Value = dr.ID.ToString(); lblAddEditName.Text = dr.Name; txtAddEditName.Text = dr.Name; txtDesc.Text = dr.Description; lblDesc.Text = dr.Description; hdnCreatedDate.Value = dr.CreatedDatetime.ToString(); hdnCreatedBy.Value = dr.CreatedBy.ToString(); ddlState.SelectedValue = dr.StateID.ToString(); lblState.Text = ddlState.SelectedItem.Text; }