예제 #1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (mode == selectMode.header)
            {
                Guid rowID            = (Guid)dgHeaderBank.SelectedCells[0].OwningRow.Cells["RowIDH"].Value;
                frmBukuBankUpdate frm = new frmBukuBankUpdate(this, rowID);
                frm.ShowDialog();
            }
            else
            {
                Guid     rowID, rowIDDetail;
                string   noBBK, noBGCH, Debet, Kredit, keterangan;
                DateTime tglBank, tglRK;
                DateTime _Tanggal = (DateTime)dgDetailBank.SelectedCells[0].OwningRow.Cells["TglBank"].Value;
                if (PeriodeClosing.IsKasirClosed(_Tanggal))
                {
                    MessageBox.Show("Sudah Closing!");
                    return;
                }
                rowID       = (Guid)dgHeaderBank.SelectedCells[0].OwningRow.Cells["RowIDH"].Value;
                rowIDDetail = (Guid)dgDetailBank.SelectedCells[0].OwningRow.Cells["RowID"].Value;
                noBBK       = dgDetailBank.SelectedCells[0].OwningRow.Cells["NoBBKD"].Value.ToString();
                noBGCH      = dgDetailBank.SelectedCells[0].OwningRow.Cells["NoBGCH"].Value.ToString();
                Debet       = dgDetailBank.SelectedCells[0].OwningRow.Cells["Debet"].Value.ToString();
                Kredit      = dgDetailBank.SelectedCells[0].OwningRow.Cells["Kredit"].Value.ToString();
                keterangan  = dgDetailBank.SelectedCells[0].OwningRow.Cells["Keterangan"].Value.ToString();
                tglBank     = (DateTime)dgDetailBank.SelectedCells[0].OwningRow.Cells["TglBank"].Value;
                tglRK       = (DateTime)dgDetailBank.SelectedCells[0].OwningRow.Cells["TglRK"].Value;

                frmBukuBankUpdate frm = new frmBukuBankUpdate(this, rowID, rowIDDetail, noBBK, noBGCH, tglBank, tglRK, keterangan, Debet, Kredit);
                frm.ShowDialog();
            }
        }
예제 #2
0
 private void cmdAdd_Click(object sender, EventArgs e)
 {
     if (mode == selectMode.header)
     {
         frmBukuBankUpdate frm = new frmBukuBankUpdate(this);
         frm.ShowDialog();
     }
     else
     {
         Guid rowID = (Guid)dgHeaderBank.SelectedCells[0].OwningRow.Cells["RowIDH"].Value;
         //MessageBox.Show(rowID.ToString());
         frmBukuBankUpdate frm = new frmBukuBankUpdate(this, rowID, dtBank);
         frm.ShowDialog();
     }
 }