Ejemplo n.º 1
0
        public ActionResult FindMoveinList(int page = 1, int rows = 30)
        {
            int count;
            var list = STHouseMoveService.FindMoveinList(Request.Params, out count);

            return(ToDataGrid(list, count));
        }
Ejemplo n.º 2
0
        public ActionResult LoadDetailList(string moveId)
        {
            int    count  = 0;
            object footer = null;
            var    list   = STHouseMoveService.LoadDetailList(moveId, out count, ref footer);

            //var list = Session["orderdetails"];
            return(ToDataGrid(list, count, footer));
        }
Ejemplo n.º 3
0
        public ActionResult MoveinAdd(int?id)
        {
            var list = ListToSelect(WarehouseService.GetList().Select(o => new SelectListItem()
            {
                Value = o.StoreId, Text = o.Title
            }), emptyTitle: "请选择");

            ViewBag.outshops = list.Where(o => o.Value != Sys.CurrentUser.StoreId).ToList();
            ViewBag.inshops  = list.Where(o => o.Value == Sys.CurrentUser.StoreId).ToList();

            var obj = new Logic.Entity.HouseMove();

            if (id.HasValue)
            {
                obj = STHouseMoveService.FindById(id);
            }
            return(View(obj.IsNullThrow()));
        }
Ejemplo n.º 4
0
        public ActionResult ReBack(string ids)
        {
            var sid    = ids.Split(',');
            var houses = STHouseMoveService.FindList(o => sid.Contains(o.MoveId));

            houses.Each(o =>
            {
                o.State       = (short)HouseMoveState.已撤回;
                var houselist = BaseService <HouseMoveList> .FindList(a => a.MoveId == o.MoveId);
                houselist.Each(a =>
                {
                    a.State = (short)HouseMoveState.已撤回;
                });
                BaseService <HouseMoveList> .Update(houselist);
            });
            var re = STHouseMoveService.Update(houses);

            return(Content(re.ToJson()));
        }
Ejemplo n.º 5
0
        public ActionResult MoveOutDelivery(int?id)  //, string supplierId
        {
            var list = ListToSelect(WarehouseService.GetList().Select(o => new SelectListItem()
            {
                Value = o.StoreId, Text = o.Title
            }), emptyTitle: "请选择");

            ViewBag.outshops = list.Where(o => o.Value == Sys.CurrentUser.StoreId).ToList();
            ViewBag.inshops  = list.Where(o => o.Value != Sys.CurrentUser.StoreId).ToList();

            var obj = new Logic.Entity.HouseMove();

            if (id.HasValue)
            {
                obj = STHouseMoveService.FindById(id);
            }
            int    count   = 0;
            object footer  = null;
            var    details = STHouseMoveService.LoadDetailList(obj.MoveId, out count, ref footer);

            ViewData["Updated"]     = details.ToJson();
            Session["orderdetails"] = details;
            return(View(obj.IsNullThrow()));
        }
Ejemplo n.º 6
0
        public ActionResult MoveinAdd(HouseMove obj)
        {
            var re = STHouseMoveService.SaveOrUpdate(obj);

            return(Content(re.ToJson()));
        }
Ejemplo n.º 7
0
        public ActionResult MoveOutDelivery(string moveId, string updated, string updated2)
        {
            var op = STHouseMoveService.MoveOutDelivery(moveId, updated, updated2);

            return(Content(op.ToJson()));
        }