コード例 #1
0
ファイル: FByod.cs プロジェクト: WenaDaisy/AndersonForms
        public Byod Approve(Byod byod)
        {
            EByod eByod = EByod(byod);

            eByod = _iDByod.Approve(eByod);
            return(Byod(eByod));
        }
コード例 #2
0
ファイル: FByod.cs プロジェクト: WenaDaisy/AndersonForms
        public Byod Update(Byod byod)
        {
            EByod eByod = EByod(byod);

            eByod = _iDByod.Update(eByod);
            return(Byod(eByod));
        }
コード例 #3
0
        public Byod Update(Byod byod)
        {
            EByod eByod = EByod(byod);

            eByod.UpdatedDate = DateTime.Now;
            eByod             = _iDByod.Update(eByod);
            return(Byod(eByod));
        }
コード例 #4
0
ファイル: FByod.cs プロジェクト: WenaDaisy/AndersonForms
        public Byod Create(Byod byod)
        {
            EByod eByod = EByod(byod);

            eByod = _iDByod.Create(eByod);
            //var account = _iFUser.ReadUser(Username);
            return(Byod(eByod));
        }
コード例 #5
0
 public ActionResult Update(Byod byod)
 {
     try
     {
         byod = _iFByod.Update(byod);
         return(RedirectToAction("Index", "Byod"));
     }
     catch (Exception ex)
     {
         return(View(byod));
     }
 }
コード例 #6
0
 public ActionResult Update(int id)
 {
     try
     {
         Byod byod = _iFByod.Read(id);
         return(View(byod));
     }
     catch (Exception ex)
     {
         return(View(new Byod()));
     }
 }
コード例 #7
0
 public ActionResult Update(int id)
 {
     try
     {
         Byod byod = _iFByod.Read(id);
         return View(byod);
     }
     catch
     {
         return View(new Byod());
     }
 }
コード例 #8
0
 public ActionResult Approve(Byod byod)
 {
     try
     {
         byod = _iFByod.Approve(byod);
         return(RedirectToAction("Byod"));
     }
     catch (Exception ex)
     {
         return(View(byod));
     }
 }
コード例 #9
0
 public ActionResult Delete(Byod byod)
 {
     try
     {
         _iFByod.Delete(byod);
         return(Json(""));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }
コード例 #10
0
        public ActionResult Update(Byod byod)
        {

            try
            {
                byod = _iFByod.Update(byod);

                return RedirectToAction("Index");
            }
            catch
            {
                return View(byod);
            }
        }
コード例 #11
0
ファイル: FByod.cs プロジェクト: WenaDaisy/AndersonForms
 private EByod EByod(Byod byod)
 {
     return(new EByod
     {
         ApprovedBy = byod.ApprovedBy,
         ApproverId = byod.ApproverId,
         ByodId = byod.ByodId,
         EmployeeId = byod.EmployeeId,
         RequestedBy = byod.RequestedBy,
         TypeOfDeviceId = byod.TypeOfDeviceId,
         BrandName = byod.BrandName,
         ContactNo = byod.ContactNo,
         Email = byod.Email,
         SerialNumber = byod.SerialNumber,
     });
 }
コード例 #12
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));
     }
 }
コード例 #13
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));
     }
 }
コード例 #14
0
ファイル: FByod.cs プロジェクト: WenaDaisy/AndersonForms
        public void Delete(Byod byod)
        {
            EByod eByod = EByod(byod);

            _iDByod.Delete(eByod);
        }