Ejemplo n.º 1
0
        //添加消费订单  兑/减积分
        public ActionResult InsertConsumeGavePoint(ConsumeOrders c)
        {
            MPMS.Models.Users user = Session["UserInfo"] as MPMS.Models.Users;
            var U_ID          = user.U_ID;
            var S_ID          = user.S_ID;
            var CO_CreateTime = Request.Form["CO_CreateTime"];
            var CO_OrderType  = 3;
            var MC_ID         = Request.Form["MC_ID"];
            var MC_CardID     = Request.Form["MC_CardID"];
            var CO_GavePoint  = Request.Form["CO_GavePoint"]; //兑减积分
            var CO_Remark     = Request.Form["CO_Remark"];    //备注

            c.CO_CreateTime = DateTime.Parse(CO_CreateTime);
            c.CO_OrderType  = byte.Parse(CO_OrderType.ToString());
            c.MC_ID         = int.Parse(MC_ID);
            c.MC_CardID     = MC_CardID;
            c.U_ID          = int.Parse(U_ID.ToString());
            c.S_ID          = int.Parse(S_ID.ToString());
            c.CO_GavePoint  = int.Parse(CO_GavePoint);
            c.CO_Remark     = CO_Remark;

            db.ConsumeOrders.InsertOnSubmit(c);
            db.SubmitChanges();
            return(Content("OK"));
        }
Ejemplo n.º 2
0
        //添加消费订单  快速消费
        public ActionResult InsertConsume(ConsumeOrders c)
        {
            MPMS.Models.Users user = Session["UserInfo"] as MPMS.Models.Users;
            var U_ID             = user.U_ID;
            var S_ID             = user.S_ID;
            var CO_TotalMoney    = Request.Form["CO_TotalMoney"];
            var CO_DiscountMoney = Request.Form["CO_DiscountMoney"];
            var CO_CreateTime    = Request.Form["CO_CreateTime"];
            var CO_OrderType     = 5;
            var MC_ID            = Request.Form["MC_ID"];
            var MC_CardID        = Request.Form["MC_CardID"];

            c.CO_TotalMoney    = decimal.Parse(CO_TotalMoney);
            c.CO_DiscountMoney = decimal.Parse(CO_DiscountMoney);
            c.CO_CreateTime    = DateTime.Parse(CO_CreateTime);
            c.CO_OrderType     = byte.Parse(CO_OrderType.ToString());
            c.MC_ID            = int.Parse(MC_ID);
            c.MC_CardID        = MC_CardID;
            c.U_ID             = int.Parse(U_ID.ToString());
            c.S_ID             = int.Parse(S_ID.ToString());

            db.ConsumeOrders.InsertOnSubmit(c);
            db.SubmitChanges();
            return(Content("OK"));
        }