Esempio n. 1
0
 public override bool IsValidCardUnitRate(int?id, decimal?min, decimal?max)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((bool)adapter.SP_DD_CardUnitRate_IsValid(id, min, max));
     }
 }
Esempio n. 2
0
 public override int AddOrEditCardUnitRate(int?id, decimal?minAmount, decimal?maxAmount, decimal?unit, decimal?amount, int?modifierID)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((int)adapter.SP_DD_CardUnitRate_Save(id, minAmount, maxAmount, unit, amount, modifierID));
     }
 }
Esempio n. 3
0
 public override bool IsValidCardDiscountSchema(int?id, int?min, int?max)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((bool)adapter.SP_DD_CardDiscountSchema_IsValid(id, min, max));
     }
 }
Esempio n. 4
0
 public override int AddOrEditCardDiscountSchema(int?id, int?minUnit, int?maxUnit, decimal?discount, int?modifierID)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((int)adapter.SP_DD_CardDiscountSchema_Save(id, minUnit, maxUnit, discount, modifierID));
     }
 }
Esempio n. 5
0
 public override int SaveCardHandle(byte[] b, int?modifierID)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((int)adapter.SP_T_CardHandle_Save(b.GetXmlData(), modifierID, false));
     }
 }
Esempio n. 6
0
 public override int AddOrEditCartType(int?id, string name, int?modifierID)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((int)adapter.SP_DD_CardType_Save(id, name, modifierID));
     }
 }
Esempio n. 7
0
 public override bool IsValidCartTypeName(int?id, string name)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((bool)adapter.SP_DD_CardType_IsValidName(id, name));
     }
 }
Esempio n. 8
0
 public override int AddOrEditCard(int?id, string cardNumber, int?cardTypeID, int?personID, int?parentCardID, int?modifierID)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((int)adapter.SP_T_Card_Save(id, cardNumber, cardTypeID, personID, parentCardID, modifierID));
     }
 }
Esempio n. 9
0
 public override string GetCardNumber(int?id)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((string)adapter.SP_T_Card_GetCardNumber(id));
     }
 }
Esempio n. 10
0
 public override int GetCardID(string cardNumber)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((int)adapter.SP_FindCardID(cardNumber));
     }
 }
Esempio n. 11
0
 public override bool IsValidCardNumber(int?id, string cardNumber)
 {
     using (var adapter = CardQueriesAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return((bool)adapter.SP_T_Card_IsValidCardNumber(id, cardNumber));
     }
 }
Esempio n. 12
0
        public override decimal GetCardUnitRateUnit(decimal?amount, bool isOnline)
        {
            var connectionString = (isOnline ? ConfigurationManagerEx.ConnectionString : ConfigurationManagerEx.OfflineConnectionString);
            var commandTimeout   = (isOnline ? ConfigurationManagerEx.CommandTimeout : ConfigurationManagerEx.OfflineCommandTimeout);

            using (var adapter = CardQueriesAdapter.CreateInstance(connectionString, commandTimeout))
            {
                return((decimal)adapter.SP_DD_CardUnitRate_GetUnit(amount));
            }
        }