コード例 #1
0
ファイル: CompOrderInfo_ZD.aspx.cs プロジェクト: kkwkk/ybyzt
    private void Bind()
    {
        if (KeyID != 0)
        {
            string sql = "SELECT * FROM [dbo].[CompCollection_view] where  CompID=" + this.CompID + " and ID=" + KeyID;

            DataTable ds = SqlHelper.Query(SqlHelper.LocalSqlServer, sql).Tables[0];

            if (ds != null && ds.Rows.Count > 0)
            {
                int orderid = Convert.ToInt32(ds.Rows[0]["orderID"]);
                Hi.Model.DIS_Order orderModel = new Hi.BLL.DIS_Order().GetModel(orderid);

                this.lblReceiptNo.InnerText  = orderModel.ReceiptNo.ToString();
                this.lblOState.InnerText     = OrderInfoType.OState(orderid);
                this.lblPayState.InnerText   = OrderInfoType.PayState(orderModel.PayState);
                this.lblTotalPrice.InnerText = orderModel.AuditAmount.ToString("N");
                this.lblPayedPrice.InnerText = ds.Rows[0]["Price"].ToString().ToDecimal(0).ToString("N");
                this.lblPayAuomet.InnerText  = orderModel.PayedAmount.ToString("N");
                if (ds.Rows[0]["Date"] != null && ds.Rows[0]["Date"].ToString() != "")
                {
                    this.lblArriveDate.InnerText = Convert.ToDateTime(ds.Rows[0]["Date"]).ToString("yyyy-MM-dd");
                }
                this.lblDisUser.InnerText    = Common.GetUserName(orderModel.DisUserID);
                this.lblCreateDate.InnerText = Convert.ToDateTime(orderModel.CreateDate).ToString("yyyy-MM-dd");

                this.lblPaySource.InnerText = ds.Rows[0]["Source"].ToString();
            }
        }
    }
コード例 #2
0
    private void Bind()
    {
        Hi.Model.DIS_Order orderModel = new Hi.BLL.DIS_Order().GetModel(orderid);

        string sql = string.Empty;

        if (paymentid > 0)
        {
            sql = "SELECT * FROM [dbo].[CompCollection_view] where PreType=" + PreType + " and paymentid=" + paymentid;
        }

        DataTable ds = SqlHelper.Query(SqlHelper.LocalSqlServer, sql).Tables[0];

        if (ds != null && ds.Rows.Count > 0 && orderModel != null)
        {
            this.lblReceiptNo.InnerText = orderModel.ReceiptNo.ToString();


            this.lblOState.InnerText   = OrderInfoType.OState(orderModel.ID);
            this.lblPayState.InnerText = OrderInfoType.PayState(orderModel.PayState);



            this.lblTotalPrice.InnerText = orderModel.AuditAmount.ToString("N");
            this.lblPayedPrice.InnerText = ds.Rows[0]["Price"].ToString().ToDecimal(0).ToString("N");
            this.lblPayAuomet.InnerText  = orderModel.PayedAmount.ToString("N");
            this.lblArriveDate.InnerText = Convert.ToDateTime(ds.Rows[0]["Date"]).ToString("yyyy-MM-dd");
            this.lblDisUser.InnerText    = Common.GetUserName(orderModel.DisUserID);
            this.lblCreateDate.InnerText = Convert.ToDateTime(orderModel.CreateDate).ToString("yyyy-MM-dd");

            this.lblPaySource.InnerText = ds.Rows[0]["Source"].ToString();

            ViewState["paymentID"] = ds.Rows[0]["paymentID"].ToString().ToInt(0);
        }
    }
