Ejemplo n.º 1
0
 public int SaveHumanSource(hr_sources item)
 {
     try
     {
         if (item.id == 0)
         {
             db.hr_sources.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);
 }
Ejemplo n.º 2
0
        public hr_sources GetHumanSource(int id)
        {
            var res = new hr_sources();

            res = db.hr_sources.FirstOrDefault(x => x.id == id);
            return(res);
        }
Ejemplo n.º 3
0
        internal hr_sources GetHumanSource(int id)
        {
            var res = new hr_sources();

            res = db.GetHumanSource(id);
            return(res);
        }
Ejemplo n.º 4
0
 internal void SaveHumanSource(hr_sources item)
 {
     try
     {
         db.SaveHumanSource(item);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }