Esempio n. 1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Payment = await _context.Payment.FirstOrDefaultAsync(m => m.PaymentId == id);

            if (Payment == null)
            {
                return(NotFound());
            }
            foreach (Employee staff in _context.Employee.ToList())
            {
                StaffMembers.Add(staff.EmployeeId, staff.Identification);
            }

            foreach (RentalContract rc in _context.RentalContract.ToList())
            {
                LoansContracts.Add(rc.RentalContractId, rc.Description);
            }

            return(Page());
        }
        //Methods
        private void AddPerson(string name)
        {
            Staff newMember = new Staff()
            {
                Name     = name,
                IsActive = true
            };

            newMember.ID = _ss.AddStaffMember(newMember);
            StaffMembers.Add(newMember);
            NewPersonName = "";

            _ea.GetEvent <StatusEvent>().Publish(new StatusPayload("Staff Member Added.", Palette.AlertGreen));
        }
Esempio n. 3
0
        public IActionResult OnGet()
        {
            foreach (Employee staff in _context.Employee.ToList())
            {
                StaffMembers.Add(staff.EmployeeId, staff.Identification);
            }

            foreach (RentalContract rc in _context.RentalContract.ToList())
            {
                LoansContracts.Add(rc.RentalContractId, rc.Description);
            }

            return(Page());
        }
Esempio n. 4
0
        public IActionResult OnGet()
        {
            MaritalsStatus.Add(new SelectListItem()
            {
                Text = "Unknown", Value = "Unknown"
            });
            MaritalsStatus.Add(new SelectListItem()
            {
                Text = "Single", Value = "Single"
            });
            MaritalsStatus.Add(new SelectListItem()
            {
                Text = "Widdow", Value = "Widdow"
            });
            MaritalsStatus.Add(new SelectListItem()
            {
                Text = "Married", Value = "Married"
            });
            MaritalsStatus.Add(new SelectListItem()
            {
                Text = "Divorced", Value = "Divorced"
            });
            MaritalsStatus.Add(new SelectListItem()
            {
                Text = "Separated", Value = "Separated"
            });

            ViewData["MaritalStatus"] = MaritalsStatus;

            foreach (Employee staff in _context.Employee.ToList())
            {
                StaffMembers.Add(staff.EmployeeId, staff.Identification);
            }

            foreach (Apartment aprt in _context.Apartment.ToList())
            {
                Residences.Add(aprt.ApartmentId, aprt.Residence);
            }

            return(Page());
        }
        async Task ExecuteLoadItemsCommand()
        {
            IsBusy = true;

            try
            {
                StaffMembers.Clear();
                var items = await StaffService.GetStaffsAsync(true);

                foreach (var item in items)
                {
                    StaffMembers.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Esempio n. 6
0
 public void AddStaff(StaffMember staffMember)
 {
     StaffMembers.Add(staffMember);
 }