示例#1
0
 public List <EmployeeViewModel> Read(EmployeeBindingModel model)
 {
     if (model.Id.HasValue)
     {
         return(new List <EmployeeViewModel> {
             _employeeStorage.GetElement(model)
         });
     }
     return(_employeeStorage.GetFullList());
 }
示例#2
0
 public List <EmployeeVM> Read(EmployeeBM model)
 {
     if (model == null)
     {
         return(_employeeStorage.GetFullList());
     }
     if (model.Id.HasValue)
     {
         return(new List <EmployeeVM> {
             _employeeStorage.GetElement(model)
         });
     }
     return(_employeeStorage.GetFilteredList(model));
 }
示例#3
0
        public IActionResult List()
        {
            var model = _storage.GetFullList();

            return(View(model));
        }
示例#4
0
 public IActionResult Create()
 {
     ViewBag.Buyers    = _buyerStorage.GetFullList();
     ViewBag.Employees = _employeeStorage.GetFullList();
     return(View());
 }