public static void UpdateGiftItemCount(int promotionSysNo, SaleGiftGiftItemType giftComboType, int?itemGiftCount, string userName) { DataCommand cmd = DataCommandManager.GetDataCommand("SaleGift_UpdateGiftItemCount"); cmd.SetParameterValue("@PromotionSysNo", promotionSysNo); cmd.SetParameterValue("@GiftComboType", giftComboType == SaleGiftGiftItemType.AssignGift ? "A" : "O"); cmd.SetParameterValue("@ItemGiftCount", itemGiftCount); cmd.SetParameterValue("@InUser", userName); cmd.ExecuteNonQuery(); }
public void UpdateItemGiftCouontGiftRules(int promotionSysNo, int?count, SaleGiftGiftItemType isGiftPool, string companyCode, string username, int special) { DataCommand dataCommand = DataCommandManager.GetDataCommand("SaleGift_UpdateItemGiftCountPromotions"); dataCommand.SetParameterValue("@PromotionSysNo", promotionSysNo); dataCommand.SetParameterValue("@IsSpecial", special); dataCommand.SetParameterValue("@GiftComboType", isGiftPool); dataCommand.SetParameterValue("@ItemGiftCount", count); dataCommand.SetParameterValue("@InUser", username); dataCommand.SetParameterValue("@CompanyCode", companyCode); dataCommand.ExecuteNonQuery(); }
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { SaleGiftGiftItemType result = SaleGiftGiftItemType.AssignGift; bool data = (bool)value; if (data) { result = SaleGiftGiftItemType.AssignGift; } else { result = SaleGiftGiftItemType.GiftPool; } return(result); }