Example #1
0
 public int SaveDocLog(rosh_docLogs docLog)
 {
     try
     {
         if (docLog.id == 0)
         {
             db.rosh_docLogs.Add(docLog);
             db.SaveChanges();
         }
         else
         {
             try
             {
                 db.Entry(docLog).State = EntityState.Modified;
                 db.SaveChanges();
             }
             catch (OptimisticConcurrencyException ex)
             {
                 RDL.Debug.LogError(ex);
             }
         }
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
     return(docLog.id);
 }
Example #2
0
        public rosh_docLogs GetDocLog(int id)
        {
            var docLog = new rosh_docLogs();

            docLog = db.rosh_docLogs.FirstOrDefault(o => o.id == id);
            return(docLog);
        }
Example #3
0
 public void SaveDocLog(rosh_docLogs res)
 {
     try
     {
         db.SaveDocLog(res);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Example #4
0
        public rosh_docLogs GetDocLog(int id)
        {
            var res = new rosh_docLogs();

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