Beispiel #1
0
 private void cmdAdd_Click(object sender, EventArgs e)
 {
     Master.frmSopirUpdate ifrmChild = new Master.frmSopirUpdate(this);
     ifrmChild.MdiParent = Program.MainForm;
     Program.MainForm.RegisterChild(ifrmChild);
     ifrmChild.Show();
 }
Beispiel #2
0
 private void cmdEdit_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedCells.Count > 0)
     {
         string rowid = dataGridView1.SelectedCells[0].OwningRow.Cells["Nama"].Value.ToString();
         Master.frmSopirUpdate ifrmChild = new Master.frmSopirUpdate(this, rowid);
         ifrmChild.MdiParent = Program.MainForm;
         Program.MainForm.RegisterChild(ifrmChild);
         ifrmChild.Show();
     }
     else
     {
         MessageBox.Show(Messages.Error.RowNotSelected);
     }
 }