Пример #1
0
 public ObjResponse InsertLog(ObjLogModel objLog)
 {
     try
     {
         return(new TRN_Logs().InsertLog(UsersBuilder.LogToEntity(objLog)));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Пример #2
0
 public static DAL.Data.Log LogToEntity(ObjLogModel OBJlog)
 {
     try
     {
         DAL.Data.Log response = new DAL.Data.Log()
         {
             Status           = OBJlog.Status,
             date_transaction = DateTime.Parse(OBJlog.DateTransaction.ToString("MM/dd/yyyy HH:mm:ss")),
             Uid = OBJlog.Uid
         };
         return(response);
     }
     catch (Exception ex)
     {
         throw new Exception("Error En MX - " + ex.Message);
     }
 }
Пример #3
0
 public ObjResponse InsertLOG(ObjLogModel data_log)
 {
     try
     {
         //data_log.DateTransaction = DateTime.Now;
         return(new BOL_Logs().InsertLog(data_log));
     }
     catch (Exception ex)
     {
         return(new ObjResponse()
         {
             Response = false,
             Message = ex.Message,
             ListLog = new List <ObjLogModel>()
         });
     }
 }
Пример #4
0
        public static List <ObjLogModel> ListLogToEntity(List <Log> ListLogs)
        {
            try
            {
                List <ObjLogModel> _List = new List <ObjLogModel>();
                foreach (var item in ListLogs)
                {
                    ObjLogModel response = new ObjLogModel()
                    {
                        Status          = item.Status,
                        DateTransaction = DateTime.Parse(item.date_transaction.ToString("MM/dd/yyyy HH:mm:ss")),
                        Uid             = item.Uid
                    };
                    _List.Add(response);
                }

                return(_List);
            }
            catch (Exception ex)
            {
                throw new Exception("Error En MX - " + ex.Message);
            }
        }