Ejemplo n.º 1
0
        public ActionResult AllStaff()
        {
            var repo     = new StaffRepository();
            var allStaff = repo.GetAllStaff();

            return(View(allStaff));
        }
        private void StaffControl_Load(object sender, EventArgs e)
        {
            List <Staff> all = _sr.GetAllStaff();

            foreach (Staff s in all)
            {
                dgvData.Rows.Add(s.Id, s.FirstName, s.LastName, s.Address1, s.Address2, s.City, s.Country, s.PostalCode,
                                 s.PhoneNumber, s.Qualification, s.Username, s.Password);
            }
        }