예제 #1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (dgHeaderBKM.SelectedCells.Count > 0)
            {
                if (dgHeaderBKM.SelectedCells[0].OwningRow.Cells["Src"].Value.ToString() != "IN")
                {
                    return;
                }
                DateTime _Tanggal = (DateTime)dgHeaderBKM.SelectedCells[0].OwningRow.Cells["tglBukti"].Value;
                if (PeriodeClosing.IsKasirClosed(_Tanggal))
                {
                    MessageBox.Show("Sudah Closing!");
                    return;
                }
                if (_Tanggal == DateTime.Today)
                {
                    Guid   _rowID = (Guid)dgHeaderBKM.SelectedCells[0].OwningRow.Cells["RowID"].Value;
                    string _RecordID, _Terima, _NoBukti, _Lampiran;

                    _RecordID = (String)dgHeaderBKM.SelectedCells[0].OwningRow.Cells["RecordID"].Value;
                    _Terima   = (String)dgHeaderBKM.SelectedCells[0].OwningRow.Cells["dari"].Value;
                    _NoBukti  = (String)dgHeaderBKM.SelectedCells[0].OwningRow.Cells["noBukti"].Value;
                    _Lampiran = Convert.ToString(dgHeaderBKM.SelectedCells[0].OwningRow.Cells["lampiran"].Value);

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

            BMKUpdate.ShowDialog();
        }