Beispiel #1
0
 // GET: Employees/Create
 public ActionResult Create()
 {
     ViewBag.BranchId       = new SelectList(_branchManager.GetAll(), "Id", "Name");
     ViewBag.DepartmentId   = new SelectList(_departmentManager.GetAll(), "Id", "Name");
     ViewBag.DesignationId  = new SelectList(_designationManager.GetAll(), "Id", "Name");
     ViewBag.OrganizationId = new SelectList(_organizationManager.GetAll(), "Id", "Name");
     return(View());
 }
Beispiel #2
0
        public ActionResult Save()
        {
            var designations = _designationManager.GetAll() ?? new List <Designation>();
            var departments  = _departmentManager.GetAll() ?? new List <Department>();

            ViewBag.Designations = new SelectList(designations, "Id", "Name");
            ViewBag.Departments  = new SelectList(departments, "Id", "Name");
            return(View());
        }
        public ActionResult Index()
        {
            List <Department> departments = departmentManager.GetAll();

            ViewBag.departments = departments;
            List <Designation> designations = designationManager.GetAll();

            ViewBag.designations = designations;
            return(View());
        }
Beispiel #4
0
        public ActionResult Index()
        {
            ClientAddViewModel clientVm = new ClientAddViewModel();

            clientVm.DesignationSelectListItem = _designationManager.GetAll()
                                                 .Select(c => new SelectListItem()
            {
                Value = c.ID.ToString(),
                Text  = c.DesignationName
            })
                                                 .ToList();

            return(View(clientVm));
        }
Beispiel #5
0
        public IActionResult ViewAll()
        {
            var authData = HttpContext.Session.GetString("userInfo");

            if (authData != "")
            {
                User user = JsonConvert.DeserializeObject <User>(authData);

                if (userAccess.HasAccess(user.Id, -30, user.DesignationId))
                {
                    ViewBag.Designations = designationManager.GetAll();
                    return(View());
                }
                else
                {
                    return(RedirectToAction("AccessDenied", "Home"));
                }
            }
            else
            {
                HttpContext.Session.SetString("userInfo", "");

                return(RedirectToAction("Login", "LogIn"));
            }
        }
Beispiel #6
0
 public ActionResult Save()
 {
     ViewBag.Designations = designationManager.GetAll();
     ViewBag.Departments  = departmentManager.GetAll();
     return(View());
 }
 public IActionResult Index(int id)
 {
     ViewBag.Designations = designationManager.GetAll();
     return(View());
 }
Beispiel #8
0
        private void CustomersAccount_Load(object sender, EventArgs e)
        {
            DesignationManager aDesignationManager = new DesignationManager();

            designationComboBox.DataSource = aDesignationManager.GetAll();
        }