コード例 #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);
 }
コード例 #2
0
        public tt_projects GetProject(int id)
        {
            var res = new tt_projects();

            res = db.GetProject(id);
            return(res);
        }
コード例 #3
0
ファイル: CRMRepository.cs プロジェクト: harlov-va/st_publish
        public tt_projects GetProject(int id)
        {
            var res = new tt_projects();

            res = db.tt_projects.FirstOrDefault(x => x.id == id);
            return(res);
        }
コード例 #4
0
 public void SaveProject(tt_projects item)
 {
     try
     {
         db.SaveProject(item);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
コード例 #5
0
ファイル: CRMManager.cs プロジェクト: harlov-va/st_publish
        internal int SaveProject(tt_projects item)
        {
            var res = db.SaveProject(item);

            return(res);
        }