Пример #1
0
 public int SaveSandingSystem(rosh_sendingSystems res)
 {
     try
     {
         if (res.id == 0)
         {
             db.rosh_sendingSystems.Add(res);
             db.SaveChanges();
         }
         else
         {
             try
             {
                 db.Entry(res).State = EntityState.Modified;
                 db.SaveChanges();
             }
             catch (OptimisticConcurrencyException ex)
             {
                 RDL.Debug.LogError(ex);
             }
         }
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
     return(res.id);
 }
Пример #2
0
        public rosh_sendingSystems GetSandingSystem(int id)
        {
            var res = new rosh_sendingSystems();

            res = db.rosh_sendingSystems.FirstOrDefault(o => o.id == id);
            return(res);
        }
Пример #3
0
 public void SaveSandingSystem(rosh_sendingSystems res)
 {
     try
     {
         db.SaveSandingSystem(res);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Пример #4
0
        public rosh_sendingSystems GetSandingSystem(int id)
        {
            var res = new rosh_sendingSystems();

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