public IActionResult OnGet(string userId) { if (userId == "") { return(NotFound()); } _ApplicationUser = _queries.GetApplicationUserIncludeServiceLst(userId); if (_ApplicationUser == null) { return(NotFound()); } return(Page()); }
public IActionResult OnGetAsync(Guid?quotationId = null) { if (quotationId == null) { return(Page()); } _AddQuotationToEmployeeVM = new AddQuotationToEmployeeVM(); _AddQuotationToEmployeeVM.QuotationIdLocal = (Guid)quotationId; var quotationLocal = _queries.GetQuoationIncludeOrderDetailsServiceApplicationUserFirstOrDefaultWhereQuotationIdEquals((Guid)quotationId); var employer = _queries.GetApplicationUserIncludeServiceLst(quotationLocal.OrderDetails.Service.ApplicationUser.Id); var localEmployeeUserLst = _queries.GetAllEmployeesIncludeServiceLstEmployedByWhereEmployedByIdEquals(employer.Id); _AddQuotationToEmployeeVM.OrderDetailsId = quotationLocal.OrderDetails.Id; foreach (var item in localEmployeeUserLst) { if (item.EmployedBy == employer) { _AddQuotationToEmployeeVM.EmployeeUsrLst.Add(item); } } return(Page()); }
private EmployeeUser setEmployeesAttributes(RegisterEmployeeVM _RegisterEmployee) { var _userEmployee = new EmployeeUser(); _userEmployee.UserName = _RegisterEmployee.email; _userEmployee.Email = _RegisterEmployee.email; _userEmployee.Name = _RegisterEmployee.Nombre; var Employer = _queries.GetApplicationUserIncludeServiceLst(_RegisterEmployee.idEmpleador); _userEmployee.EmployedBy = Employer; return(_userEmployee); }
private void LoadEmployeeLst(string employersId) { var localEmployeeUserLst = _queries.GetLstEmployeesIncludeServiceList(); _ManageEmployeesVM.EmployeeUsrLst = new List <EmployeeUser>(); var employer = _queries.GetApplicationUserIncludeServiceLst(employersId.ToString()); foreach (var item in localEmployeeUserLst) { if (item.EmployedBy == employer) { _ManageEmployeesVM.EmployeeUsrLst.Add(item); } } }
public async Task <IActionResult> OnGet(string EmployersId) { if (EmployersId != null) { Input = new InputModel() { serviceLst = new List <Service>() }; var Employer = _queries.GetApplicationUserIncludeServiceLst(EmployersId); Input.serviceLst = Employer.ServiceLst; Input.idEmpleador = Employer.Id; return(Page()); } return(Page()); }