private void cmdEdit_Click(object sender, EventArgs e) { if (dataGridView1.SelectedCells.Count > 0) { Guid rowID = (Guid)dataGridView1.SelectedCells[0].OwningRow.Cells["RowID"].Value; Master.frmTargetSalesUpdate ifrmChild = new Master.frmTargetSalesUpdate(this, rowID); ifrmChild.ShowDialog(); } else { MessageBox.Show(Messages.Error.RowNotSelected); } }
private void cmdBtnEDIT_Click(object sender, EventArgs e) { if (cgvTargetSls.SelectedCells.Count > 0) { Guid rowID = (Guid)cgvTargetSls.SelectedCells[0].OwningRow.Cells["ColRowID"].Value; Master.frmTargetSalesUpdate ifrmChild = new Master.frmTargetSalesUpdate(this, rowID, lookupSales1.SalesID, lookupSales1.NamaSales); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } else { MessageBox.Show(Messages.Error.RowNotSelected); } }
private void cmdBtnADD_Click_1(object sender, EventArgs e) { if (lookupSales1.SalesID == "") { Master.frmTargetSalesUpdate ifrmChild = new Master.frmTargetSalesUpdate(this); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); return; } else { Master.frmTargetSalesUpdate ifrmChild = new Master.frmTargetSalesUpdate(this, lookupSales1.SalesID, lookupSales1.NamaSales); ifrmChild.MdiParent = Program.MainForm; Program.MainForm.RegisterChild(ifrmChild); ifrmChild.Show(); } }
private void cmdADD_Click(object sender, EventArgs e) { Master.frmTargetSalesUpdate ifrmChild = new Master.frmTargetSalesUpdate(this); ifrmChild.ShowDialog(); }