public List <DesignationModel> GetAllDesignations() { DesignationGateway aDesignationGateway = new DesignationGateway(); List <DesignationModel> designations = new List <DesignationModel>(); designations = aDesignationGateway.GetAllDesignations(); return(designations); }
public DesignationModel GetDesignationById(int designationId) { DesignationGateway aDesignationGateway = new DesignationGateway(); DesignationModel aDesignationModel = new DesignationModel(); aDesignationModel = aDesignationGateway.GetDesignationById(designationId); return(aDesignationModel); }
// GET: Teacher/Save public ViewResult Save() { TeacherViewModel viewModel = new TeacherViewModel { Designations = DesignationGateway.GetAllDesignations(), Departments = DepartmentGateway.GetAllDepartments() }; ViewBag.msg = ""; return(View(viewModel)); }
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")); }
public List <Designation> GetAll() { aDesignationGateway = new DesignationGateway(); return(aDesignationGateway.GetAll()); }
public List <Designation> GetAllDesignations() { DesignationGateway DesGate = new DesignationGateway(); return(DesGate.GetAllDesignations()); }
public DesignationManager() { aDesignationGateway = new DesignationGateway(); }
public DesignationManager() { designationGateway = new DesignationGateway(); userGateway = new UserGateway(); }