コード例 #1
0
        public List <DesignationModel> GetAllDesignations()
        {
            DesignationGateway      aDesignationGateway = new DesignationGateway();
            List <DesignationModel> designations        = new List <DesignationModel>();

            designations = aDesignationGateway.GetAllDesignations();
            return(designations);
        }
コード例 #2
0
        // GET: Teacher/Save
        public ViewResult Save()
        {
            TeacherViewModel viewModel = new TeacherViewModel
            {
                Designations = DesignationGateway.GetAllDesignations(),
                Departments  = DepartmentGateway.GetAllDepartments()
            };

            ViewBag.msg = "";
            return(View(viewModel));
        }
コード例 #3
0
        public ActionResult Save(Teacher teacher)
        {
            TeacherViewModel viewModel = new TeacherViewModel
            {
                Designations = DesignationGateway.GetAllDesignations(),
                Departments  = DepartmentGateway.GetAllDepartments()
            };

            if (!ModelState.IsValid)
            {
                viewModel.Teacher = teacher;
                return(View(viewModel));
            }

            int rowAffected = TeacherGateway.Save(teacher);

            if (rowAffected > 0)
            {
                return(Redirect("Save"));
            }

            return(View("~/Views/Shared/_BadRequest"));
        }
コード例 #4
0
        public List <Designation> GetAllDesignations()
        {
            DesignationGateway DesGate = new DesignationGateway();

            return(DesGate.GetAllDesignations());
        }
コード例 #5
0
 public List <Designation> GetAllDesignations()
 {
     return(designationGateway.GetAllDesignations());
 }
コード例 #6
0
        public List <Designation> GetAllDesignations()
        {
            DesignationGateway aDesignationGateway = new DesignationGateway();

            return(aDesignationGateway.GetAllDesignations());
        }
 public List <Designation> GetAllDesignationsManager()
 {
     return(aDesignationGateway.GetAllDesignations());
 }
コード例 #8
0
 public List <TeacherDesignation> GetAllDesignations()
 {
     return(_designationGateway.GetAllDesignations());
 }