Exemplo n.º 1
0
 public int SaveMailLog(rosh_mailLogs mailLog)
 {
     try
     {
         if (mailLog.id == 0)
         {
             db.rosh_mailLogs.Add(mailLog);
             db.SaveChanges();
         }
         else
         {
             try
             {
                 db.Entry(mailLog).State = EntityState.Modified;
                 db.SaveChanges();
             }
             catch (OptimisticConcurrencyException ex)
             {
                 RDL.Debug.LogError(ex);
             }
         }
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
     return(mailLog.id);
 }
Exemplo n.º 2
0
        public rosh_mailLogs GetMailLog(int id)
        {
            var mailLog = new rosh_mailLogs();

            mailLog = db.rosh_mailLogs.FirstOrDefault(o => o.id == id);
            return(mailLog);
        }
Exemplo n.º 3
0
 public void SaveMailLog(rosh_mailLogs res)
 {
     try
     {
         db.SaveMailLog(res);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Exemplo n.º 4
0
        public rosh_mailLogs GetMailLog(int id)
        {
            var res = new rosh_mailLogs();

            try
            {
                res = db.GetMailLog(id);
            }
            catch (Exception ex)
            {
                _debug(ex, new { id }, "");
            }
            return(res);
        }