public bool AddPromotionSearchHistory(PromotionSearchHistory promotionSearchHistory) { try { db.PromotionSearchHistories.InsertOnSubmit(promotionSearchHistory); db.SubmitChanges(); return true; } catch { return false; } }
public bool AddPromotionSearchHistory(PromotionHistoryFilterOption promotionHistoryFilterOption, string fullName, string customerType, string channel, int groupId, int regionId, int areaId, int localId, int promoId, string searchResults) { var searchCriteria = string.Empty; if (promotionHistoryFilterOption == PromotionHistoryFilterOption.Customer) { searchCriteria = string.Format(Constant.CustomerPromotionHistoryTemplateString, (int)PromotionHistoryFilterOption.Customer, fullName, customerType, channel, groupId, regionId, areaId, localId); } else { searchCriteria = string.Format(Constant.CustomerPromotionHistoryTemplateString, (int)PromotionHistoryFilterOption.Sales, fullName, groupId, regionId, areaId, localId); } var promoHistory = new PromotionSearchHistory {PromotionId = promoId, SearchCriteria = searchCriteria, SearchResults = searchResults}; return AddPromotionSearchHistory(promoHistory); }
private static PromotionSearchHistory ConvertFromPromotionHistoryResultToPromotionSearchHistory(PromotionHistoryResult hisResult, int promoId) { PromotionSearchHistory history = new PromotionSearchHistory(); history.Id = new Guid(hisResult.Id); history.PromotionId = promoId; history.SearchCriteria = hisResult.SearchCriteria; history.SearchCriteriaLiteral = hisResult.SearchCriteriaLiteral; history.SearchResults = hisResult.SearchResutls; return history; }
private void detach_PromotionSearchHistories(PromotionSearchHistory entity) { this.SendPropertyChanging(); entity.Promotion = null; }
private void attach_PromotionSearchHistories(PromotionSearchHistory entity) { this.SendPropertyChanging(); entity.SchedulePromotion = this; }
partial void DeletePromotionSearchHistory(PromotionSearchHistory instance);
partial void UpdatePromotionSearchHistory(PromotionSearchHistory instance);
partial void InsertPromotionSearchHistory(PromotionSearchHistory instance);