Example #1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            switch (selectedGrid)
            {
            case enumSelectedGrid.HeaderSelected:

                if (gridBBM.SelectedCells.Count > 0)
                {
                    DateTime _Tanggal = (DateTime)gridBBM.SelectedCells[0].OwningRow.Cells["TglBBM"].Value;
                    if (GlobalVar.Gudang != "2808")
                    {
                        if (PeriodeClosing.IsKasirClosed(_Tanggal))
                        {
                            MessageBox.Show("Sudah Closing!");
                            return;
                        }
                    }
                    Guid rowID = (Guid)gridBBM.SelectedCells[0].OwningRow.Cells["RowID"].Value;
                    Kasir.frmGiroCairTolakBatal_Header_Update ifrmChild1 = new Kasir.frmGiroCairTolakBatal_Header_Update(this, rowID);
                    Program.MainForm.RegisterChild(ifrmChild1);
                    ifrmChild1.ShowDialog();
                }


                break;
            }
        }
Example #2
0
        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;
            }
        }
Example #3
0
        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;
            }
        }