/// <summary> /// To add a new event in the credit process logs /// </summary> /// <param name="creditProcessFlowFormed"></param> /// <returns></returns> private CreditProcessLog CreateNewCreditProcessLog(CreditProcessXCompany creditProcessFlowFormed) { var creditProcessLog = new CreditProcessLog { ChangeDate = DateTime.Now, CreditProcessXCompanyId = creditProcessFlowFormed.CreditProcessXCompanyId, LastStatusId = creditProcessFlowFormed.CreditStatusId, NewStatusId = creditProcessFlowFormed.CreditStatusId, }; return(creditProcessLog); }
/// <summary> /// To add an update event in the credit process logs /// </summary> /// <param name="creditProcessFlowFormed"></param> /// <returns></returns> private CreditProcessLog UpdateCreditProcessLog(CreditProcessXCompany creditProcessFlowFormed) { var currentProcess = _creditProcessesRepository.GetCreditProcessXCompanyFlow(creditProcessFlowFormed.CreditProcessXCompanyId); var creditProcessLog = new CreditProcessLog { ChangeDate = DateTime.Now, CreditProcessXCompanyId = creditProcessFlowFormed.CreditProcessXCompanyId, LastStatusId = currentProcess.CreditStatusId, NewStatusId = creditProcessFlowFormed.CreditStatusId, }; return(creditProcessLog); }
public void EditCreditProcessLog(CreditProcessLog creditProcessLog) { _creditProcessLogsRepository.EditCreditProcessLog(creditProcessLog); }
public void AddCreditProcessLog(CreditProcessLog creditProcessLog) { _creditProcessLogsRepository.AddCreditProcessLog(creditProcessLog); }
public void EditCreditProcessLog(CreditProcessLog creditProcessLog) { _databaseModel.Entry(creditProcessLog).State = EntityState.Modified; _databaseModel.SaveChanges(); }
public void AddCreditProcessLog(CreditProcessLog creditProcessLog) { _databaseModel.CreditProcessLogs.Add(creditProcessLog); _databaseModel.SaveChanges(); }