Пример #1
0
        public void RefreshDetail(Guid RowID)
        {
            if (GVHeader.Rows.Count > 0)
            {
                using (Database db = new Database())
                {
                    db.Commands.Add(db.CreateCommand("usp_PenerimaanLeasingDetail"));
                    db.Commands[0].Parameters.Add(new Parameter("@PenerimaanUangRowID", SqlDbType.UniqueIdentifier, (Guid)GVHeader.SelectedCells[0].OwningRow.Cells["RowID"].Value));
                    dtDetail = db.Commands[0].ExecuteDataTable();
                }

                GVDetail.DataSource = dtDetail;
                if (RowID != Guid.Empty)
                {
                    GVDetail.FindRow("RowIDD", RowID.ToString());
                }
            }
            else
            {
                GVDetail.DataSource = new DataTable();
            }
        }
Пример #2
0
        private void RefreshHeader2(Guid RowID)
        {
            if (v_cbLeasing == true)
            {
                DataTable dtHeader2 = new DataTable();
                using (Database db = new Database())
                {
                    db.Commands.Add(db.CreateCommand("usp_PenerimaanLeasingTab2Header"));
                    //db.Commands[0].Parameters.Add(new Parameter("@RowID", SqlDbType.UniqueIdentifier, (Guid)GVHeader.SelectedCells[0].OwningRow.Cells["RowID"].Value));
                    db.Commands[0].Parameters.Add(new Parameter("@LeasingRowID", SqlDbType.UniqueIdentifier, (Guid)Tools.isNull(cb_Leasing.SelectedValue, Guid.Empty)));
                    db.Commands[0].Parameters.Add(new Parameter("@FromDate", SqlDbType.DateTime, rangeDateBox1.FromDate.Value));
                    db.Commands[0].Parameters.Add(new Parameter("@ToDate", SqlDbType.DateTime, rangeDateBox1.ToDate.Value));
                    dtHeader2 = db.Commands[0].ExecuteDataTable();
                }

                GVHeader2.DataSource  = dtHeader2;
                txt_SaldoPiutang.Text = dtHeader2.DefaultView.ToTable().Compute("SUM(SaldoSBD) +SUM(SaldoLSG) ", "").ToString();

                if (RowID != Guid.Empty)
                {
                    GVDetail.FindRow("RowIDD", RowID.ToString());
                }
            }
        }
Пример #3
0
        public void RefreshDetail(Guid RowIDD)
        {
            try
            {
                DataTable dt = new DataTable();
                using (Database db = new Database())
                {
                    db.Commands.Add(db.CreateCommand("usp_IdenPengajuanBBN_ListDetail"));
                    db.Commands[0].Parameters.Add(new Parameter("@RowID", SqlDbType.UniqueIdentifier, (Guid)GVHeader.SelectedCells[0].OwningRow.Cells["RowID"].Value));
                    dt = db.Commands[0].ExecuteDataTable();
                }
                _DataDetail         = dt;
                GVDetail.DataSource = dt;

                if (dt.Rows.Count > 0 && RowIDD != Guid.Empty)
                {
                    GVDetail.FindRow("RowID_PU", RowIDD.ToString());
                }
            }
            catch (Exception ex)
            {
                Error.LogError(ex);
            }
        }