コード例 #3
0
ファイル: OrderPrint.aspx.cs プロジェクト: kkwkk/ybyzt
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        if (KeyID != 0)
        {
            if (!Common.PageCompOperable("Order", KeyID, CompID))
            {
                Response.Redirect("../../NoOperable.aspx");
                return;
            }

            Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(KeyID);

            if (OrderModel != null)
            {
                DisID = OrderModel.DisID;

                this.PrintDate.InnerText    = DateTime.Now.ToString("yyyy年MM月dd日");
                this.lblReceiptNo.InnerText = OrderModel.ReceiptNo;
                this.lblDisName.InnerText   = Common.GetDis(OrderModel.DisID, "DisName");

                this.lblCreateDate.InnerText = OrderModel.CreateDate == DateTime.MinValue ? "" : OrderModel.CreateDate.ToString("yyyy-MM-dd");
                this.lblDisUser.InnerText    = Common.GetUserName(OrderModel.DisUserID);

                this.lblOtype.InnerText      = OrderInfoType.OType(OrderModel.Otype);
                this.lblTotalPrice.InnerText = OrderModel.AuditAmount.ToString("N");

                this.lblPayState.InnerText = OrderInfoType.PayState(OrderModel.PayState);
                this.lblPayPrice.InnerText = OrderModel.PayedAmount.ToString("N");
                if (OrderModel.PayState == (int)Enums.PayState.未支付)
                {
                    this.lblPayState.Attributes.Add("style", "Color:Red");
                }
                else
                {
                    this.lblPayState.Attributes.Add("style", "Color:green");
                }


                this.lblAddr.InnerText   = Common.GetAddr(OrderModel.AddrID);
                this.lblRemark.InnerText = OrderModel.Remark;

                BindOrderDetail(DisID);
            }
        }
    }
コード例 #4
0
ファイル: OrderZDInfo.aspx.cs プロジェクト: kkwkk/ybyzt
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        if (KeyID != 0)
        {
            //判断改该条数据代理商是否有操作权限
            if (!Common.PageDisOperable("Order", KeyID, this.DisID))
            {
                Response.Redirect("../NoOperable.aspx");
                return;
            }

            Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(KeyID);

            if (OrderModel != null)
            {
                // this.lblOtype.InnerText = OrderInfoType.OType(OrderModel.Otype);
                this.lblReceiptNo.InnerText = OrderModel.ReceiptNo;
                this.lblRemark.InnerText    = OrderModel.Remark;

                //this.hidAddrId.Value = OrderModel.AddrID.ToString();
                //this.lblAddr.InnerText = Common.GetAddr(OrderModel.AddrID);
                //this.lblAddr.InnerText = OrderModel.Address;

                this.lblCreateDate.InnerText = OrderModel.CreateDate == DateTime.MinValue ? "" : OrderModel.CreateDate.ToString("yyyy-MM-dd");
                this.lblOState.InnerText     = OrderInfoType.OState(OrderModel.ID);
                if (OrderInfoType.PayState(OrderModel.PayState) == "已支付")
                {
                    this.lblPayState.InnerHtml = "<span style='color:green'>" + OrderInfoType.PayState(OrderModel.PayState) + "</span>";
                }
                else if (OrderInfoType.PayState(OrderModel.PayState) == "未支付")
                {
                    this.lblPayState.InnerHtml = "<span style='color:red'>" + OrderInfoType.PayState(OrderModel.PayState) + "</span>";
                }
                else
                {
                    this.lblPayState.InnerHtml = "<span style='color:blue'>" + OrderInfoType.PayState(OrderModel.PayState) + "</span>";
                }
                // this.lblAddType.InnerText = OrderInfoType.AddType(OrderModel.AddType);

                //this.lblTotalPrice.InnerText = OrderModel.TotalAmount.ToString("N");
                this.lblTotalPrice.InnerText = OrderModel.AuditAmount.ToString("N");
                //this.lblOtherAmount.InnerText = OrderModel.OtherAmount.ToString("N");
                //this.lblAuditAmount.InnerText = OrderModel.AuditAmount.ToString("N");
                this.lblPayedPrice.InnerText = OrderModel.PayedAmount.ToString("N");

                this.lblDisUser.InnerText    = Common.GetUserName(OrderModel.DisUserID);
                this.lblArriveDate.InnerText = OrderModel.ArriveDate == DateTime.MinValue ? "" : OrderModel.ArriveDate.ToString("yyyy-MM-dd");
                this.lblfymc.InnerText       = OrderModel.vdef2;
                //this.lblAuditUser.InnerText = Common.GetUserName(OrderModel.AuditUserID);
                //this.lblAuditDate.InnerText = OrderModel.AuditDate == DateTime.MinValue ? "" : OrderModel.AuditDate.ToString("yyyy-MM-dd");
                //this.lblAuditRemark.InnerText = OrderModel.AuditRemark;



                //订单操作
                OrderState(OrderModel);

                #region 页面操作
                if (Request["type1"] == "RepOrderList")
                {
                    payIcon.Visible    = false;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = false;
                    removeIcon.Visible = false;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = false;
                    Log.Visible        = false;
                    returnIcon.Visible = true;
                }
                if (Request["type1"] == "RepDetailsList")
                {
                    payIcon.Visible    = false;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = false;
                    removeIcon.Visible = false;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = false;
                    Log.Visible        = false;
                    returnIcon.Visible = true;
                }
                if (Request["type1"] == "RepZdzfDetailsList")
                {
                    payIcon.Visible    = false;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = false;
                    removeIcon.Visible = false;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = false;
                    Log.Visible        = false;
                    returnIcon.Visible = true;
                }
                //支付
                if (Request["type1"] == "orderpaylist")
                {
                    payIcon.Visible    = true;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = false;
                    removeIcon.Visible = false;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = false;
                    Log.Visible        = false;
                    returnIcon.Visible = true;
                }
                if (Request["type1"] == "UserList")
                {
                    payIcon.Visible    = false;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = false;
                    removeIcon.Visible = false;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = false;
                    Log.Visible        = true;
                    returnIcon.Visible = true;
                }
                if (Request["type1"] == "ReceivingList")
                {
                    payIcon.Visible    = false;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = true;
                    removeIcon.Visible = false;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = true;
                    //this.Exp.Attributes.Add("style", "display:inline-block;");
                    Log.Visible        = true;
                    returnIcon.Visible = true;
                }
                if (Request["type1"] == "ReceivingList1")
                {
                    payIcon.Visible    = false;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = false;
                    removeIcon.Visible = false;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = true;
                    //this.Exp.Attributes.Add("style", "display:inline-block;");
                    Log.Visible        = true;
                    returnIcon.Visible = true;
                }
                if (Request["type1"] == "ReturnOrderList1")
                {
                    payIcon.Visible    = false;
                    prnIcon.Visible    = false;
                    offIcon.Visible    = false;
                    copyIcon.Visible   = false;
                    SingIcon.Visible   = false;
                    removeIcon.Visible = true;
                    DelIcon.Visible    = false;
                    editIcon.Visible   = false;
                    Exp.Visible        = false;
                    Log.Visible        = true;
                    returnIcon.Visible = true;
                }
                #endregion
            }
        }
        else
        {
            Response.Redirect("../NoOperable.aspx");
            return;
        }
    }
