/// <summary>
        /// 绑定销售明细
        /// </summary>
        /// <param name="id">ID</param>
        private void BindDetail(string id)
        {
            var result = sale.SaleDetailQuery(new Model.SaleQueryAgrs {
                PosID = new Guid(id)
            });

            if (result != null)
            {
                gridControlPosDetail.DataSource = result;
            }
        }
        public ActionResult GetSalieDetailJson(Guid keyValue)
        {
            var data = saleBLL.SaleDetailQuery(new Model.SaleQueryAgrs {
                PosID = keyValue
            });

            if (data != null && data.Rows.Count > 0)
            {
                var listDetailEntity = Ingpal.BusinessStore.Infrastructure.ConvertHelper.ConvertToModel <Model.Entity.PosDetailEntity>(data);
                return(Content(listDetailEntity.ToJson()));
            }
            return(Error("数据加载失败!"));
        }
Exemple #3
0
        private void BindDataSource()
        {
            var agrs = new Model.SaleQueryAgrs();

            agrs.TicketCode   = txtTicketCode.Text;
            agrs.StoreID      = UserInfo.Instance.StoreID;
            agrs.RecordStatus = 0;
            var result = sale.SaleListQuery(agrs);

            if (result.Rows.Count == 1)
            {
                PosRow         = result.Rows[0];
                agrs.PosID     = new Guid(result.Rows[0]["ID"].ToString());
                txtGuider.Text = result.Rows[0]["Guider"].ToString();

                labelLS.Text       = result.Rows[0]["RecordSerial"].ToString();
                labelLS.Tag        = result.Rows[0]["TicketCode"];
                labelSaleDate.Text = result.Rows[0]["SaleDate"].ToString();
                labelPaytype.Text  = result.Rows[0]["PayTypeName"].ToString();
                labelPaytype.Tag   = result.Rows[0]["PayType"];
                labelGuider.Text   = result.Rows[0]["Guider"].ToString();
                labelGuider.Tag    = result.Rows[0]["GuiderID"];

                if (!string.IsNullOrEmpty(txtBarID.Text))
                {
                    agrs.BarID = txtBarID.Text;
                }

                var data = sale.SaleDetailQuery(agrs);

                data.Columns.Add(new DataColumn()
                {
                    Caption = "退货金额", ColumnName = "ReturnAmount", DefaultValue = 0.00, DataType = typeof(double)
                });
                gridControlReturnGoods.DataSource = data;
            }
            else
            {
                XtraMessageBox.Show("您输入的小票不可进行退货操作!", "系统提示", MessageBoxButtons.OK);
                txtTicketCode.Text = string.Empty;
                txtTicketCode.Focus();
            }
        }