public ActionResult Save() { ViewBag.Designation = _designationManager.GetAllDesignation(); ViewBag.Deartment = _departmentManager.GetAllDepartments(); return(View()); }
public ActionResult AddTeacher() { List <Department> aDepartments = aDepartmentManager.GetAllDepartment(); ViewBag.DepatmentList = aDepartments; List <Designation> aDesignations = aDesignationManager.GetAllDesignation(); ViewBag.DesignationList = aDesignations; return(View()); }
public ActionResult SaveTeacher() { List <Designation> designations = aDesignationManager.GetAllDesignation(); ViewBag.Designations = designations.Select(x => new SelectListItem() { Value = x.DesignationId.ToString(), Text = x.Name }); List <Department> departments = aDepartmentManager.GetAllDepartments(); ViewBag.Departments = departments.Select(x => new SelectListItem() { Value = x.DepartmentId.ToString(), Text = x.Name }); return(View()); }
public ActionResult SaveTeacher() { List <Designation> designations = designationManager.GetAllDesignation(); List <Department> departments = departmentManager.GettAllDepartment(); //new List<Department>() //{ // new Department {Id = 1,DepartmentName = "CSE"}, // new Department {Id = 2,DepartmentName = "EEE"}, // new Department {Id = 3,DepartmentName = "BBA"} //}; ViewBag.Designations = designations; ViewBag.Departments = departments; return(View()); }
public ActionResult AddTeacher() { if (Session["userType"] == null) { return(RedirectToAction("Login", "Account")); } if (Session["userType"].ToString() != "admin") { return(RedirectToAction("Index", "Home")); } List <Department> aDepartments = aDepartmentManager.GetAllDepartment(); ViewBag.DepatmentList = aDepartments; List <Designation> aDesignations = aDesignationManager.GetAllDesignation(); ViewBag.DesignationList = aDesignations; return(View()); }
protected void Page_Load(object sender, EventArgs e) { PopulateStudentsGridView(); if (!IsPostBack) { List <Designation> designation = aDesignationManager.GetAllDesignation(); designationDropDownList.DataSource = designation; designationDropDownList.DataTextField = "Name"; designationDropDownList.DataValueField = "Id"; designationDropDownList.DataBind(); } }
private List <Designation> GetAllDesignations() { var designationlist = designationManager.GetAllDesignation(); return(designationlist); }