Exemple #1
0
        }        //HandleCuredLoan

        private int AddCollectionLog(CollectionLog model)
        {
            var historyID = model.LoanHistoryID > 0 ? (object)model.LoanHistoryID :null;

            Log.Info("Adding collection log to customer {0} loan {1} type {2} method {3} history {4}", model.CustomerID, model.LoanID, model.Type, model.Method, model.LoanHistoryID);
            return(DB.ExecuteScalar <int>("AddCollectionLog",
                                          CommandSpecies.StoredProcedure,
                                          new QueryParameter("CustomerID", model.CustomerID),
                                          new QueryParameter("LoanID", model.LoanID),
                                          new QueryParameter("Type", model.Type),
                                          new QueryParameter("Method", model.Method),
                                          new QueryParameter("Now", this.now),
                                          new QueryParameter("LoanHistoryID", historyID),
                                          new QueryParameter("Comments", model.Comments)
                                          ));
        }        //AddCollectionLog
Exemple #2
0
 public static CustomerRelationsModel CreateCollectionLog(CollectionLog collectionLog)
 {
     return(new CustomerRelationsModel
     {
         User = "******",
         Action = collectionLog.Method,
         Comment = string.Format("{0} was sent to customer because of loan {1}",
                                 collectionLog.Method,
                                 collectionLog.LoanID),
         DateTime = collectionLog.TimeStamp,
         Type = collectionLog.Type,
         CollectionSnailMails = collectionLog
                                .SnailMailMetadata
                                .Select(x => new SnailMailModel {
             Id = x.CollectionSnailMailMetadataID,
             Name = x.Name
         })
                                .ToList()
     });
 }
 public AddCollectionLog(CollectionLog collectionLog)
 {
     CollectionLog = collectionLog;
 }