Exemple #1
0
        public ActionResult AjaxView()
        {
            var obj = _productApi.ListProductByDeddeskIdSpa(UserItem.AgencyID, ArrId.FirstOrDefault());

            ViewBag.lstproduct = _productApi.GetListByAgency(UserItem.AgencyID);
            return(View(obj));
        }
        public ActionResult AjaxForm()
        {
            var model = new PacketItem
            {
                Sort       = 0,
                LstBedDesk = new List <BedDeskItem>(),
                LstProduct = new List <ProductItem>(),
            };

            if (DoAction == ActionType.Edit)
            {
                model = _api.GetPacketItems(ArrId.FirstOrDefault());
            }

            ViewBag.Action    = DoAction;
            ViewBag.AgencyID  = UserItem.AgencyID;
            ViewBag.BedDeskID = _bedDeskApi.GetList(UserItem.AgencyID);
            ViewBag.Product   = _productApi.GetListByAgency(UserItem.AgencyID);
            return(View(model));
        }