public int SaveOrders(crm_orders item) { try { if (item.id == 0) { db.crm_orders.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 crm_orders GetOrder(string orderNum) { var res = new crm_orders(); res = db.crm_orders.FirstOrDefault(x => x.orderNum == orderNum); return(res); }
public crm_orders GetOrder(int id) { var res = new crm_orders(); res = db.crm_orders.FirstOrDefault(x => x.id == id); return(res); }
public crm_orders GetOrder(int id) { var res = new crm_orders(); res = db.GetOrder(id); return(res); }
public void SaveOrder(crm_orders item) { try { db.SaveOrders(item); } catch (Exception ex) { RDL.Debug.LogError(ex); } }
internal int SaveOrder(crm_orders item) { var res = db.SaveOrder(item); return(res); }