Exemplo n.º 1
0
 public void InsertExpenseAuditLog(ExpenseAuditTB expenseaudittb)
 {
     try
     {
         using (var _context = new DatabaseContext())
         {
             _context.ExpenseAuditTB.Add(expenseaudittb);
             _context.SaveChanges();
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 2
0
 private ExpenseAuditTB InsertExpenseAudit(int ExpenseID, int Status)
 {
     try
     {
         ExpenseAuditTB objAuditTB = new ExpenseAuditTB();
         objAuditTB.ApprovaExpenselLogID = 0;
         objAuditTB.ExpenseID = ExpenseID;
         objAuditTB.Status = Status;
         objAuditTB.CreatedOn = DateTime.Now;
         objAuditTB.Comment = string.Empty;
         objAuditTB.ApprovalUser = _IUsers.GetAdminIDbyUserID(Convert.ToInt32(Session["UserID"]));
         objAuditTB.ProcessedDate = DateTime.Now;
         objAuditTB.UserID = Convert.ToInt32(Session["UserID"]);
         return objAuditTB;
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemplo n.º 3
0
 private ExpenseAuditTB InsertExpenseAudit(ExpenseApprovalModel TimeSheetApproval, int Status)
 {
     try
     {
         ExpenseAuditTB objAuditTB = new ExpenseAuditTB();
         objAuditTB.ApprovaExpenselLogID = 0;
         objAuditTB.ExpenseID            = TimeSheetApproval.ExpenseID;
         objAuditTB.Status        = Status;
         objAuditTB.CreatedOn     = DateTime.Now;
         objAuditTB.Comment       = TimeSheetApproval.Comment;
         objAuditTB.ApprovalUser  = Convert.ToInt32(Session["AdminUser"]);
         objAuditTB.ProcessedDate = DateTime.Now;
         objAuditTB.UserID        = _IUsers.GetUserIDbyExpenseID(TimeSheetApproval.ExpenseID);
         return(objAuditTB);
     }
     catch (Exception)
     {
         throw;
     }
 }
 /// <summary>
 /// The InsertExpenseAudit
 /// </summary>
 /// <param name="ExpenseID">The ExpenseID<see cref="int"/></param>
 /// <param name="Status">The Status<see cref="int"/></param>
 /// <returns>The <see cref="ExpenseAuditTB"/></returns>
 private ExpenseAuditTB InsertExpenseAudit(int ExpenseID, int Status)
 {
     try
     {
         ExpenseAuditTB objAuditTB = new ExpenseAuditTB
         {
             ApprovaExpenselLogID = 0,
             ExpenseID            = ExpenseID,
             Status        = Status,
             CreatedOn     = DateTime.Now,
             Comment       = string.Empty,
             ApprovalUser  = _IUsers.GetAdminIDbyUserID(Convert.ToInt32(Session["UserID"])),
             ProcessedDate = DateTime.Now,
             UserID        = Convert.ToInt32(Session["UserID"])
         };
         return(objAuditTB);
     }
     catch (Exception)
     {
         throw;
     }
 }