private void btn_Creat_Click(object sender, EventArgs e) { this.Hide(); VariableGlobal.building_id = 0; FrmBuilding building = new FrmBuilding(); building.Show(); }
private void btn_Edit_Click(object sender, EventArgs e) { foreach (DataGridViewRow item in this.dataGridViewX1.SelectedRows) { if (item.Cells[1].Value != null) { this.Hide(); VariableGlobal.building_id = Convert.ToInt32(item.Cells[3].Value.ToString()); FrmBuilding building = new FrmBuilding(); building.Show(); } } }