コード例 #5
0
ファイル: OrderReturnInfo.aspx.cs プロジェクト: kkwkk/ybyzt
    /// <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();
        }
    }
コード例 #6
0
    public void Bind()
    {
        //取消按钮显示
        //this.btnRemove.Attributes.Add("style", "display:none;");
        //this.btnRemove.Style["display"] = "none";

        Hi.Model.DIS_Order OrderInfoModel = OrderInfoBll.GetModel(KeyID);

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

            this.lblOtype.InnerText     = OrderInfoType.OType(OrderInfoModel.Otype);
            this.lblReceiptNo.InnerText = OrderInfoModel.ReceiptNo;
            this.lblRemark.InnerText    = OrderInfoModel.Remark;

            this.hidAddrId.Value   = OrderInfoModel.AddrID.ToString();
            this.lblAddr.InnerText = OrderInfoModel.Address;

            this.lblCreateDate.InnerText = OrderInfoModel.CreateDate.ToString("yyyy-MM-dd");
            this.lblOState.InnerText     = OrderInfoType.OState(OrderInfoModel.ID);
            this.lblPayState.InnerText   = OrderInfoType.PayState(OrderInfoModel.PayState);

            this.lblTotalPrice.InnerText = OrderInfoModel.TotalAmount.ToString("0.00");
            //this.lblOtherAmount.InnerText = OrderInfoModel.OtherAmount.ToString("0.00");
            this.lblPayedPrice.InnerText = OrderInfoModel.PayedAmount.ToString("0.00");

            this.lblDisUser.InnerText    = Common.GetUserName(OrderInfoModel.DisUserID);
            this.lblArriveDate.InnerText = OrderInfoModel.ArriveDate == DateTime.MinValue ? "" : OrderInfoModel.ArriveDate.ToString("yyyy-MM-dd");

            BindOrderDetail(OrderInfoModel.DisID);

            if (OrderInfoModel.OState == (int)Enums.OrderState.退回)
            {
                //this.Remove.Attributes.Add("style", "display:none;"); //取消订单
                //this.Return.Attributes.Add("style", "display:none;"); //退回
                //this.Edit.Attributes.Add("style", "display:inline-block;");   //编辑
                //this.Del.Attributes.Add("style", "display:none;");  //删除
                this.Shipping.Attributes.Add("style", "display:none;"); //发货
                //this.Clearing.Attributes.Add("style", "display:none;");  //去结算
                //this.PrePayMonery.Attributes.Add("style", "display:none;"); //预收款申请
                //this.Submit.Attributes.Add("style", "display:inline-block;");  //提交
                this.Audit.Attributes.Add("style", "display:none;");  //审核
            }
            if (OrderInfoModel.OState == (int)Enums.OrderState.未提交)
            {
                //this.Remove.Attributes.Add("style", "display:none;");
                //this.Return.Attributes.Add("style", "display:none;");
            }
            if (OrderInfoModel.OState == (int)Enums.OrderState.待审核)
            {
                //this.Edit.Attributes.Add("style", "display:none;");
                //this.Del.Attributes.Add("style", "display:none;");
                this.Shipping.Attributes.Add("style", "display:none;");
                //this.Clearing.Attributes.Add("style", "display:none;");
                //this.PrePayMonery.Attributes.Add("style", "display:none;");
                //this.Submit.Attributes.Add("style", "display:none;");

                //this.Return.Attributes.Add("style", "display:inline-block;");
                this.Audit.Attributes.Add("style", "display:inline-block;");
                //this.Remove.Attributes.Add("style", "display:inline-block;");
            }
            if (OrderInfoModel.OState < (int)Enums.OrderState.待审核 || OrderInfoModel.OState > (int)Enums.OrderState.已审)
            {
                //this.Return.Attributes.Add("style", "display:none;");
                this.Audit.Attributes.Add("style", "display:none;");
                this.Shipping.Attributes.Add("style", "display:none;");
                //this.Clearing.Attributes.Add("style", "display:none;");
                //this.PrePayMonery.Attributes.Add("style", "display:none;");
            }
            if (OrderInfoModel.OState == (int)Enums.OrderState.已审)
            {
                //this.Return.Attributes.Add("style", "display:none;");
                this.Audit.Attributes.Add("style", "display:none;");
                //this.Edit.Attributes.Add("style", "display:none;");
                //this.Del.Attributes.Add("style", "display:none;");
                //this.Submit.Attributes.Add("style", "display:none;");

                //this.Remove.Attributes.Add("style", "display:inline-block;");

                if (OrderInfoModel.Otype == (int)Enums.OType.赊销订单)
                {
                    //this.Clearing.Attributes.Add("style", "display:none;");
                    //this.PrePayMonery.Attributes.Add("style", "display:none;");
                    this.Shipping.Attributes.Add("style", "display:inline-block;");
                }
                else
                {
                    if (OrderInfoModel.PayState > (int)Enums.PayState.未支付)
                    {
                        //this.Clearing.Attributes.Add("style", "display:none;");
                        //this.PrePayMonery.Attributes.Add("style", "display:none;");

                        this.Shipping.Attributes.Add("style", "display:inline-block;");
                    }
                    else
                    {
                        //this.Clearing.Attributes.Add("style", "display:none;");
                        //this.PrePayMonery.Attributes.Add("style", "display:none;");

                        this.Shipping.Attributes.Add("style", "display:none;");
                    }
                }
            }
            if (OrderInfoModel.OState == (int)Enums.OrderState.已作废)
            {
                //this.Return.Attributes.Add("style", "display:none;");
                //this.Remove.Attributes.Add("style", "display:none;");
                this.Shipping.Attributes.Add("style", "display:none;");
                //this.Submit.Attributes.Add("style", "display:none;");

                //if (OrderInfoModel.PayState > (int)Enums.PayState.未支付)
                //{
                //    this.Clearing.Attributes.Add("style", "display:none;");
                //    this.PrePayMonery.Attributes.Add("style", "display:none;");
                //}
            }
        }
    }
