예제 #1
0
    /// <summary>
    /// 绑定
    /// </summary>
    public void Bind()
    {
        if (KeyID != 0)
        {
            Hi.Model.DIS_OrderOut OrderOutModel = OrderOutBll.GetModel(KeyID);

            if (OrderOutModel != null)
            {
                OrderId = OrderOutModel.OrderID;

                this.lblReceiptNo.InnerText = OrderOutModel.ReceiptNo;
                this.lblOrderNo.InnerText   = OrderInfoType.getOrder(OrderOutModel.OrderID, "ReceiptNo");
                DisID = OrderOutModel.DisID;

                ProID    = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProID");
                ProPrice = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProAmount");
                ProIDD   = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProDID");
                ProType  = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "Protype");

                this.lblDisName.InnerText = Common.GetDis(OrderOutModel.DisID, "DisName");
                this.hidDisId.Value       = OrderOutModel.DisID.ToString();

                this.lblSendDate.InnerText = OrderOutModel.SendDate == DateTime.MinValue ? "" : OrderOutModel.SendDate.ToString("yyyy-MM-dd");
                //this.lblExpress.InnerText = OrderOutModel.Express;
                //this.lblExpressNo.InnerText = OrderOutModel.ExpressNo;
                //this.lblExpressPerson.InnerText = OrderOutModel.ExpressPerson;
                //this.lblExpressTel.InnerText = OrderOutModel.ExpressTel;
                //this.lblExpressBao.InnerText = OrderOutModel.ExpressBao.ToString();
                //this.lblPostFee.InnerText = OrderOutModel.PostFee.ToString("N");
                this.lblActionUser.InnerText = OrderOutModel.ActionUser;
                this.lblRemark.InnerText     = OrderOutModel.Remark;

                //签收信息
                this.lblIsSign.InnerText     = OrderOutModel.IsSign == 0 ? "未签收" : "已签收";
                this.lblSignUser.InnerText   = OrderOutModel.SignUser;
                this.hidSignUserId.Value     = OrderOutModel.SignUserId.ToString();
                this.lblSignDate.InnerText   = OrderOutModel.SignDate == DateTime.MinValue ? "" : OrderOutModel.SignDate.ToString("yyyy-MM-dd");
                this.lblSignRemark.InnerText = OrderOutModel.SignRemark;

                BindOrderDetail(OrderOutModel.OrderID, OrderOutModel.DisID);
            }
        }
    }
예제 #2
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        string type = Request.QueryString["type"] + "";

        if (KeyID != 0)
        {
            if (!Common.PageCompOperable("ReturnOrder", KeyID, CompID))
            {
                Response.Redirect("../../NoOperable.aspx");
                return;
            }

            Hi.Model.DIS_OrderReturn OrderReturnModel = OrderReturnBll.GetModel(KeyID);

            if (OrderReturnModel != null)
            {
                this.lblDisName.InnerText = Common.GetDis(OrderReturnModel.DisID, "DisName");
                this.hidDisId.Value       = OrderReturnModel.DisID.ToString();
                DisId   = OrderReturnModel.DisID;
                OrderId = OrderReturnModel.OrderID;

                Hi.Model.DIS_Order OrderModel = new Hi.BLL.DIS_Order().GetModel(OrderId);

                this.lblReceiptNo.InnerText = OrderReturnModel.ReceiptNo;

                this.lblReturnDate.InnerText = OrderReturnModel.ReturnDate == DateTime.MinValue ? "" : OrderReturnModel.ReturnDate.ToString("yyyy-MM-dd");

                this.lblReturnUserID.InnerText = Common.GetUserName(OrderReturnModel.ReturnUserID.ToString().ToInt(0));
                this.lblReturnState.InnerText  = OrderInfoType.ReturnState(OrderReturnModel.ReturnState);
                //this.lblExpress.InnerText = OrderReturnModel.Express;
                //this.lblExpressNo.InnerText = OrderReturnModel.ExpressNo;
                this.lblReturnContent.InnerText = OrderReturnModel.ReturnContent;

                ProID    = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "ProID");
                ProPrice = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "ProAmount");
                ProIDD   = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "ProDID");
                ProType  = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "Protype");

                //订单信息
                this.lblOState.InnerText   = OrderInfoType.OState(OrderModel.ID);
                this.lblPayState.InnerHtml = OrderInfoType.PayState(OrderModel.PayState);
                if (OrderModel.PayState == (int)Enums.PayState.未支付)
                {
                    this.lblPayState.Attributes.Add("style", "Color:Red");
                }
                else
                {
                    this.lblPayState.Attributes.Add("style", "Color:green");
                }

                this.lblAddType.InnerText = OrderInfoType.AddType(OrderModel.AddType);
                this.lblOtype.InnerText   = OrderInfoType.OType(OrderModel.Otype);
                //订单总价
                this.lblTotalPrice.InnerText = OrderInfoType.getOrder(OrderReturnModel.OrderID, "AuditAmount");


                if (OrderReturnModel.AuditUserID == 0)
                {
                    this.trAuditUser.Attributes.Add("style", "display:none;");
                    this.trAuditRemark.Attributes.Add("style", "display:none;");
                }
                else
                {
                    this.trAuditUser.Attributes.Add("style", "");
                    this.trAuditRemark.Attributes.Add("style", "");
                }
                this.lblAuditUser.InnerText   = Common.GetUserName(OrderReturnModel.AuditUserID);
                this.lblAuditDate.InnerText   = OrderReturnModel.AuditDate == DateTime.MinValue ? "" : OrderReturnModel.AuditDate.ToString("yyyy-MM-dd");
                this.lblAuditRemark.InnerText = OrderReturnModel.AuditRemark;

                if (this.Erptype != 0)
                {
                    //U8、U9等用户  不能对订单进行操作
                    this.Audit.Visible       = false;
                    this.ReturnMoney.Visible = false;
                }
                else
                {
                    //非U8、U9等用户  可以对订单进行操作
                    #region
                    if (OrderReturnModel.ReturnState < (int)Enums.AuditState.提交)
                    {
                        //this.Audit.Attributes.Add("style", "display:none;");
                        //this.ReturnMoney.Attributes.Add("style", "display:none;");

                        this.Audit.Visible       = false;
                        this.ReturnMoney.Visible = false;
                    }
                    else if (OrderReturnModel.ReturnState == (int)Enums.AuditState.提交)
                    {
                        this.Audit.Visible       = true;
                        this.ReturnMoney.Visible = false;

                        //this.Audit.Attributes.Add("style", "display:inline-block;");
                        //this.ReturnMoney.Attributes.Add("style", "display:none;");
                    }
                    else if (OrderReturnModel.ReturnState == (int)Enums.AuditState.已审)
                    {
                        this.Audit.Visible = false;
                        //this.Audit.Attributes.Add("style", "display:none;");
                        if (OrderModel != null)
                        {
                            if (OrderModel.Otype != (int)Enums.OType.赊销订单)
                            {
                                if (type == "")
                                {
                                    this.ReturnMoney.Visible = false;
                                    //this.ReturnMoney.Attributes.Add("style", "display:none;");
                                }
                                else
                                {
                                    this.ReturnMoney.Visible = true;
                                    //this.ReturnMoney.Attributes.Add("style", "display:inline-block;");
                                }
                            }
                            else
                            {
                                if (OrderModel.PayState == (int)Enums.PayState.已支付)
                                {
                                    if (type == "")
                                    {
                                        this.ReturnMoney.Visible = false;
                                        //this.ReturnMoney.Attributes.Add("style", "display:none;");
                                    }
                                    else
                                    {
                                        this.ReturnMoney.Visible = true;
                                        //this.ReturnMoney.Attributes.Add("style", "display:inline-block;");
                                    }
                                }
                                else
                                {
                                    this.ReturnMoney.Visible = false;
                                    //this.ReturnMoney.Attributes.Add("style", "display:none;");
                                }
                            }
                        }
                    }
                    else if (OrderReturnModel.ReturnState == (int)Enums.AuditState.已完结)
                    {
                        this.Audit.Visible       = false;
                        this.ReturnMoney.Visible = false;
                        //this.Audit.Attributes.Add("style", "display:none;");
                        //this.ReturnMoney.Attributes.Add("style", "display:none;");
                    }
                    #endregion
                }
                BindOrderDetail(OrderReturnModel.OrderID, OrderReturnModel.DisID);
            }
        }
        else
        {
            Response.Write("数据错误!");
            Response.End();
        }
    }
