Beispiel #1
0
        public ActionResult SaveEdiEditDPS(DPS m, List <int> userType, string areaNums)
        {
            var  areaList  = areaNums.Split(',').ToList();
            var  loginUser = (UserInfo)ViewBag.User;
            Guid managerId = (Guid)ViewBag.ManagerId;

            m.CreateTime   = DateTime.Now;
            m.CreateUserId = managerId;

            var goodsItem     = _good.GetGoodsByNum(m.GoodsNum, managerId);
            var sendGoodsItem = _good.GetGoodsByNum(m.SendGoodsNum, managerId);

            if (goodsItem != null)
            {
                m.GoodsId   = goodsItem.Id;
                m.GoodsName = goodsItem.GoodsTittle;
            }

            if (sendGoodsItem != null)
            {
                m.SendGoodsId   = sendGoodsItem.Id;
                m.SendGoodsName = sendGoodsItem.GoodsTittle;
            }
            string userTypes = "";

            userType.ForEach(x =>
            {
                userTypes += x;
                userTypes += ",";
            });
            m.UserTypes = userTypes;
            _active.SaveDPS(m, areaList);
            Response.Redirect("DPSList");
            return(View());
        }