Example #1
0
        // GET : Create
        public ActionResult Create()
        {
            UserViewModel model = EmployeeRepo.GetIdByName(User.Identity.Name);

            ViewBag.Company = new SelectList(CompanyRepo.Get(), "id", "Name");
            return(PartialView("_Create", new EmployeeViewModel()));
        }
Example #2
0
 // GET: User
 public ActionResult Index()
 {
     ViewBag.Employee = new SelectList(EmployeeRepo.Get(), "FullName", "FullName");
     ViewBag.Role     = new SelectList(RoleRepo.Get(), "Name", "Name");
     ViewBag.Company  = new SelectList(CompanyRepo.Get(), "Name", "Name");
     return(View(UserRepo.Get()));
 }
Example #3
0
        //GET : Edit
        public ActionResult Edit(int id)
        {
            //UserViewModel model2 = EmployeeRepo.GetIdByName(User.Identity.Name);
            ViewBag.Company = new SelectList(CompanyRepo.Get(), "id", "Name");
            EmployeeViewModel model = EmployeeRepo.GetById(id);

            return(PartialView("_Edit", model));
        }
Example #4
0
 public Company Get(int id)
 {
     try
     {
         return(_repo.Get(id));
     }
     catch (Exception ex)
     {
         _logger.Error(String.Format("Error during CompanyService.Get({0})", id), ex);
         throw;
     }
 }
Example #5
0
 // GET: Employee
 public ActionResult Index()
 {
     ViewBag.CompanyName = new SelectList(CompanyRepo.Get(), "Name", "Name");
     return(View(EmployeeRepo.Get()));
 }
Example #6
0
 public ActionResult List()
 {
     return(PartialView("_List", CompanyRepo.Get()));
 }
Example #7
0
 // GET: Company
 public ActionResult Index()
 {
     ViewBag.Company  = new SelectList(CompanyRepo.Get(), "Code", "Code");
     ViewBag.Company1 = new SelectList(CompanyRepo.Get(), "Name", "Name");
     return(View(CompanyRepo.Get()));
 }