Exemple #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 (GlobalVar.Gudang != "2808")
                {
                    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, _AttachmentBKK;
                    _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);
                    //_AttachmentBKK = dgHeaderBKK.SelectedCells[0].OwningRow.Cells["AttachmentBKK"].Value.ToString();
                    _AttachmentBKK = dgHeaderBKK.SelectedCells[0].OwningRow.Cells["AttachmentSource"].Value.ToString();

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

            bkkupdate.ShowDialog();
        }