Example #1
0
 private void cmdAdd_Click(object sender, EventArgs e)
 {
     if (cmbKota.SelectedValue.ToString() == "")
     {
         return;
     }
     _Kota = cmbKota.SelectedValue.ToString();
     Master.frmTargetKotaUpdate ifrmChild = new Master.frmTargetKotaUpdate(this, _Kota);
     ifrmChild.MdiParent = Program.MainForm;
     Program.MainForm.RegisterChild(ifrmChild);
     ifrmChild.Show();
 }
Example #2
0
 private void commandButton2_Click(object sender, EventArgs e)
 {
     if (cgvTargetKota.SelectedCells.Count > 0)
     {
         Guid rowID = (Guid)cgvTargetKota.SelectedCells[0].OwningRow.Cells["ColRowID"].Value;
         _Kota = cmbKota.SelectedValue.ToString();
         Master.frmTargetKotaUpdate ifrmChild = new Master.frmTargetKotaUpdate(this, rowID, _Kota);
         ifrmChild.MdiParent = Program.MainForm;
         Program.MainForm.RegisterChild(ifrmChild);
         ifrmChild.Show();
     }
     else
     {
         MessageBox.Show(Messages.Error.RowNotSelected);
     }
 }