protected override void DoNew() { LandInfo frmForm = new LandInfo(); frmForm.FormState = "new"; frmForm.ShowDialog(); btnStatus(true); ShowData(); }
private void btnNewLand_Click(object sender, EventArgs e) { // Create a new instance of LandInfoForm LandInfo LandInfoForm = new LandInfo(); // Display the form as top most form. LandInfoForm.TopMost = true; // Show the settings form LandInfoForm.Show(); }
protected override void DoEdit() { if (dgvLandList.RowCount > 0) { LandInfo frmForm = new LandInfo(); frmForm.FormState = "edit"; frmForm.LandID = dgvLandList.Rows[SelectRowIndex].Cells[colLandID.Name].Value.ToString(); frmForm.ShowDialog(); btnStatus(true); } ShowData(); }
private void dgvLandList_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (dgvLandList.RowCount > 0) { LandInfo frmForm = new LandInfo(); frmForm.FormState = "edit"; frmForm.LandID = dgvLandList.Rows[SelectRowIndex].Cells[colLandID.Name].Value.ToString(); frmForm.ShowDialog(); btnStatus(true); } ShowData(); }