Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (function.isAjax())
        {
            M_UserInfo mu     = buser.GetLogin();
            int        oid    = Convert.ToInt32(Request.Form["oid"]);
            string     action = Request.Form["action"];
            string     result = "-1";
            //-----
            M_OrderList orderMod = orderBll.SelReturnModel(oid);
            if (mu.UserID != orderMod.Userid)
            {
                Response.Write(result); Response.Flush(); Response.End();
            }
            switch (action)
            {
            case "del":
            {
                orderBll.DelByIDS_U(oid.ToString(), mu.UserID);
                result = "1";
            }
            break;

            case "receive":
            {
                if (orderMod.Paymentstatus < (int)M_OrderList.PayEnum.HasPayed)
                {
                    break;
                }
                orderBll.UpdateByField("StateLogistics", "2", oid);
                result = "1";
            }
            break;

            case "reconver":    //还原
                orderBll.UpdateByField("Aside", "0", oid);
                result = "1";
                break;

            case "realdel":    //彻底删除
                orderBll.UpdateByField("Aside", "2", oid);
                result = "1";
                break;

            default:
                break;
            }
            Response.Write(result); Response.Flush(); Response.End();
        }
        if (!IsPostBack)
        {
            MyBind();
        }
    }
Exemple #2
0
        public int Order_API()
        {
            int    oid    = Convert.ToInt32(Request.Form["oid"]);
            string action = Request.Form["action"];
            int    result = Failed;
            //-----
            M_OrderList orderMod = orderBll.SelReturnModel(oid);

            if (mu.UserID != orderMod.Userid)
            {
                return(result);
            }
            switch (action)
            {
            case "del":
            {
                orderBll.DelByIDS_U(oid.ToString(), mu.UserID);
                result = Success;
            }
            break;

            case "receive":
            {
                if (orderMod.Paymentstatus < (int)M_OrderList.PayEnum.HasPayed)
                {
                    break;
                }
                orderBll.UpdateByField("StateLogistics", "2", oid);
                result = Success;
            }
            break;

            case "reconver":    //还原
                orderBll.UpdateByField("Aside", "0", oid);
                result = Success;
                break;

            case "realdel":    //彻底删除
                orderBll.UpdateByField("Aside", "2", oid);
                result = Success;
                break;

            default:
                break;
            }
            return(result);
        }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        buser.CheckIsLogin();
        //this.LblSiteName.Text = SiteConfig.SiteInfo.SiteName;

        this.sid = DataConverter.CLng(Request.QueryString["id"]);

        M_UserInfo info     = buser.GetLogin();
        string     UserName = info.UserName;

        if (info.IsNull)
        {
            Response.Redirect("Login.aspx");
        }
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["menu"]))
            {
                if (Request.QueryString["menu"] == "ViewOrderlist")
                {
                    Panel1.Visible = false;
                    Panel2.Visible = true;
                    Panel3.Visible = true;
                    GetViewOrderList();
                }
                else if (Request.QueryString["menu"].Equals("Aside"))
                {
                    oll.DelByIDS_U(Request.QueryString["id"], buser.GetLogin().UserID, 1);
                    GetOrderinfo();
                }
                else
                {
                    Panel1.Visible = true;
                    Panel2.Visible = false;
                    Panel3.Visible = false;
                    GetOrderinfo();
                }
            }
        }
    }
Exemple #4
0
        public int Order_API()
        {
            int    oid    = Convert.ToInt32(RequestEx["oid"]);
            string action = RequestEx["action"];
            int    result = Failed;
            //-----
            M_OrderList orderMod = orderBll.SelReturnModel(oid);

            if (mu.UserID != orderMod.Userid)
            {
                return(result);
            }
            switch (action)
            {
            case "del":
            {
                orderBll.DelByIDS_U(oid.ToString(), mu.UserID);
                orderBll.CancelOrder(orderMod);
                result = Success;
            }
            break;

            case "receive":
            {
                if (orderMod.Paymentstatus < (int)M_OrderList.PayEnum.HasPayed)
                {
                    break;
                }
                orderBll.UpdateByField("StateLogistics", "2", oid);
                if (DataConvert.CLng(orderMod.ExpressNum) > 0)
                {
                    B_Order_Exp expBll = new B_Order_Exp();
                    M_Order_Exp expMod = expBll.SelReturnModel(DataConvert.CLng(orderMod.ExpressNum));
                    if (expMod != null)
                    {
                        expMod.SignDate = DateTime.Now.ToString();
                        expBll.UpdateByID(expMod);
                    }
                }
                result = Success;
            }
            break;

            case "reconver":    //还原
            {
                orderBll.UpdateByField("Aside", "0", oid);
                result = Success;
            }
            break;

            case "realdel":    //彻底删除
            {
                orderBll.UpdateByField("Aside", "2", oid);
                result = Success;
            }
            break;

            default:
                break;
            }
            return(result);
        }