Esempio n. 1
0
 public int SaveProject(tt_projects item)
 {
     try
     {
         if (item.id == 0)
         {
             db.tt_projects.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);
 }
Esempio n. 2
0
        public tt_projects GetProject(int id)
        {
            var res = new tt_projects();

            res = db.GetProject(id);
            return(res);
        }
Esempio n. 3
0
        public tt_projects GetProject(int id)
        {
            var res = new tt_projects();

            res = db.tt_projects.FirstOrDefault(x => x.id == id);
            return(res);
        }
Esempio n. 4
0
 public void SaveProject(tt_projects item)
 {
     try
     {
         db.SaveProject(item);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Esempio n. 5
0
        internal int SaveProject(tt_projects item)
        {
            var res = db.SaveProject(item);

            return(res);
        }