Exemple #1
0
        private void cashView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            Object obj = cashView.GetRowCellValue(e.FocusedRowHandle, "OutboundID");

            if (obj == null)
            {
                cashRecordView.ClearRows();
                return;
            }
            string outboundId = obj.ToString();

            cashRecordView.OutboundID = outboundId;
            cashRecordView.LoadOutboundRcvdRecord();
        }
Exemple #2
0
        private void Loading()
        {
            cashRecordView.ClearRows();

            string beginDate = dateBegin.DateTime.ToString("yyyy-MM-dd");
            string endDate   = dateEnd.DateTime.ToString("yyyy-MM-dd");

            string sql = "Select SerialNo, RcvdDate, RcvdAmount,RcvdKind ,(DecmAmount-RcvdAmount) as FactFee,  DecmAmount, Remark From V_RcvdAmount Where RcvdAmount >0 ";

            if (string.IsNullOrEmpty(dateBegin.Text) == false)
            {
                sql += string.Format(" AND RcvdDate >= '{0}'", beginDate);
            }
            if (string.IsNullOrEmpty(dateEnd.Text) == false)
            {
                sql += string.Format("AND RcvdDate <= '{0}'", endDate);
            }

            sql += " Order by RcvdDate desc ";

            DataTable dt = Database.Select(sql);

            masterGrid.DataSource = dt;
        }