Exemplo n.º 1
0
        private void change_OrderStatus(HttpContext context)
        {
            int     tag        = DTRequest.GetFormInt("tag", 0);
            string  oID        = DTRequest.GetFormString("oID");
            int     status     = DTRequest.GetFormInt("status", 0);
            int     flag       = DTRequest.GetFormInt("flag", 0);
            byte?   lockstatus = Utils.ObjToByte(DTRequest.GetFormString("lockstatus"));
            decimal cost       = DTRequest.GetFormDecimal("cost", 0);
            string  finRemark  = DTRequest.GetFormString("finRemark");

            if (tag == 0)
            {
                context.Response.Write("{ \"msg\":\"参数错误\", \"status\":\"1\" }");
                return;
            }
            BLL.Order     bll     = new BLL.Order();
            Model.manager manager = new ManagePage().GetAdminInfo();
            string        result  = string.Empty;

            if (tag == 1)
            {
                result = bll.updateDstatus(oID, (byte)status, manager);
            }
            else if (tag == 2)
            {
                result = bll.updateFlag(oID, (byte)flag, manager);
            }
            else if (tag == 3)
            {
                result = bll.updateLockStatus(oID, lockstatus, manager);
            }
            else if (tag == 4)
            {
                result = bll.updateCost(oID, cost, manager);
            }
            else
            {
                result = bll.updateFinRemark(oID, finRemark, manager);
            }
            if (string.IsNullOrEmpty(result))
            {
                context.Response.Write("{ \"msg\":\"" + oID + "\", \"status\":\"0\" }");
                return;
            }
            context.Response.Write("{ \"msg\":\"" + result + "\", \"status\":\"1\" }");
            return;
        }