protected void btnUpdate_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 = new ACC_ChartOfAccountLabel4(); aCC_ChartOfAccountLabel4 = ACC_ChartOfAccountLabel4Manager.GetACC_ChartOfAccountLabel4ByID(Int32.Parse(hfaCC_ChartOfAccountLabel4ID.Value)); ACC_ChartOfAccountLabel4 tempACC_ChartOfAccountLabel4 = new ACC_ChartOfAccountLabel4(); tempACC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID = aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID; tempACC_ChartOfAccountLabel4.Code = txtCode.Text; tempACC_ChartOfAccountLabel4.ACC_HeadTypeID = Int32.Parse(ddlACC_HeadType.SelectedValue); tempACC_ChartOfAccountLabel4.ChartOfAccountLabel4Text = txtChartOfAccountLabel4Text.Text; tempACC_ChartOfAccountLabel4.ExtraField1 = txtExtraField1.Text; tempACC_ChartOfAccountLabel4.ExtraField2 = txtExtraField2.Text; tempACC_ChartOfAccountLabel4.ExtraField3 = ddlACC_HeadType.SelectedValue == "10" ? (ddlCOAL3.SelectedValue == "0" ? "203" : ddlCOAL3.SelectedValue) : txtExtraField3.Text; tempACC_ChartOfAccountLabel4.AddedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel4.AddedDate = DateTime.Now; tempACC_ChartOfAccountLabel4.UpdatedBy = getLogin().LoginID; tempACC_ChartOfAccountLabel4.UpdatedDate = DateTime.Now; tempACC_ChartOfAccountLabel4.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); bool result = ACC_ChartOfAccountLabel4Manager.UpdateACC_ChartOfAccountLabel4(tempACC_ChartOfAccountLabel4); showACC_ChartOfAccountLabel4Grid(); btnUpdate.Visible = false; btnAdd.Visible = true; btnClear_Click(this, new EventArgs()); }
protected void btnUpdate_Click(object sender, EventArgs e) { ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 = new ACC_ChartOfAccountLabel4(); aCC_ChartOfAccountLabel4 = ACC_ChartOfAccountLabel4Manager.GetACC_ChartOfAccountLabel4ByID(Int32.Parse(Request.QueryString["aCC_ChartOfAccountLabel4ID"])); ACC_ChartOfAccountLabel4 tempACC_ChartOfAccountLabel4 = new ACC_ChartOfAccountLabel4(); tempACC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID = aCC_ChartOfAccountLabel4.ACC_ChartOfAccountLabel4ID; tempACC_ChartOfAccountLabel4.Code = txtCode.Text; tempACC_ChartOfAccountLabel4.ACC_HeadTypeID = Int32.Parse(ddlACC_HeadType.SelectedValue); tempACC_ChartOfAccountLabel4.ChartOfAccountLabel4Text = txtChartOfAccountLabel4Text.Text; tempACC_ChartOfAccountLabel4.ExtraField1 = txtExtraField1.Text; tempACC_ChartOfAccountLabel4.ExtraField2 = txtExtraField2.Text; tempACC_ChartOfAccountLabel4.ExtraField3 = txtExtraField3.Text; tempACC_ChartOfAccountLabel4.AddedBy = Int32.Parse(txtAddedBy.Text); tempACC_ChartOfAccountLabel4.AddedDate = DateTime.Now; tempACC_ChartOfAccountLabel4.UpdatedBy = Int32.Parse(txtUpdatedBy.Text); tempACC_ChartOfAccountLabel4.UpdatedDate = DateTime.Now; tempACC_ChartOfAccountLabel4.RowStatusID = Int32.Parse(ddlRowStatus.SelectedValue); bool result = ACC_ChartOfAccountLabel4Manager.UpdateACC_ChartOfAccountLabel4(tempACC_ChartOfAccountLabel4); Response.Redirect("AdminACC_ChartOfAccountLabel4Display.aspx"); }