Пример #1
0
 public ActionResult Add(Byod byod)
 {
     try
     {
         //var account = _iFUser.ReadUser(Username);
         //byod.EmployeeId = account.EmployeeId;
         //byod.RequestedBy = account.EmployeeId;
         //var employee = _iFEmployee.Read(account.EmployeeId);
         //byod.ApproverId = employee.ManagerEmployeeId;
         byod = _iFByod.Create(byod);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         return(Json(byod));
     }
 }
Пример #2
0
 public ActionResult Create(Byod byod)
 {
     try
     {
         var account = CurrentUser;
         byod.EmployeeId  = account.EmployeeId;
         byod.RequestedBy = account.UserId;
         byod.CreatedBy   = account.UserId;
         if (account.EmployeeId != 0)
         {
             var employee = _iFEmployee.Read(account.EmployeeId);
             byod.ApproverId = employee.ManagerEmployeeId;
         }
         byod = _iFByod.Create(byod);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }