// GET: Employees/Create public ActionResult Create() { try { ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "Id", "Name"); ViewBag.DesignationId = new SelectList(_designationManager.GetAll(), "Id", "Title"); ViewBag.OrganizationId = new SelectList(_organizationManager.GetAll(), "Id", "Name"); ViewBag.EmployeeTypeId = new SelectList(_employeeTypeManager.GetAll(), "Id", "Type"); EmployeeViewModel employeeViewModel = new EmployeeViewModel(); employeeViewModel.DivisionList = (List <Division>)_divisionManager.GetAllDivisions(); ViewBag.DistrictDropDown = new SelectList(new[] { new SelectListItem() { Value = "", Text = "Select District" } }, "Value", "Text"); ViewBag.UpazilaDropDown = new SelectList(new[] { new SelectListItem() { Value = "", Text = "Select Upazila" } }, "Value", "Text"); return(View(employeeViewModel)); } catch (Exception ex) { return(View("Error", new HandleErrorInfo(ex, "Employees", "Create"))); } }
public ActionResult Index() { var department = _departmentManager.GetAll(); var designation = _designationManager.GetAll(); var employee = _employeeManager.Get(c => c.IsDriver == false && c.IsDeleted == false); var division = _divisionManager.GetAll(); var district = _districtManager.GetAll(); var thana = _thanaManager.GetAll(); List <EmployeeViewModel> employeeViewList = new List <EmployeeViewModel>(); foreach (var emploeedata in employee) { var employeeVM = new EmployeeViewModel(); employeeVM.Id = emploeedata.Id; employeeVM.Name = emploeedata.Name; employeeVM.ContactNo = emploeedata.ContactNo; employeeVM.Email = emploeedata.Email; employeeVM.Address1 = emploeedata.Address1; employeeVM.Address2 = emploeedata.Address2; employeeVM.LicenceNo = emploeedata.LicenceNo; employeeVM.Department = department.Where(x => x.Id == emploeedata.DepartmentId).FirstOrDefault(); employeeVM.Designation = designation.Where(x => x.Id == emploeedata.DesignationId).FirstOrDefault(); employeeVM.Division = division.Where(x => x.Id == emploeedata.DivisionId).FirstOrDefault(); employeeVM.District = district.Where(x => x.Id == emploeedata.DistrictId).FirstOrDefault(); employeeVM.Thana = thana.Where(x => x.Id == emploeedata.ThanaId).FirstOrDefault(); employeeViewList.Add(employeeVM); } return(View(employeeViewList)); }
public ActionResult Index() { var department = _departmentManager.GetAll(); var designation = _designationManager.GetAll(); var driver = _employeeManager.Get(c => c.IsDriver == true && c.IsDeleted == false); var division = _divisionManager.GetAll(); var district = _districtManager.GetAll(); var thana = _thanaManager.GetAll(); List <DriverViewModel> driverViewList = new List <DriverViewModel>(); foreach (var driverdata in driver) { var driverVm = new DriverViewModel(); driverVm.Id = driverdata.Id; driverVm.Name = driverdata.Name; driverVm.ContactNo = driverdata.ContactNo; driverVm.Email = driverdata.Email; driverVm.Address1 = driverdata.Address1; driverVm.Address2 = driverdata.Address2; driverVm.LicenceNo = driverdata.LicenceNo; driverVm.Department = department.Where(x => x.Id == driverdata.DepartmentId).FirstOrDefault(); driverVm.Designation = designation.Where(x => x.Id == driverdata.DesignationId).FirstOrDefault(); driverVm.Division = division.Where(x => x.Id == driverdata.DivisionId).FirstOrDefault(); driverVm.District = district.Where(x => x.Id == driverdata.DistrictId).FirstOrDefault(); driverVm.Thana = thana.Where(x => x.Id == driverdata.ThanaId).FirstOrDefault(); driverViewList.Add(driverVm); } return(View(driverViewList)); }
// GET: /Employee/Create public ActionResult Create() { var DepartmentsList = _departmentManager.GetAll(); var DesignationsList = _designationManager.GetAll(); ViewBag.DepartmentID = new SelectList(DepartmentsList, "DepartmentID", "DepartmentName"); ViewBag.DesignationID = new SelectList(DesignationsList, "DesignationID", "DesignationName"); return(View()); }
public IActionResult Create() { //var courseAssignToTeacher = new CourseAssignToTeacherViewModel(); //courseAssignToTeacher.Depatrtments = _departmentRepository.GetAll().Select(c => new SelectListItem //{ // Value = c.DepartmentId.ToString(), // Text = c.DepartmentName //}).ToList(); ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "DepartmentId", "DepartmentName"); return(View(/*courseAssignToTeacher*/)); }
// GET: Departments public ActionResult Index() { try { ICollection <Department> department = (ICollection <Department>)_departmentManager.GetAll(); IEnumerable <DepartmentViewModel> departmentViewModes = Mapper.Map <IEnumerable <DepartmentViewModel> >(department); return(View(departmentViewModes)); } catch (Exception ex) { ExceptionMessage(ex); return(View("Error", new HandleErrorInfo(ex, "Departments", "Index"))); } }
public ActionResult AddNewDesignation(Designation model) { if (ModelState.IsValid) { if (_iDesignationManager.Add(model)) { return(RedirectToAction("DesignationList")); } ViewBag.Message = "Failed to Save!"; return(View()); } ViewBag.DepartmentId = new SelectList(_iDepartmentManager.GetAll(), "DepartmentId", "DepartmentName"); return(View()); }
public ActionResult Create() { var department = departmentManager.GetAll().ToList(); var location = locationManager.GetAll().ToList(); UnitViewModel unit = new UnitViewModel { Departments = department, Locations = location }; return(View(unit)); }
// GET: Departments public ActionResult Index() { ICollection <Department> department = _departmentManager.GetAll(); IEnumerable <DepartmentViewModel> departmentViewModels = Mapper.Map <List <DepartmentViewModel> >(department); return(View(departmentViewModels)); }
public ICollection <SelectListItem> GetAllDepartmentLoopUpData() { return(_departmentManager.GetAll().Select(c => new SelectListItem { Value = c.Id.ToString(), Text = c.Name }).ToList()); }
public IActionResult Create() { ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "DepartmentId", "DepartmentName"); ViewBag.RoomId = new SelectList(_roomManager.GetAll(), "RoomId", "RoomNo"); ViewBag.DayId = new SelectList(_dayManager.GetAll(), "DayId", "DayName"); return(View()); }
// GET: Department public ActionResult Index() { try { var Departments = _department.GetAll(); var dlvm = new DepartmentListViewModel { departments = Departments }; return(View(dlvm)); } catch (Exception ex) { //Log exception return(View(ex.Message, "Error")); } }
public ActionResult Index() { var departments = _departmenManager.GetAll(); var designation = _designationManager.GetAll(); List <DesignationViewModel> designationList = new List <DesignationViewModel>(); foreach (var designation1 in designation) { var designationVM = new DesignationViewModel(); designationVM.Id = designation1.Id; designationVM.Name = designation1.Name; designationVM.Department = departments.Where(x => x.Id == designation1.DepartmentId).FirstOrDefault(); designationList.Add(designationVM); } return(View(designationList)); }
public void GetAllDepartments() { var deprtments = _departmentManager.GetAll(); foreach (var item in deprtments) { Console.WriteLine("CODE:" + item.Code); } }
public ActionResult Index() { var model = new DepartmentListViewModel { Departments = _departmentManager.GetAll() }; return(View(model)); }
public ActionResult ViewDepartment() { var departments = _iDepartmentManager.GetAll().ToList(); foreach (var department in departments) { department.Employees = _iEmployeeManager.GetEmpoyeeListByDepartmentId(department.DepartmentId).ToList(); } return(View(departments)); }
public ActionResult Index() { var organaization = _organaizationManager.GetAll(); var Department = _departmentManager.GetAll(); List <DepartmentViewModel> departmentVM = new List <DepartmentViewModel>(); foreach (var department in Department) { var departmentViewModel = new DepartmentViewModel(); departmentViewModel.Id = department.Id; departmentViewModel.Name = department.Name; departmentViewModel.Organaization = organaization.Where(x => x.Id == department.OrganaizationId).FirstOrDefault(); departmentVM.Add(departmentViewModel); } return(View(departmentVM)); }
public IActionResult Create() { EmployeeCreateViewModel employee = new EmployeeCreateViewModel(); employee.DepartmentItems = _departmentManager.GetAll() .Select(Department => new SelectListItem() { Text = Department.Name, Value = Department.Id.ToString() }).ToList(); return(View(employee)); }
// GET: Departments public ActionResult Index(string searchText) { try { if (searchText != null) { ICollection <Department> departments = _departmentManager.SearchByText(searchText); IEnumerable <DepartmentViewModel> departmentViewModels = Mapper.Map <IEnumerable <DepartmentViewModel> >(departments); return(View(departmentViewModels)); } else { ICollection <Department> department = (ICollection <Department>)_departmentManager.GetAll(); IEnumerable <DepartmentViewModel> departmentViewModes = Mapper.Map <IEnumerable <DepartmentViewModel> >(department); return(View(departmentViewModes)); } } catch (Exception ex) { return(View("Error", new HandleErrorInfo(ex, "Departments", "Index"))); } }
public ActionResult AddEmployee() { ViewBag.EmployeeTypeId = new SelectList(_iEmployeeTypeManager.GetAll(), "EmployeeTypeId", "EmployeeTypeName"); ViewBag.BranchId = new SelectList(_iBranchManager.GetAllBranches(), "BranchId", "BranchName"); ViewBag.DepartmentId = new SelectList(_iDepartmentManager.GetAll(), "DepartmentId", "DepartmentName"); ViewBag.DesignationId = new SelectList(_iDesignationManager.GetAll(), "DesignationId", "DesignationName"); return(View()); }
// GET: Employees/Create public ActionResult Create() { ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "Id", "Name"); ViewBag.EmployeeDesignationId = new SelectList(new[] { new SelectListItem() { Value = "", Text = "Select Designation" } }, "Value", "Text"); return(View()); }
// GET: Editor/Home public ActionResult Home() { Session.Remove("BranchId"); Session.Remove("Branch"); SummaryModel model = new SummaryModel { Clients = _iClientManager.GetAllClientDetails().ToList(), Employees = _iEmployeeManager.GetAllEmployeeWithFullInfo(), Departments = _iDepartmentManager.GetAll(), Branches = _iBranchManager.GetAllBranches(), Regions = _iRegionManager.GetAll(), Territories = _iTerritoryManager.GetAll() }; return(View(model)); }
// GET: Setup All Queue public ActionResult SetupQueue() { try { ViewBag.OrganizationCount = _organizationManager.GetAll().Count; ViewBag.DepartmentCount = _departmentManager.GetAll().Count; ViewBag.DesignationCount = _designationManager.GetAll().Count; ViewBag.EmployeeTypeCount = _employeeTypeManager.GetAll().Count; ViewBag.EmployeeCount = _employeeManager.GetAllEmployees().Count; ViewBag.DriverCount = _employeeManager.GetAllDriver().Count; ViewBag.VehicleCount = _vehicleManager.GetAll().Count; ViewBag.VehicleTypeCount = _vehicleTypeManager.GetAll().Count; return(View()); } catch (Exception ex) { ExceptionMessage(ex); return(View("Error", new HandleErrorInfo(ex, "Queue", "SetupQueue"))); } }
public ActionResult Index() { var departments = _departmentManager.GetAll(); return(View(departments)); }
public IActionResult Create() { ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "DepartmentId", "DepartmentName"); ViewBag.SemesterId = new SelectList(_semesterRepository.GetAll(), "SemesterId", "SemesterName"); return(View()); }
// GET: StudentInfoes/Create public IActionResult Create() { ViewData["DepartmentId"] = new SelectList(_iDepartmentManager.GetAll(), "Id", "Name"); return(View()); }
public JsonResult GetAllDepartmentJsonResult() { var department = _departmentManager.GetAll(); return(Json(department)); }
public IActionResult Create() { ViewBag.DepartmentId = new SelectList(_departmentManager.GetAll(), "DepartmentId", "DepartmentName"); return(View()); }
public ActionResult GetAllDepartments() { var depts = _iDepartmentManager.GetAll().ToList(); return(Json(depts, JsonRequestBehavior.AllowGet)); }
// GET: Department public ActionResult Index() { return(View(_iDepartmentManager.GetAll())); }