Example #1
0
 public int SaveFinChannel(fin_channels item)
 {
     try
     {
         if (item.id == 0)
         {
             db.fin_channels.Add(item);
             db.SaveChanges();
         }
         else
         {
             try
             {
                 db.Entry(item).State = EntityState.Modified;
                 db.SaveChanges();
             }
             catch (OptimisticConcurrencyException ex)
             {
                 RDL.Debug.LogError(ex);
             }
         }
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
     return(item.id);
 }
Example #2
0
        public fin_channels GetFinChannel(int id)
        {
            var res = new fin_channels();

            res = db.GetFinChannel(id);
            return(res);
        }
Example #3
0
 public void SaveFinChannel(fin_channels item)
 {
     try
     {
         db.SaveFinChannel(item);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Example #4
0
        public fin_channels GetFinChannel(int id)
        {
            fin_channels res = db.fin_channels.FirstOrDefault(x => x.id == id);

            return(res);
        }