public ContentResult DocumentMovementsListJson(DocumentMovementsListModel model)
 {
     var docs = DocumentMovementsBl.GetDocuments(model);
     var settings = new JsonSerializerSettings();
     settings.NullValueHandling=NullValueHandling.Ignore;
     var content = JsonConvert.SerializeObject(docs, settings);
     return Content(content);
 }
예제 #2
0
 public DocumentMovementsListModel GetListModel()
 {
     var model =  new DocumentMovementsListModel();
     model.DocTypes = DocumentMovements_DocTypesDao.LoadAll().Select(x => new IdNameDto { Name = x.Name }).ToList();
     model.IsSaveAvailable = (CurrentUser.UserRole & (UserRole.PersonnelManager)) > 0;
     model.IsAddAvailable = (CurrentUser.UserRole &(UserRole.Manager | UserRole.PersonnelManager))>0;
     return model;
 }