private void cmdAdd_Click(object sender, EventArgs e) { switch (selectedGrid) { case enumSelectedGrid.HeaderSelected: Kasir.frmGiroCairTolakBatal_Header_Update ifrmChild1 = new Kasir.frmGiroCairTolakBatal_Header_Update(this); Program.MainForm.RegisterChild(ifrmChild1); ifrmChild1.ShowDialog(); break; case enumSelectedGrid.DetailSelected: try { DateTime _Tanggal = (DateTime)gridBBM.SelectedCells[0].OwningRow.Cells["TglBBM"].Value; if (PeriodeClosing.IsKasirClosed(_Tanggal)) { MessageBox.Show("Sudah Closing!"); return; } Guid bbmID = (Guid)gridBBM.SelectedCells[0].OwningRow.Cells["RowID"].Value; Kasir.frmVoucherTitipanGiro ifrmChild2 = new Kasir.frmVoucherTitipanGiro(this, bbmID); Program.MainForm.RegisterChild(ifrmChild2); ifrmChild2.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "error", MessageBoxButtons.OK, MessageBoxIcon.Error); } break; } }
private void cmdAdd_Click(object sender, EventArgs e) { switch (selectedGrid) { case enumSelectedGrid.HeaderSelected: Kasir.frmGiroCairTolakBatal_Header_Update ifrmChild1 = new Kasir.frmGiroCairTolakBatal_Header_Update(this); Program.MainForm.RegisterChild(ifrmChild1); ifrmChild1.ShowDialog(); break; case enumSelectedGrid.DetailSelected: DateTime _Tanggal = (DateTime)gridBBM.SelectedCells[0].OwningRow.Cells["TglBBM"].Value; //if (GlobalVar.Gudang != "2808") //{ // if (PeriodeClosing.IsKasirClosed(_Tanggal)) // { // MessageBox.Show("Sudah Closing!"); // return; // } //} Guid bbmID = (Guid)gridBBM.SelectedCells[0].OwningRow.Cells["RowID"].Value; Kasir.frmVoucherTitipanGiro ifrmChild2 = new Kasir.frmVoucherTitipanGiro(this, bbmID); Program.MainForm.RegisterChild(ifrmChild2); ifrmChild2.ShowDialog(); break; } }