Пример #1
0
        public ActionResult Index(int?bureauId)
        {
            var bureau = _payrollBureauBusinessService.RetrieveBureau(bureauId.Value);
            var model  = new BaseViewModel
            {
                BureauId   = bureau.BureauId,
                BureauName = bureau.Name,
            };

            return(View(model));
        }
Пример #2
0
 public ActionResult List(string searchTerm, Paging paging, List <OrderBy> orderBy)
 {
     try
     {
         var result = _payrollBureauBusinessService.RetrieveBureau(searchTerm, orderBy, paging);
         return(this.JsonNet(result));
     }
     catch (Exception ex)
     {
         return(this.JsonNet(ex));
     }
 }
Пример #3
0
        public ActionResult Edit(int bureauId)
        {
            var bureau = _payrollBureauBusinessService.RetrieveBureau(bureauId);

            if (bureau == null)
            {
                return(RedirectToAction("NotFound", "Error"));
            }
            var model = new BureauViewModel {
                Bureau = bureau
            };

            return(View(model));
        }
Пример #4
0
        public ActionResult Users(int bureauId)
        {
            var bureau = _payrollBureauBusinessService.RetrieveBureau(bureauId);
            var model  = new BaseViewModel
            {
                BureauId   = bureauId,
                BureauName = bureau.Name
            };

            return(View(model));
        }
Пример #5
0
        public ActionResult Index()
        {
            var userId = User.Identity.GetUserId();
            var model  = new BaseViewModel();

            if (User.IsEmployer())
            {
                var data = _payrollBureauBusinessService.RetrieveEmployer(userId);
                model.EmployerId   = data.EmployerId;
                model.EmployerName = data.Name;
            }
            if (User.IsBureau())
            {
                var data = _payrollBureauBusinessService.RetrieveBureau(userId);
                model.BureauId   = data.BureauId;
                model.BureauName = data.Name;
            }

            return(View(model));
        }