private void btnAddDrug_Click(object sender, EventArgs e) { addDrugNamesForm add = new addDrugNamesForm(); add.lblDrugNo.Text = "0"; //0 insert add.ShowDialog(); }
private void DGVdrug_DoubleClick(object sender, EventArgs e) { string drugNoStr = DGVdrug.SelectedRows[0].Cells["DrugNo"].Value.ToString();//MessageBox.Show(drugNoStr); addDrugNamesForm add = new addDrugNamesForm(); add.lblDrugNo.Text = drugNoStr; //drugNoStr > 0 : update add.ShowDialog(); }