示例#1
0
 public ActionResult PersonnelBillingList(HelpPersonnelBillingListModel model)
 {
     bool hasError = !ValidateModel(model);
     HelpBl.SetPersonnelBillingListModel(model, hasError);
     return View(model);
 }
示例#2
0
文件: HelpBl.cs 项目: andreyu/Reports
 public HelpPersonnelBillingListModel GetPersonnelBillingList()
 {
     User user = UserDao.Load(AuthenticationService.CurrentUser.Id);
     IdNameReadonlyDto dep = GetDepartmentDto(user);
     HelpPersonnelBillingListModel model = new HelpPersonnelBillingListModel
     {
         UserId = AuthenticationService.CurrentUser.Id,
         DepartmentName = dep.Name,
         DepartmentId = dep.Id,
         //DepartmentReadOnly = dep.IsReadOnly,
     };
     SetInitialDates(model);
     SetDictionariesToModel(model);
     //SetInitialStatus(model);
     //SetIsOriginalDocsVisible(model);
     SetIsAvailable(model);
     return model;
 }
示例#3
0
文件: HelpBl.cs 项目: andreyu/Reports
 protected void SetIsAvailable(HelpPersonnelBillingListModel model)
 {
     //могут создавать задачи все кто имеет доступ к пункту меню, кроме просмотровой учетки
     model.IsAddAvailable = CurrentUser.UserRole != UserRole.OutsourcingManager || CurrentUser.UserRole != UserRole.Estimator || ((CurrentUser.UserRole & UserRole.PersonnelManager) > 0 && CurrentUser.Id == 10);
 }
示例#4
0
文件: HelpBl.cs 项目: andreyu/Reports
 public void SetPersonnelBillingListModel(HelpPersonnelBillingListModel model, bool hasError)
 {
     SetDictionariesToModel(model);
     //User user = UserDao.Load(model.UserId);
     if (hasError)
         model.Documents = new List<HelpPersonnelBillingRequestDto>();
     else
         SetDocumentsToModel(model);
 }
示例#5
0
文件: HelpBl.cs 项目: andreyu/Reports
 public void SetDocumentsToModel(HelpPersonnelBillingListModel model)
 {
     //UserRole role = CurrentUser.UserRole;
     //model.Documents = new List<HelpPersonnelBillingRequestDto>();
     model.Documents = HelpPersonnelBillingRequestDao.GetDocuments(
         CurrentUser.Id,
         CurrentUser.UserRole,
         model.DepartmentId,
         model.StatusId,
         model.BeginDate,
         model.EndDate,
         model.InitiatorUserName,
         model.WorkerUserName,
         model.Number,
         model.TitleId,
         model.UrgencyId,
         model.SortBy,
         model.SortDescending
        );
 }
示例#6
0
文件: HelpBl.cs 项目: andreyu/Reports
 public void SetDictionariesToModel(HelpPersonnelBillingListModel model)
 {
     model.Statuses = GetPersonnelBillingStatuses();
     model.Urgencies = GetPersonnelBillingUrgencies(true);
     model.Titles = GetPersonnelBillingTitles(true);
 }