示例#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());
 }
示例#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());
        }
示例#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));
        }
示例#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"));
            }
        }
示例#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());
 }
示例#8
0
        private void CustomersAccount_Load(object sender, EventArgs e)
        {
            DesignationManager aDesignationManager = new DesignationManager();

            designationComboBox.DataSource = aDesignationManager.GetAll();
        }