예제 #3
0
    /// <summary>
    /// 绑定
    /// </summary>
    public void Bind()
    {
        if (KeyID != 0)
        {
            if (!Common.PageCompOperable("OrderOut", KeyID, CompID))
            {
                Response.Redirect("../../NoOperable.aspx");
                return;
            }

            Hi.Model.DIS_OrderOut OrderOutModel = OrderOutBll.GetModel(KeyID);

            if (OrderOutModel != null)
            {
                OrderId = OrderOutModel.OrderID;
                ViewState["OrderId"]        = OrderId;
                OrderOutId                  = OrderOutModel.ID;
                this.lblReceiptNo.InnerText = OrderOutModel.ReceiptNo;
                this.lblOrderNo.InnerText   = OrderInfoType.getOrder(OrderOutModel.OrderID, "ReceiptNo");
                DisId = OrderOutModel.DisID;

                ProID    = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProID");
                ProPrice = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProAmount");
                ProIDD   = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProDID");
                ProType  = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "Protype");

                this.lblDisName.InnerText = Common.GetDis(OrderOutModel.DisID, "DisName");
                this.hidDisId.Value       = OrderOutModel.DisID.ToString();

                this.lblSendDate.InnerText = OrderOutModel.SendDate == DateTime.MinValue ? "" : OrderOutModel.SendDate.ToString("yyyy-MM-dd");
                //this.lblExpress.InnerText = OrderOutModel.Express;
                //this.lblExpressNo.InnerText = OrderOutModel.ExpressNo;
                //this.lblExpressPerson.InnerText = OrderOutModel.ExpressPerson;
                //this.lblExpressTel.InnerText = OrderOutModel.ExpressTel;
                //this.lblExpressBao.InnerText = OrderOutModel.ExpressBao.ToString();
                //this.lblPostFee.InnerText = OrderOutModel.PostFee.ToString("N");
                //this.lblActionUser.InnerText = OrderOutModel.ActionUser;
                this.lblRemark.InnerText = OrderOutModel.Remark;

                //签收信息
                this.lblIsSign.InnerText     = OrderOutModel.IsSign == 0 ? "未签收" : "已签收";
                this.lblSignUser.InnerText   = OrderOutModel.SignUser;
                this.hidSignUserId.Value     = OrderOutModel.SignUserId.ToString();
                this.lblSignDate.InnerText   = OrderOutModel.SignDate == DateTime.MinValue ? "" : OrderOutModel.SignDate.ToString("yyyy-MM-dd");
                this.lblSignRemark.InnerText = OrderOutModel.SignRemark;

                BindOrderDetail(OrderOutModel.OrderID, OrderOutModel.DisID);

                if (this.Erptype != 0)
                {
                    //非U8、U9等用户  可以对订单进行操作
                    this.li_Express.Visible = true;
                }
            }
        }
        else
        {
            Response.Write("数据错误!");
            Response.End();
        }
    }