//
        // GET: /ManageEmployee/
        public ActionResult Index()
        {
            var Db = new ApricotContext();
            FillFullEmployee gfemp = new FillFullEmployee(Db);
            var fullemployees      = gfemp.GetAllFullEmployee();

            return(View(fullemployees));
        }
        public ActionResult Create(FullEmployee model)
        {
            if (ModelState.IsValid)
            {
                var Db = new ApricotContext();
                FillFullEmployee Fillfemp = new FillFullEmployee(Db);
                Fillfemp.CreateFullEmployee(model);

                return(RedirectToAction("index"));
            }
            return(View(model));
        }
        public ActionResult Edit(FullEmployee model)
        {
            if (ModelState.IsValid)
            {
                var Db = new ApricotContext();
                FillFullEmployee Fillfemp = new FillFullEmployee(Db);
                Fillfemp.EditFullEmployee(model);

                return(RedirectToAction("Index", "ManageEmployee"));
            }

            return(View(model));
        }
        public ActionResult Edit(Int64 id)
        {
            var Db = new ApricotContext();
            FillFullEmployee fillFullEmployee = new FillFullEmployee(Db);
            FullEmployee     fullEmployee     = new FullEmployee();

            fullEmployee = fillFullEmployee.GetFullEmployeeByEmpNumber(id);
            List <Department> departments = new List <Department>();

            //Get All Departments
            DepartmentRepository departmentRepo = new DepartmentRepository(Db);

            departments = departmentRepo.GetAll().ToList();
            var departmentList = new List <String>(0);

            foreach (var department in departments)
            {
                departmentList.Add(department.Dept_ID.ToString() + " - " + department.Dept_Name);
            }

            ViewBag.DepartmentList = departmentList;

            return(View(fullEmployee));
        }