コード例 #7
0
    public void Bind()
    {
        //取消按钮显示

        if (KeyID > 0)
        {
            Hi.Model.DIS_Order OrderInfoModel = OrderInfoBll.GetModel(KeyID);
            //if (Request["showtype"] == "PayZdblList")
            //{
            //    zd.InnerText = "账单查询详细";
            //}
            //if (Request["showtype"] == "PaymentZdblcxList")
            //{
            //    //zd.InnerText = "账单补录详细";
            //}
            string PostType = string.Empty;
            if (Request["PostType"] != null)
            {
                PostType = Request["PostType"].ToString();
            }

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

                this.lblReceiptNo.InnerText = OrderInfoModel.ReceiptNo;
                this.lblRemark.InnerText    = OrderInfoModel.Remark;
                this.lblAddr.InnerText      = OrderInfoModel.vdef2;

                this.lblCreateDate.InnerText = OrderInfoModel.CreateDate == DateTime.MinValue ? "" : OrderInfoModel.CreateDate.ToString("yyyy-MM-dd");
                this.lblOState.InnerText     = OrderInfoType.OState(OrderInfoModel.ID);
                this.lblPayState.InnerText   = OrderInfoType.PayState(OrderInfoModel.PayState);
                if (OrderInfoModel.PayState == (int)Enums.PayState.未支付)
                {
                    this.lblPayState.Attributes.Add("style", "Color:Red");
                }
                else
                {
                    this.lblPayState.Attributes.Add("style", "Color:green");
                }


                this.lblTotalPrice.InnerText = OrderInfoModel.AuditAmount.ToString("N");
                this.lblPayedPrice.InnerText = OrderInfoModel.PayedAmount.ToString("N");

                this.lblDisUser.InnerText    = Common.GetUserName(OrderInfoModel.DisUserID);
                this.lblArriveDate.InnerText = OrderInfoModel.ArriveDate == DateTime.MinValue ? "" : OrderInfoModel.ArriveDate.ToString("yyyy-MM-dd");

                if (!PostType.Equals("1"))
                {
                    if (OrderInfoModel.OState == (int)Enums.OrderState.退回)
                    {
                        this.Remove.Visible = false;
                        this.Edit.Visible   = true;
                    }
                    if (OrderInfoModel.OState == (int)Enums.OrderState.未提交)
                    {
                        this.Remove.Visible = false;
                    }
                    if (OrderInfoModel.OState == (int)Enums.OrderState.待审核)
                    {
                        if (OrderInfoModel.AddType != (int)Enums.AddType.企业补单)
                        {
                            this.Edit.Visible = false;
                        }
                        this.Remove.Visible = true;
                    }
                    if (OrderInfoModel.OState == (int)Enums.OrderState.已审)
                    {
                        this.Edit.Visible = false;
                        if (OrderInfoModel.PayState == (int)Enums.PayState.未支付)
                        {
                            this.Remove.Visible = true;
                        }
                        else
                        {
                            this.Remove.Visible = false;
                        }
                    }
                    if (OrderInfoModel.OState == (int)Enums.OrderState.已作废)
                    {
                        this.Remove.Visible    = false;
                        this.CopyOrder.Visible = false;
                        this.Edit.Visible      = false;
                    }
                    if (OrderInfoModel.OState > (int)Enums.OrderState.退货处理 && OrderInfoModel.OState < (int)Enums.OrderState.已到货)
                    {
                        this.Remove.Visible    = false;
                        this.CopyOrder.Visible = false;
                        this.Edit.Visible      = false;
                    }
                    if ((OrderInfoModel.OState >= (int)Enums.OrderState.退货处理 && OrderInfoModel.ReturnState != (int)Enums.ReturnState.未退货) && OrderInfoModel.OState <= (int)Enums.OrderState.已退货)
                    {
                        this.Remove.Visible    = false;
                        this.CopyOrder.Visible = false;
                        this.Edit.Visible      = false;
                    }
                }
                else
                {
                    this.Remove.Visible    = false;
                    this.CopyOrder.Visible = false;
                    this.Edit.Visible      = false;
                }
                if (PostType.Equals("3"))
                {
                    btn.Visible = false;
                    this.btnright.Attributes.Add("style", "margin-top:0px; margin-left:0px; width:auto;");
                    //btntitle.Visible = false;
                    this.lblpaytime.InnerText = Request["Date"] == null ? "" : Request["Date"].ToString();
                    this.paytime1.Visible     = true;
                    this.paytime2.Visible     = true;
                }
                else
                {
                    this.state.Attributes.Add("colspan", "5");
                }
            }
        }
        else
        {
            Response.Write("数据错误!");
            Response.End();
        }
    }