Beispiel #1
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == dataGridView1.Columns["edit_column"].Index)
     {
         string    intID  = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
         Medicines myform = new Medicines(intID);
         myform.MdiParent   = this.ParentForm;
         myform.WindowState = FormWindowState.Maximized;
         myform.Show();
         this.Close();
     }
 }
Beispiel #2
0
        private void medicineToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild != null)
            {
                ActiveMdiChild.Close();
            }
            Medicines newMDIChild = new Medicines(string.Empty);

            newMDIChild.MdiParent   = this;
            newMDIChild.MaximizeBox = false;
            newMDIChild.Show();
            newMDIChild.WindowState = FormWindowState.Maximized;
        }