private void showADLHeaderDetailData() { ADLHeaderDetail aDLHeaderDetail = new ADLHeaderDetail(); aDLHeaderDetail = ADLHeaderDetailManager.GetADLHeaderDetailByID(Int32.Parse(Request.QueryString["aDLHeaderDetailID"])); ddlADLDetail.SelectedValue = aDLHeaderDetail.ADLDetailID.ToString(); ddlADLHeader.SelectedValue = aDLHeaderDetail.ADLHeaderID.ToString(); ddlResident.SelectedValue = aDLHeaderDetail.ResidentID.ToString(); txtExtraField1.Text = aDLHeaderDetail.ExtraField1; txtExtraField2.Text = aDLHeaderDetail.ExtraField2; txtExtraField3.Text = aDLHeaderDetail.ExtraField3; txtExtraField4.Text = aDLHeaderDetail.ExtraField4; txtExtraField5.Text = aDLHeaderDetail.ExtraField5; }
protected void btnUpdate_Click(object sender, EventArgs e) { ADLHeaderDetail aDLHeaderDetail = new ADLHeaderDetail(); aDLHeaderDetail = ADLHeaderDetailManager.GetADLHeaderDetailByID(Int32.Parse(Request.QueryString["aDLHeaderDetailID"])); ADLHeaderDetail tempADLHeaderDetail = new ADLHeaderDetail(); tempADLHeaderDetail.ADLHeaderDetailID = aDLHeaderDetail.ADLHeaderDetailID; tempADLHeaderDetail.ADLDetailID = Int32.Parse(ddlADLDetail.SelectedValue); tempADLHeaderDetail.ADLHeaderID = Int32.Parse(ddlADLHeader.SelectedValue); tempADLHeaderDetail.ResidentID = Int32.Parse(ddlResident.SelectedValue); tempADLHeaderDetail.ExtraField1 = txtExtraField1.Text; tempADLHeaderDetail.ExtraField2 = txtExtraField2.Text; tempADLHeaderDetail.ExtraField3 = txtExtraField3.Text; tempADLHeaderDetail.ExtraField4 = txtExtraField4.Text; tempADLHeaderDetail.ExtraField5 = txtExtraField5.Text; bool result = ADLHeaderDetailManager.UpdateADLHeaderDetail(tempADLHeaderDetail); Response.Redirect("AdminADLHeaderDetailDisplay.aspx"); }