Example #1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (dgHeaderBKK.SelectedCells.Count > 0)
            {
                if (dgHeaderBKK.SelectedCells[0].OwningRow.Cells["Src"].Value.ToString() != "OUT")
                {
                    return;
                }
                DateTime _Tanggal = (DateTime)dgHeaderBKK.SelectedCells[0].OwningRow.Cells["tglBukti"].Value;
                if (PeriodeClosing.IsKasirClosed(_Tanggal))
                {
                    MessageBox.Show("Sudah Closing!");
                    return;
                }
                if (_Tanggal == DateTime.Today)
                {
                    Guid   _rowID = (Guid)dgHeaderBKK.SelectedCells[0].OwningRow.Cells["RowID"].Value;
                    string _RecordID, _Terima, _NoBukti, _Lampiran;
                    _RecordID = (String)dgHeaderBKK.SelectedCells[0].OwningRow.Cells["RecordID"].Value;
                    _Terima   = (String)dgHeaderBKK.SelectedCells[0].OwningRow.Cells["dari"].Value;
                    _NoBukti  = (String)dgHeaderBKK.SelectedCells[0].OwningRow.Cells["noBukti"].Value;
                    _Lampiran = Convert.ToString(dgHeaderBKK.SelectedCells[0].OwningRow.Cells["lampiran"].Value);

                    frmBKKUpdate BKKUpdate = new frmBKKUpdate(this, _rowID, _RecordID, _Terima, _NoBukti, _Tanggal, _Lampiran, string.Empty, false, string.Empty);
                    BKKUpdate.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Maaf, edit transaksi hanya boleh untuk transaksi hari ini saja.");
                    return;
                }
            }
        }
Example #2
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            frmBKKUpdate bkkupdate = new frmBKKUpdate(this);

            bkkupdate.ShowDialog();
        }