private void showACC_ChartOfAccountLabel4Data() { ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 = new ACC_ChartOfAccountLabel4(); aCC_ChartOfAccountLabel4 = ACC_ChartOfAccountLabel4Manager.GetACC_ChartOfAccountLabel4ByID(Int32.Parse(hfaCC_ChartOfAccountLabel4ID.Value)); txtCode.Text = aCC_ChartOfAccountLabel4.Code; ddlACC_HeadType.SelectedValue = aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString(); txtChartOfAccountLabel4Text.Text = aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text; txtExtraField1.Text = aCC_ChartOfAccountLabel4.ExtraField1; txtExtraField2.Text = aCC_ChartOfAccountLabel4.ExtraField2; txtExtraField3.Text = aCC_ChartOfAccountLabel4.ExtraField3; txtAddedBy.Text = aCC_ChartOfAccountLabel4.AddedBy.ToString(); txtUpdatedBy.Text = aCC_ChartOfAccountLabel4.UpdatedBy.ToString(); //txtUpdatedDate.Text = aCC_ChartOfAccountLabel4.UpdatedDate; ddlRowStatus.SelectedValue = aCC_ChartOfAccountLabel4.RowStatusID.ToString(); if (ddlACC_HeadType.SelectedValue == "10") { ddlCOAL3.Visible = true; try { ddlCOAL3.SelectedValue = aCC_ChartOfAccountLabel4.ExtraField3; } catch (Exception ex) { } txtExtraField3.Enabled = false; } else { txtExtraField3.Enabled = true; ddlCOAL3.Visible = false; } }
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()); }
private void showACC_ChartOfAccountLabel4Data() { ACC_ChartOfAccountLabel4 aCC_ChartOfAccountLabel4 = new ACC_ChartOfAccountLabel4(); aCC_ChartOfAccountLabel4 = ACC_ChartOfAccountLabel4Manager.GetACC_ChartOfAccountLabel4ByID(Int32.Parse(Request.QueryString["aCC_ChartOfAccountLabel4ID"])); txtCode.Text = aCC_ChartOfAccountLabel4.Code; ddlACC_HeadType.SelectedValue = aCC_ChartOfAccountLabel4.ACC_HeadTypeID.ToString(); txtChartOfAccountLabel4Text.Text = aCC_ChartOfAccountLabel4.ChartOfAccountLabel4Text; txtExtraField1.Text = aCC_ChartOfAccountLabel4.ExtraField1; txtExtraField2.Text = aCC_ChartOfAccountLabel4.ExtraField2; txtExtraField3.Text = aCC_ChartOfAccountLabel4.ExtraField3; txtAddedBy.Text = aCC_ChartOfAccountLabel4.AddedBy.ToString(); txtUpdatedBy.Text = aCC_ChartOfAccountLabel4.UpdatedBy.ToString(); txtUpdatedDate.Text = aCC_ChartOfAccountLabel4.UpdatedDate; ddlRowStatus.SelectedValue = aCC_ChartOfAccountLabel4.RowStatusID.ToString(); }
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"); }