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); }
public hr_sources GetHumanSource(int id) { var res = new hr_sources(); res = db.hr_sources.FirstOrDefault(x => x.id == id); return(res); }
internal hr_sources GetHumanSource(int id) { var res = new hr_sources(); res = db.GetHumanSource(id); return(res); }
internal void SaveHumanSource(hr_sources item) { try { db.SaveHumanSource(item); } catch (Exception ex) { RDL.Debug.LogError(ex); } }