private void showSectionLabelValueData() { SectionLabelValue sectionLabelValue = new SectionLabelValue(); sectionLabelValue = SectionLabelValueManager.GetSectionLabelValueByID(Int32.Parse(Request.QueryString["sectionLabelValueID"])); ddlSectionLabel.SelectedValue = sectionLabelValue.SectionLabelID.ToString(); txtAddedBy.Text = sectionLabelValue.AddedBy.ToString(); txtValue.Text = sectionLabelValue.Value; txtExtraField1.Text = sectionLabelValue.ExtraField1; txtExtraField2.Text = sectionLabelValue.ExtraField2; }
protected void btnUpdate_Click(object sender, EventArgs e) { SectionLabelValue sectionLabelValue = new SectionLabelValue(); sectionLabelValue = SectionLabelValueManager.GetSectionLabelValueByID(Int32.Parse(Request.QueryString["sectionLabelValueID"])); SectionLabelValue tempSectionLabelValue = new SectionLabelValue(); tempSectionLabelValue.SectionLabelValueID = sectionLabelValue.SectionLabelValueID; tempSectionLabelValue.SectionLabelID = Int32.Parse(ddlSectionLabel.SelectedValue); tempSectionLabelValue.AddedBy = Int32.Parse(txtAddedBy.Text); tempSectionLabelValue.AddedDate = DateTime.Now; tempSectionLabelValue.Value = txtValue.Text; tempSectionLabelValue.ExtraField1 = txtExtraField1.Text; tempSectionLabelValue.ExtraField2 = txtExtraField2.Text; bool result = SectionLabelValueManager.UpdateSectionLabelValue(tempSectionLabelValue); Response.Redirect("AdminSectionLabelValueDisplay.aspx"); }