Beispiel #1
0
 public int SaveFinType(fin_types item)
 {
     try
     {
         if (item.id == 0)
         {
             db.fin_types.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);
 }
Beispiel #2
0
        public fin_types GetFinType(int id)
        {
            var res = new fin_types();

            res = db.GetFinType(id);
            return(res);
        }
Beispiel #3
0
 public void SaveFinType(fin_types item)
 {
     try
     {
         db.SaveFinType(item);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Beispiel #4
0
        public fin_types GetFinType(int id)
        {
            fin_types res = db.fin_types.FirstOrDefault(x => x.id == id);

            return(res);
        }