public void PrepareCondition(MssqlCondition mssqlCondition, UserCouponSearchInfo userCouponSearch) { mssqlCondition.Add("[CouponID]", userCouponSearch.CouponID, ConditionType.Equal); mssqlCondition.Add("[GetType]", userCouponSearch.GetType, ConditionType.Equal); mssqlCondition.Add("[Number]", userCouponSearch.Number, ConditionType.Like); mssqlCondition.Add("[IsUse]", userCouponSearch.IsUse, ConditionType.Equal); mssqlCondition.Add("[UserID]", userCouponSearch.UserID, ConditionType.Equal); }
public void PrepareCondition(MssqlCondition mssqlCondition, KPISearchInfo kpiSearch) { mssqlCondition.Add("[Id]", kpiSearch.IdStr, ConditionType.In); mssqlCondition.Add("[ParentID]", kpiSearch.ParentId, ConditionType.In); mssqlCondition.Add("[Name]", kpiSearch.Name, ConditionType.Like); mssqlCondition.Add("[CompanyId]", kpiSearch.CompanyID, ConditionType.In); mssqlCondition.Add("[State]", kpiSearch.State, ConditionType.Equal); }
public MssqlCondition PrepareCondition(FavorableActivityGiftSearchInfo searchInfo) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[Name]", searchInfo.Name, ConditionType.Like); mssqlCondition.Add("[Id]", string.Join(",", searchInfo.InGiftIds), ConditionType.In); return(mssqlCondition); }
/// <summary> /// 组合搜索条件 /// </summary> /// <param name="mssqlCondition"></param> /// <param name="userMessageSearch">UserPifaSeachInfo模型变量</param> public MssqlCondition PrepareCondition(OtherDuihuanSearchInfo SearchInfo) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[truename]", SearchInfo.truename, ConditionType.Like); mssqlCondition.Add("[mobile]", SearchInfo.mobile, ConditionType.Like); return(mssqlCondition); }
public MssqlCondition PrepareCondition(ReceiveMessageSearchInfo searchEntity) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[Title]", searchEntity.Title, ConditionType.Like); mssqlCondition.Add("[UserID]", searchEntity.UserID, ConditionType.Equal); mssqlCondition.Add("[Date]", searchEntity.StartDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[Date]", searchEntity.EndDate, ConditionType.LessOrEqual); mssqlCondition.Add("[IsRead]", searchEntity.IsRead, ConditionType.Equal); return(mssqlCondition); }
public void PrepareCondition(MssqlCondition mssqlCondition, CourseInfo Model) { //mssqlCondition.Add("[CourseId]", Model.Condition, ConditionType.Like); mssqlCondition.Add("[CourseName]", Model.CourseName, ConditionType.Like); mssqlCondition.Add("[CateId]", Model.CateId, ConditionType.Equal); mssqlCondition.Add("[CateId]", Model.CateIdCondition, ConditionType.In); if (Model.Field != string.Empty) { mssqlCondition.Add("[" + Model.Field + "]", Model.Condition, ConditionType.In); } }
public void PrepareCondition(MssqlCondition mssqlCondition, QuestionInfo Model) { mssqlCondition.Add("[CateId]", Model.IdCondition, ConditionType.In); mssqlCondition.Add("[Style]", Model.Style, ConditionType.Equal); //mssqlCondition.Add("[Checked]", Model.Checked, ConditionType.Equal); mssqlCondition.Add("[Question]", Model.Question, ConditionType.Like); mssqlCondition.Add("[CompanyId]", Model.CompanyId, ConditionType.NoEqual); if (Model.Field != string.Empty) { mssqlCondition.Add("[" + Model.Field + "]", Model.Condition, ConditionType.In); } }
private MssqlCondition PrepareCondition(UserRechargeSearchInfo userRechargeSearch) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[Number]", userRechargeSearch.Number, ConditionType.Like); mssqlCondition.Add("[RechargeDate]", userRechargeSearch.StartRechargeDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[RechargeDate]", userRechargeSearch.EndRechargeDate, ConditionType.LessOrEqual); mssqlCondition.Add("[IsFinish]", userRechargeSearch.IsFinish, ConditionType.Equal); mssqlCondition.Add("[UserId]", userRechargeSearch.InUserId, ConditionType.In); return(mssqlCondition); }
public MssqlCondition PrepareCondition(UserCouponSearchInfo searchInfo) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[CouponId]", searchInfo.CouponId, ConditionType.Equal); mssqlCondition.Add("[GetType]", searchInfo.GetType, ConditionType.Equal); mssqlCondition.Add("[Number]", searchInfo.Number, ConditionType.Like); mssqlCondition.Add("[IsUse]", searchInfo.IsUse, ConditionType.Equal); mssqlCondition.Add("[UserId]", searchInfo.UserId, ConditionType.Equal); return(mssqlCondition); }
public void PrepareCondition(MssqlCondition mssqlCondition, UserMessageSeachInfo userMessageSearch) { mssqlCondition.Add("[MessageClass]", userMessageSearch.MessageClass, ConditionType.Equal); mssqlCondition.Add("[Title]", userMessageSearch.Title, ConditionType.Like); mssqlCondition.Add("[PostDate]", userMessageSearch.StartPostDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[PostDate]", userMessageSearch.EndPostDate, ConditionType.LessOrEqual); mssqlCondition.Add("[UserName]", userMessageSearch.UserName, ConditionType.Like); mssqlCondition.Add("[UserID]", userMessageSearch.UserID, ConditionType.Equal); mssqlCondition.Add("[IsHandler]", userMessageSearch.IsHandler, ConditionType.Equal); mssqlCondition.Add("[ParentId]", userMessageSearch.ParentID, ConditionType.Equal); mssqlCondition.Add("[Mobile]", userMessageSearch.Mobile, ConditionType.Equal); mssqlCondition.Add("[IsChecked]", userMessageSearch.IsChecked, ConditionType.Equal); }
/// <summary> /// 组合搜索条件 /// </summary> /// <param name="mssqlCondition"></param> /// <param name="search">BargainSearch模型变量</param> public MssqlCondition PrepareCondition(BargainSearch search) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[Name]", search.Name, ConditionType.Like); //mssqlCondition.Add("[StartDate]",search.StartDate,ConditionType.Like); //mssqlCondition.Add("[EndDate]",search.EndDate,ConditionType.Like); mssqlCondition.Add("[LimitCount]", search.LimitCount, ConditionType.Equal); mssqlCondition.Add("[NumberPeople]", search.NumberPeople, ConditionType.Equal); mssqlCondition.Add("[ActivityRules]", search.ActivityRules, ConditionType.Like); mssqlCondition.Add("[SuccessRate]", search.SuccessRate, ConditionType.Equal); return(mssqlCondition); }
public void PrepareCondition(MssqlCondition mssqlCondition, ArticleSearchInfo articleSearch) { mssqlCondition.Add("[Title]", articleSearch.Title, ConditionType.Like); mssqlCondition.Add("[ClassID]", articleSearch.ClassID, ConditionType.Like); mssqlCondition.Add("[IsTop]", articleSearch.IsTop, ConditionType.Equal); mssqlCondition.Add("[Author]", articleSearch.Author, ConditionType.Like); mssqlCondition.Add("[Resource]", articleSearch.Resource, ConditionType.Like); mssqlCondition.Add("[Keywords]", articleSearch.Keywords, ConditionType.Like); mssqlCondition.Add("[Date]", articleSearch.StartDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[Date]", articleSearch.EndDate, ConditionType.LessOrEqual); mssqlCondition.Add("[ID]", articleSearch.InArticleID, ConditionType.In); mssqlCondition.Add(articleSearch.Condition); }
public DataTable StatisticsProductSale(int currentPage, int pageSize, ProductSearchInfo productSearch, ref int count, DateTime startDate, DateTime endDate) { ShopMssqlPagerClass class2; List <ProductInfo> list = new List <ProductInfo>(); string str = string.Empty; MssqlCondition condition = new MssqlCondition(); condition.Add("[AddDate]", startDate, ConditionType.MoreOrEqual); condition.Add("[AddDate]", endDate, ConditionType.Less); str = condition.ToString(); if (str != string.Empty) { str = " AND" + str; } class2 = new ShopMssqlPagerClass(); class2.TableName = "(SELECT ID,Name,ClassID,BrandID,IsSale, ISNULL(SellCount, 0) AS SellCount, ISNULL(SellMoney,0) AS SellMoney FROM " + ShopMssqlHelper.TablePrefix + "Product "; class2.TableName = class2.TableName + "LEFT OUTER JOIN (SELECT ProductID, SUM(BuyCount) AS SellCount, SUM(ProductPrice * BuyCount) AS SellMoney FROM ( "; string tableName = class2.TableName; class2.TableName = tableName + "SELECT " + ShopMssqlHelper.TablePrefix + "OrderDetail.ProductID," + ShopMssqlHelper.TablePrefix + "OrderDetail.ProductPrice, " + ShopMssqlHelper.TablePrefix + "OrderDetail.BuyCount FROM " + ShopMssqlHelper.TablePrefix + "OrderDetail "; tableName = class2.TableName; class2.TableName = tableName + " INNER JOIN [" + ShopMssqlHelper.TablePrefix + "Order] ON " + ShopMssqlHelper.TablePrefix + "OrderDetail.OrderID = [" + ShopMssqlHelper.TablePrefix + "Order].ID WHERE ([" + ShopMssqlHelper.TablePrefix + "Order].OrderStatus = 6 " + str + ")) AS TEMP1 GROUP BY ProductID) AS TEMP2 ON " + ShopMssqlHelper.TablePrefix + "Product.ID = TEMP2.ProductID) As PageTable"; class2.Fields = "[ID],[Name],[ClassID],[SellCount],[SellMoney]"; class2.CurrentPage = currentPage; class2.PageSize = pageSize; class2.OrderField = "[ID]"; if (productSearch.ProductOrderType != string.Empty) { string productOrderType = productSearch.ProductOrderType; if (productOrderType != null) { if (!(productOrderType == "SellCount")) { if (productOrderType == "SellMoney") { class2.OrderField = "[SellMoney],[ID]"; } } else { class2.OrderField = "[SellCount],[ID]"; } } } class2.OrderType = OrderType.Desc; this.PrepareCondition(class2.MssqlCondition, productSearch); class2.Count = count; count = class2.Count; return(class2.ExecuteDataTable()); }
public void PrepareCondition(MssqlCondition mssqlCondition, ProductCommentSearchInfo productCommentSearch) { mssqlCondition.Add("[Name]", productCommentSearch.ProductName, ConditionType.Like); mssqlCondition.Add("[Title]", productCommentSearch.Title, ConditionType.Like); mssqlCondition.Add("[Content]", productCommentSearch.Content, ConditionType.Like); mssqlCondition.Add("[UserIP]", productCommentSearch.UserIP, ConditionType.Like); mssqlCondition.Add("[PostDate]", productCommentSearch.StartPostDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[PostDate]", productCommentSearch.EndPostDate, ConditionType.LessOrEqual); mssqlCondition.Add("[UserID]", productCommentSearch.UserID, ConditionType.Equal); mssqlCondition.Add("[Status]", productCommentSearch.Status, ConditionType.Equal); mssqlCondition.Add("[ProductID]", productCommentSearch.ProductID, ConditionType.Equal); }
public void PrepareCondition(MssqlCondition mssqlCondition, OrderSearchInfo orderSearch) { mssqlCondition.Add("[OrderNumber]", orderSearch.OrderNumber, ConditionType.Like); mssqlCondition.Add("[OrderStatus]", orderSearch.OrderStatus, ConditionType.Equal); mssqlCondition.Add("[Consignee]", orderSearch.Consignee, ConditionType.Like); mssqlCondition.Add("[RegionID]", orderSearch.RegionID, ConditionType.Like); mssqlCondition.Add("[ShippingID]", orderSearch.ShippingID, ConditionType.Equal); mssqlCondition.Add("[AddDate]", orderSearch.StartAddDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[AddDate]", orderSearch.EndAddDate, ConditionType.LessOrEqual); mssqlCondition.Add("[UserID]", orderSearch.UserID, ConditionType.Equal); mssqlCondition.Add("[UserName]", orderSearch.UserName, ConditionType.Like); }
public MssqlCondition PrepareCondition(PrizeRecordSearchInfo recordSearch) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[ActivityID]", recordSearch.ActivityID, ConditionType.Equal); if (recordSearch.UserID > 0) { mssqlCondition.Add("[UserID]", recordSearch.UserID, ConditionType.Equal); } ; if (recordSearch.IsPrize > 0) { mssqlCondition.Add("[IsPrize]", recordSearch.IsPrize, ConditionType.Equal); } return(mssqlCondition); }
public MssqlCondition PrepareCondition(ProductBrandSearchInfo brandSearch) { MssqlCondition mssqlCondition = new MssqlCondition(); string condition = string.Empty; if (!string.IsNullOrEmpty(brandSearch.Key)) { condition = "([Name]" + " LIKE '%" + StringHelper.SearchSafe(brandSearch.Key) + "%' OR "; condition += "[Spelling]" + " LIKE '%" + StringHelper.SearchSafe(brandSearch.Key) + "%')"; mssqlCondition.Add(condition); } mssqlCondition.Add("[Name]", brandSearch.Name, ConditionType.Like); mssqlCondition.Add("[Spelling]", brandSearch.Spelling, ConditionType.Like); mssqlCondition.Add("[IsTop]", brandSearch.IsTop, ConditionType.Equal); return(mssqlCondition); }
/// <summary> /// 组合搜索条件 /// </summary> /// <param name="mssqlCondition"></param> /// <param name="emailSendRecordSearch">EmailSendRecordSearchInfo模型变量</param> public MssqlCondition PrepareCondition(EmailSendRecordSearchInfo emailSendRecordSearch) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[IsSystem]", emailSendRecordSearch.IsSystem, ConditionType.Equal); return(mssqlCondition); }
public DataTable StatisticsProductSale(int currentPage, int pageSize, ProductSearchInfo productSearch, ref int count, DateTime startDate, DateTime endDate) { List <ProductInfo> productList = new List <ProductInfo>(); string orderCondition = string.Empty; MssqlCondition orderCh = new MssqlCondition(); orderCh.Add("[AddDate]", startDate, ConditionType.MoreOrEqual); orderCh.Add("[AddDate]", endDate, ConditionType.Less); orderCondition = orderCh.ToString(); if (orderCondition != string.Empty) { orderCondition = " AND " + orderCondition; } ShopMssqlPagerClass pc = new ShopMssqlPagerClass(); pc.TableName = "(SELECT Id,Name,ClassId,BrandId,IsSale, ISNULL(SellCount, 0) AS SellCount, ISNULL(SellMoney,0) AS SellMoney FROM [Product] "; pc.TableName += "LEFT OUTER JOIN (SELECT ProductId, SUM(BuyCount) AS SellCount, SUM(ProductPrice * BuyCount) AS SellMoney FROM ( "; pc.TableName += "SELECT OrderDetail.ProductId,OrderDetail.ProductPrice, OrderDetail.BuyCount FROM [OrderDetail] "; pc.TableName += " INNER JOIN [Order] ON [OrderDetail].OrderId = [Order].Id WHERE ([Order].OrderStatus = 6 " + orderCondition + ")) AS TEMP1 GROUP BY ProductId) AS TEMP2 ON [Product].Id = TEMP2.ProductId) As PageTable"; pc.Fields = "[Id],[Name],[ClassId],[SellCount],[SellMoney]"; pc.CurrentPage = currentPage; pc.PageSize = pageSize; pc.OrderField = "[Id]"; if (productSearch.ProductOrderType != string.Empty) { switch (productSearch.ProductOrderType) { case "SellCount": pc.OrderField = "[SellCount],[Id]"; break; case "SellMoney": pc.OrderField = "[SellMoney],[Id]"; break; default: break; } } pc.OrderType = OrderType.Desc; pc.MssqlCondition = PrepareCondition(productSearch); pc.Count = count; count = pc.Count; return(pc.ExecuteDataTable()); }
public MssqlCondition PrepareCondition(CouponSearchInfo searchInfo) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[Name]", searchInfo.Name, ConditionType.Like); mssqlCondition.Add("[Id]", string.Join(",", searchInfo.InCouponIds), ConditionType.In); if (searchInfo.Type > 0) { mssqlCondition.Add("[Type]", searchInfo.Type, ConditionType.Equal); } if (searchInfo.CanUse == 1) { mssqlCondition.Add(" DATEDIFF(day,getdate(),[UseStartDate])<=0 and DATEDIFF(day,getdate(),[UseEndDate])>=0"); } //未开始 if (searchInfo.TimePeriod == 1) { mssqlCondition.Add(" DATEDIFF ( day , getdate(), [UseStartDate] )>0"); } //进行中 if (searchInfo.TimePeriod == 2) { mssqlCondition.Add(" DATEDIFF(day,getdate(),[UseStartDate])<=0 and DATEDIFF(day,getdate(),[UseEndDate])>=0"); } //已结束 if (searchInfo.TimePeriod == 3) { mssqlCondition.Add(" DATEDIFF(day,getdate(),[UseEndDate])<0"); } return(mssqlCondition); }
public List <TagsInfo> SearchTagsList(TagsSearchInfo tagsSearch) { MssqlCondition condition = new MssqlCondition(); condition.Add("[Word]", tagsSearch.Word, ConditionType.Like); condition.Add("[IsTop]", tagsSearch.IsTop, ConditionType.Equal); condition.Add("[ProductID]", tagsSearch.ProductID, ConditionType.Equal); condition.Add("[UserID]", tagsSearch.UserID, ConditionType.Equal); List <TagsInfo> tagsList = new List <TagsInfo>(); SqlParameter[] pt = new SqlParameter[] { new SqlParameter("@condition", SqlDbType.NVarChar) }; pt[0].Value = condition.ToString(); using (SqlDataReader reader = ShopMssqlHelper.ExecuteReader(ShopMssqlHelper.TablePrefix + "SearchTagsList", pt)) { this.PrepareTagsModel(reader, tagsList); } return(tagsList); }
public void PrepareCondition(MssqlCondition mssqlCondition, PostPassInfo Model) { mssqlCondition.Add("[UserId]", Model.UserId, ConditionType.Equal); mssqlCondition.Add("[UserId]", Model.InUserID, ConditionType.In); mssqlCondition.Add("[PostId]", Model.PostId, ConditionType.Equal); mssqlCondition.Add("[IsRZ]", Model.IsRZ, ConditionType.Equal); mssqlCondition.Add("[PostName]", Model.PostName, ConditionType.Like); mssqlCondition.Add("[CreateDate]", Model.CreateDate, ConditionType.LessOrEqual); mssqlCondition.Add("[CreateDate]", Model.SearchStartDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[_passpost].[postid] in (select [postid] from [_post])"); if (!string.IsNullOrEmpty(Model.InCompanyID)) { mssqlCondition.Add("[UserId] in (Select [ID] from [" + ShopMssqlHelper.TablePrefix + "User] where [CompanyID] in (" + Model.InCompanyID + "))"); } }
private void ConditionFactory <S>(PropertyInfo item, TableAttribute attribute, MssqlCondition mssqlCondition, S s) { if (item.PropertyType == typeof(string)) { mssqlCondition.Add("[" + attribute.FieldName + "]", (string)item.GetValue(s, null), attribute.ConditionType); } else if (item.PropertyType == typeof(int)) { mssqlCondition.Add("[" + attribute.FieldName + "]", (int)item.GetValue(s, null), attribute.ConditionType); } else if (item.PropertyType == typeof(DateTime)) { mssqlCondition.Add("[" + attribute.FieldName + "]", (DateTime)item.GetValue(s, null), attribute.ConditionType); } else if (item.PropertyType == typeof(decimal)) { mssqlCondition.Add("[" + attribute.FieldName + "]", (decimal)item.GetValue(s, null), attribute.ConditionType); } }
public void AddKeyCondition(MssqlCondition mssqlCondition, string key) { string condition = string.Empty; if (key != string.Empty) { condition = (("([Name] LIKE '%" + StringHelper.SearchSafe(key) + "%' OR ") + "[Spelling] LIKE '%" + StringHelper.SearchSafe(key) + "%' OR ") + "[ProductNumber] LIKE '%" + StringHelper.SearchSafe(key) + "%')"; mssqlCondition.Add(condition); } }
/// <summary> /// 用户消费分析 /// </summary> public DataTable StatisticsUserConsume(int currentPage, int pageSize, UserSearchInfo userSearch, ref int count, string orderField, DateTime startDate, DateTime endDate) { List <UserInfo> userList = new List <UserInfo>(); string orderCondition = string.Empty; MssqlCondition orderCh = new MssqlCondition(); orderCh.Add("[AddDate]", startDate, ConditionType.MoreOrEqual); orderCh.Add("[AddDate]", endDate, ConditionType.Less); orderCondition = orderCh.ToString(); if (!string.IsNullOrEmpty(orderCondition)) { orderCondition = " AND " + orderCondition; } ShopMssqlPagerClass pc = new ShopMssqlPagerClass(); pc.TableName = "(SELECT Id,UserName,Sex,ISNULL(OrderCount,0) AS OrderCount,ISNULL(OrderMoney,0) AS OrderMoney "; pc.TableName += "FROM Usr "; pc.TableName += "LEFT OUTER JOIN (SELECT UserId, COUNT(*) AS OrderCount,Sum(ProductMoney-FavorableMoney+ShippingMoney+OtherMoney-CouponMoney) AS OrderMoney FROM [Order] WHERE OrderStatus=6 " + orderCondition + " GROUP BY UserId) AS TEMP3 ON Usr.Id = TEMP3.UserId where Usr.status = 2) AS PageTable"; pc.Fields = "[Id],[UserName],[Sex],[OrderCount],[OrderMoney]"; pc.CurrentPage = currentPage; pc.PageSize = pageSize; switch (orderField) { case "OrderCount": pc.OrderField = "[OrderCount],[Id]"; break; case "OrderMoney": pc.OrderField = "[OrderMoney],[Id]"; break; default: pc.OrderField = "[OrderCount],[Id]"; break; } pc.OrderType = OrderType.Desc; pc.MssqlCondition = PrepareCondition(userSearch); pc.Count = count; count = pc.Count; return(pc.ExecuteDataTable()); }
public void PrepareCondition(MssqlCondition mssqlCondition, UserSearchInfo userSearch) { mssqlCondition.Add("[UserName]", userSearch.UserName, ConditionType.Like); mssqlCondition.Add("[Email]", userSearch.Email, ConditionType.Like); mssqlCondition.Add("[Sex]", userSearch.Sex, ConditionType.Equal); mssqlCondition.Add("[RegisterDate]", userSearch.StartRegisterDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[RegisterDate]", userSearch.EndRegisterDate, ConditionType.Less); mssqlCondition.Add("[Status]", userSearch.Status, ConditionType.Equal); mssqlCondition.Add("[ID]", userSearch.InUserID, ConditionType.In); }
public void PrepareCondition(MssqlCondition mssqlCondition, KPIEvaluateSearchInfo kpiEvaluateSearch) { mssqlCondition.Add("[KPIId]", kpiEvaluateSearch.KPIdStr, ConditionType.In); mssqlCondition.Add("[UserId]", kpiEvaluateSearch.UserId, ConditionType.In); mssqlCondition.Add("[EvaluateDate]", kpiEvaluateSearch.EvaluateDate, ConditionType.Equal); mssqlCondition.Add("[EvaluateNameId]", kpiEvaluateSearch.EvaluateNameId, ConditionType.Equal); mssqlCondition.Add("[EvaluateUserId]", kpiEvaluateSearch.EvaluateUserId, ConditionType.Equal); mssqlCondition.Add("[PostId]", kpiEvaluateSearch.PostId, ConditionType.In); mssqlCondition.Add(kpiEvaluateSearch.Condition); }
public void PrepareCondition(MssqlCondition mssqlCondition, OrderSearchInfo orderSearch, ProductSearchInfo productSearch) { mssqlCondition.Add("[OrderNumber]", orderSearch.OrderNumber, ConditionType.Like); mssqlCondition.Add("[AddDate]", orderSearch.StartAddDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[AddDate]", orderSearch.EndAddDate, ConditionType.LessOrEqual); mssqlCondition.Add("[UserName]", orderSearch.UserName, ConditionType.Like); mssqlCondition.Add("[Name]", productSearch.Name, ConditionType.Like); //mssqlCondition.Add("[BrandID]", productSearch.BrandID, ConditionType.Equal); mssqlCondition.Add("[ClassID]", productSearch.ClassID, ConditionType.Like); mssqlCondition.Add("[ProductID]", productSearch.InProductID, ConditionType.In); }
/// <summary> /// 组合搜索条件 /// </summary> /// <param name="mssqlCondition"></param> /// <param name="search">RecordingSearch模型变量</param> public MssqlCondition PrepareCondition(RecordingSearch search) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[BOrderId]", search.BOrderId, ConditionType.Equal); mssqlCondition.Add("[Price]", search.Price, ConditionType.Like); mssqlCondition.Add("[Name]", search.Name, ConditionType.Like); mssqlCondition.Add("[Photo]", search.Photo, ConditionType.Like); mssqlCondition.Add("[AddDate]", search.AddDate, ConditionType.Like); mssqlCondition.Add("[UserId]", search.UserId, ConditionType.Equal); mssqlCondition.Add("[UserName]", search.UserName, ConditionType.Like); mssqlCondition.Add("[BOrderId]", search.InBOrderId, ConditionType.In); return(mssqlCondition); }
public MssqlCondition PrepareCondition(PointProductSearchInfo searchInfo) { MssqlCondition mssqlCondition = new MssqlCondition(); mssqlCondition.Add("[Id]", searchInfo.ProductId, ConditionType.Equal); mssqlCondition.Add("[Name]", searchInfo.ProductName, ConditionType.Like); mssqlCondition.Add("[Point]", searchInfo.Point, ConditionType.Equal); mssqlCondition.Add("[BeginDate]", searchInfo.BeginDate, ConditionType.MoreOrEqual); mssqlCondition.Add("[EndDate]", searchInfo.EndDate, ConditionType.LessOrEqual); mssqlCondition.Add("[IsSale]", searchInfo.IsSale, ConditionType.Equal); mssqlCondition.Add("[BeginDate]", searchInfo.ValidDate, ConditionType.LessOrEqual); mssqlCondition.Add("[EndDate]", searchInfo.ValidDate, ConditionType.MoreOrEqual); return(mssqlCondition); }