Exemple #1
0
        public void RefreshRowBuktiTransfer(Guid rowID)
        {
            DataTable dtRefresh = new DataTable();

            dtRefresh = TransferBank.ListHeaderRow(rowID, "K");
            gridUtm.RefreshDataRow(dtRefresh.Rows[0], "RowID", rowID.ToString());
        }
Exemple #2
0
        private void frmBuktiTransferKeluarUpdate_Load(object sender, EventArgs e)
        {
            double Total = 0;

            if (formMode == enumFormMode.Update)
            {
                dt  = new DataTable();
                dtH = new DataTable();
                using (Database db = new Database(GlobalVar.DBName))
                {
                    //db.Commands.Add(db.CreateCommand("usp_BuktiTransferKeluarShowForUpdateHeader"));

                    dtH = TransferBank.ListHeaderRow(_rowIDTransferBank, "K");
                    dt  = TransferBank.ListDetail(db, _rowIDTransferBank);


                    gridTransfer.DataSource = dt.DefaultView;


                    if (_isFromPiutang == false)
                    {
                        Total   = Convert.ToDouble(ISA.Common.Tools.isNullOrEmpty(dt.Compute("SUM(Nominal)", string.Empty).ToString(), "0"));
                        _BankID = dtH.Rows[0]["BankID"].ToString();
                        _recordIDTransferBank = dtH.Rows[0]["RecordID"].ToString();
                        _rowIDBank            = (Guid)dtH.Rows[0]["RowIDBank"];
                        lookupBank1.NamaBank  = dtH.Rows[0]["NamaBank"].ToString();
                        lookupBank1.BankID    = _BankID;
                        txtKepada.Text        = dtH.Rows[0]["Penyetor"].ToString().Trim();
                        lblNoBkk.Text         = dtH.Rows[0]["NoBBM"].ToString();
                        lblTanggal.Text       = ((DateTime)dtH.Rows[0]["TglBBM"]).ToString("dd-MM-yyyy");
                        lblNoBkk.Visible      = false;
                    }
                    else
                    {
                        Total                  = Convert.ToDouble(ISA.Common.Tools.isNullOrEmpty(dt.Compute("SUM(Nominal)", string.Empty).ToString(), "0"));
                        txtKepada.Text         = dtH.Rows[0]["Penyetor"].ToString().Trim();
                        lookupBank1.NamaBank   = dtH.Rows[0]["NamaBank"].ToString();
                        lookupBank1.BankID     = _BankID;
                        _BankID                = dtH.Rows[0]["BankID"].ToString();
                        _recordIDTransferBank  = dtH.Rows[0]["RecordID"].ToString();
                        _recordIDTransferBank2 = _recordIDTransferBank.Substring(0, 22) + _jp;
                        lblNoBkk.Text          = dtH.Rows[0]["NoBBM"].ToString();
                        _rowIDBank             = (Guid)dtH.Rows[0]["RowIDBank"];
                        txtKepada.Enabled      = false;
                        lookupBank1.Enabled    = false;
                        lblNoBkk.Visible       = true;
                        lblTanggal.Text        = ((DateTime)dtH.Rows[0]["TglBBM"]).ToString("dd-MM-yyyy");
                    }
                }
            }
            else
            {
                if (_isFromPiutang == true)
                {
                    txtKepada.Text = _name.Trim();
                }
                lblNoBkk.Visible = false;
                lblTanggal.Text  = DateTime.Now.Date.ToString("dd-MM-yyyy");
            }


            numericTextBox1.Text = Total.ToString("#,##0");
        }