Esempio n. 1
0
 public int Add(Core_Store _store)
 {
     try
     {
         this.Core_Stores.InsertOnSubmit(_store);
         this.SubmitChanges();
         return(Core.Variable.DB_INSERT_SUCCESS);
     }
     catch (Exception _ex)
     {
         throw new Exception(ClassName, _ex);
         //SingletonLogger.Instance.Error(ClassName, _ex);
     }
 }
Esempio n. 2
0
 public int Edit(Core_Store _store)
 {
     try
     {
         Core_Store _o = this.Core_Stores.Single(o => o.Id == _store.Id);
         _o.Name         = _store.Name;
         _o.Address      = _store.Address;
         _o.DisplayOrder = _store.DisplayOrder;
         this.SubmitChanges();
         return(Core.Variable.DB_UPDATE_SUCCESS);
     }
     catch (Exception _ex)
     {
         throw new Exception(ClassName, _ex);
         //SingletonLogger.Instance.Error(ClassName, _ex);
     }
 }