private void btnAddInsAlt_Click(object sender, EventArgs e) { AddInsuranceAllotment frm = new AddInsuranceAllotment("ADD", _vehicleBookingId); frm.ShowDialog(); txtInsuranceAllotmentId.Text = frm.Controls["lblnsuranceAllotmentId"].Text; if (txtInsuranceAllotmentId.Text != "" && txtInsuranceAllotmentId.Text != "lblnsuranceAllotmentId") { EnableEditForInsuranceAllotment(); } }
private void btnEditInsAlt_Click(object sender, EventArgs e) { //InsuranceAllotmentId var _insuranceAllotmentId = 0; if (txtInsuranceAllotmentId.Text != "") { _insuranceAllotmentId = Convert.ToInt32(txtInsuranceAllotmentId.Text); } AddInsuranceAllotment frm = new AddInsuranceAllotment("EDIT", _vehicleBookingId, _insuranceAllotmentId); frm.ShowDialog(); txtInsuranceAllotmentId.Text = frm.Controls["lblnsuranceAllotmentId"].Text; if (txtInsuranceAllotmentId.Text != "" && txtInsuranceAllotmentId.Text != "lblnsuranceAllotmentId") { EnableEditForInsuranceAllotment(); } }