コード例 #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);
        }