Beispiel #1
0
        public JsonResult LoadCategoryByType(int type)
        {
            var objType = _systemService.CategoryStockList(type);
            var obgType = new SelectList(objType, "Id", "Name", 0);

            return(Json(obgType));
        }
        public ActionResult DynamicProject()
        {
            var model    = new DynamicProjectReportViewModel();
            var projects = _systemService.ProjectList();

            model.ProjectIds      = projects;
            model.ProjectNames    = projects;
            model.Suppliers       = _systemService.SupplierList();
            model.StockTypes      = _systemService.TypeStockList();
            model.StockCategories = _systemService.CategoryStockList(0);
            return(View(model));
        }
        public ActionResult Index()
        {
            var userName = System.Web.HttpContext.Current.User.Identity.Name;
            var user     = this._systemService.GetUserAndRole(0, userName);

            if (user == null)
            {
                return(RedirectToAction("Index", "Login"));
            }
            if (user.StockServiceR == 0)
            {
                return(RedirectToAction("Index", "Home"));
            }
            var model = new ServiceViewModel
            {
                UserLogin  = user,
                Stores     = new SelectList(_systemService.StoreList(), "Id", "Name"),
                Categories = new SelectList(_systemService.CategoryStockList(0), "Id", "Name")
            };

            return(View(model));
        }