Exemplo n.º 1
0
 /// <summary>
 /// Получение вьюмодели для реестра заявок
 /// </summary>
 /// <returns></returns>
 public StaffMovementsListModel GetListModel()
 {
     StaffMovementsListModel model = new StaffMovementsListModel();
     model.BeginDate =new DateTime( DateTime.Now.Year,DateTime.Now.Month,1);
     model.Types = StaffMovementsTypesDao.LoadAll().Select(x => new IdNameDto { Id = x.Id, Name = x.Name }).ToList();
     model.Types.Add(new IdNameDto { Id = 0, Name = "Все" });
     model.TypeId = 0;
     model.Statuses = StaffMovementsStatusDao.LoadAll().Select(x => new IdNameDto { Id = x.Id, Name = x.Name }).ToList();
     model.Statuses.Add(new IdNameDto { Id = 0, Name = "Все" });
     model.Status = 0;
     return model;
 }
Exemplo n.º 2
0
 public ContentResult Index(StaffMovementsListModel model)
 {
     var docs=StaffMovementsBl.GetDocuments(model.DepartmentId, model.UserName, model.Number.HasValue?model.Number.Value:0, model.Status, model.TypeId);
     return Content(Newtonsoft.Json.JsonConvert.SerializeObject(docs));
 }