Beispiel #1
0
 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);
 }
Beispiel #2
0
        public crm_orders GetOrder(string orderNum)
        {
            var res = new crm_orders();

            res = db.crm_orders.FirstOrDefault(x => x.orderNum == orderNum);
            return(res);
        }
Beispiel #3
0
        public crm_orders GetOrder(int id)
        {
            var res = new crm_orders();

            res = db.crm_orders.FirstOrDefault(x => x.id == id);
            return(res);
        }
Beispiel #4
0
        public crm_orders GetOrder(int id)
        {
            var res = new crm_orders();

            res = db.GetOrder(id);
            return(res);
        }
Beispiel #5
0
 public void SaveOrder(crm_orders item)
 {
     try
     {
         db.SaveOrders(item);
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
Beispiel #6
0
        internal int SaveOrder(crm_orders item)
        {
            var res = db.SaveOrder(item);

            return(res);
        }