public int SaveReclamationStatus(recl_itemStatuses element) { try { if (element.id == 0) { db.recl_itemStatuses.Add(element); db.SaveChanges(); } else { try { db.Entry(element).State = EntityState.Modified; db.SaveChanges(); } catch (OptimisticConcurrencyException ex) { RDL.Debug.LogError(ex); } } } catch (Exception ex) { RDL.Debug.LogError(ex); } return(element.id); }
public recl_itemStatuses GetReclamationStatus(int id) { var res = new recl_itemStatuses(); res = db.recl_itemStatuses.FirstOrDefault(x => x.id == id); return(res); }
internal int SaveReclamationStatus(recl_itemStatuses item) { var res = db.SaveReclamationStatus(item); return(res); }