private void btnNew_Click(object sender, EventArgs e) { CM = new ClientMaintananceFrm("btnNew"); CM.MdiParent = this.MdiParent; closing(); CM.Show(); }
public void LoadDataFromGrid(DataGridViewRow Row, string action) { VClientID = Convert.ToInt32(Row.Cells["ClientID"].Value); CM = new ClientMaintananceFrm(action, VClientID); CM.MdiParent = this.MdiParent; VClientName = CM.tbName.Text = Row.Cells["ClientName"].Value.ToString(); VClientAddr1 = CM.tbAddrLine1.Text = Row.Cells["ClientAddressLine1"].Value.ToString(); VClientAddr2 = CM.tbAddrLine2.Text = Row.Cells["ClientAddressLine2"].Value.ToString(); VState = CM.tbState.Text = Row.Cells["ClientState"].Value.ToString(); VCity = CM.tbCity.Text = Row.Cells["ClientCity"].Value.ToString(); VContactNo = CM.tbContactNum.Text = Row.Cells["ClientMobileNumber"].Value.ToString(); VGSTNo = CM.tbGSTNo.Text = Row.Cells["ClientGSTNumber"].Value.ToString(); closing(); CM.MdiParent = this.MdiParent; CM.WindowState = FormWindowState.Minimized; CM.Show(); CM.WindowState = FormWindowState.Normal; }