示例#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()));
        }
示例#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()));
 }
示例#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));
        }
示例#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;
     }
 }
示例#5
0
 // GET: Employee
 public ActionResult Index()
 {
     ViewBag.CompanyName = new SelectList(CompanyRepo.Get(), "Name", "Name");
     return(View(EmployeeRepo.Get()));
 }
示例#6
0
 public ActionResult List()
 {
     return(PartialView("_List", CompanyRepo.Get()));
 }
示例#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()));
 }