Пример #1
0
        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());
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
                }
            }
        }
Пример #5
0
 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());
 }