当前位置: 首页>>代码示例>>C#>>正文


C# IDictionary.IsContainsValue方法代码示例

本文整理汇总了C#中IDictionary.IsContainsValue方法的典型用法代码示例。如果您正苦于以下问题:C# IDictionary.IsContainsValue方法的具体用法?C# IDictionary.IsContainsValue怎么用?C# IDictionary.IsContainsValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDictionary的用法示例。


在下文中一共展示了IDictionary.IsContainsValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetMaxResults

 /// <summary>
 /// 傳入條件,設定查詢取回的資料筆數
 /// </summary>
 /// <param name="query"></param>
 /// <param name="conditions"></param>
 /// <param name="key"></param>
 /// <returns></returns>
 public static IQuery SetMaxResults(this IQuery query, IDictionary<string, string> conditions, string key)
 {
     if (conditions.IsContainsValue(key))
     {
         query.SetMaxResults(Convert.ToInt32(conditions[key]));
     }
     return query;
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:15,代码来源:QueryExtension.cs

示例2: AppendPostKeyWord

        private void AppendPostKeyWord(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
        {
            if (conditions.IsContainsValue("KeyWord"))
            {
                whereScript.Append(" and (p.Title like ? or p.HtmlContent like ? or p.CustomField1 like ? or p.MemberName like ? or p.MemberPhone like ? or p.ProductSer like ? ) ");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
            }

            if (conditions.IsContainsValue("ProductKeyWord"))
            {
                whereScript.Append(" and (p.Title like ? or p.WarrantySuppliers like ? ) ");
                param.Add("%" + conditions["ProductKeyWord"] + "%");
                param.Add("%" + conditions["ProductKeyWord"] + "%");
            }
        }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:20,代码来源:PostDao.cs

示例3: AppendPostIsRecommend

 private void AppendPostIsRecommend(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("IsRecommend"))
     {
         whereScript.Append(" and p.IsRecommend = ? ");
         param.Add(bool.Parse(conditions["IsRecommend"]));
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:8,代码来源:PostDao.cs

示例4: AppendPostDate

        private void AppendPostDate(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
        {
            ILog m_Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            if (conditions.IsContainsValue("ShowDateStart"))
            {
                whereScript.Append(" and p.ShowDate >= ? ");
                param.Add(Convert.ToDateTime(conditions["ShowDateStart"]));
            }
            if (conditions.IsContainsValue("ShowDateEnd"))
            {
                whereScript.Append(" and p.ShowDate <= ? ");
                m_Log.Debug("p.ShowDate <=" + (Convert.ToDateTime(conditions["ShowDateEnd"]).AddDays(1).AddMinutes(-1)).ToString());
                param.Add(Convert.ToDateTime(conditions["ShowDateEnd"]).AddDays(1).AddMinutes(-1));
            }
            if (conditions.IsContainsValue("CloseDateStart"))
            {
                whereScript.Append(" and p.CloseDate >= ? ");
                param.Add(Convert.ToDateTime(conditions["CloseDateStart"]));
            }
            if (conditions.IsContainsValue("CloseDateEnd"))
            {
                whereScript.Append(" and p.CloseDate <= ? ");
                m_Log.Debug("p.CloseDateEnd <=" + (Convert.ToDateTime(conditions["CloseDateEnd"]).AddDays(1).AddMinutes(-1)).ToString());
                param.Add(Convert.ToDateTime(conditions["CloseDateEnd"]).AddDays(1).AddMinutes(-1));
            }

            if (conditions.IsContainsValue("CloseDate"))
            {
                whereScript.Append(" and p.CloseDate = ? ");
                param.Add(Convert.ToDateTime(conditions["CloseDate"]));
            }

            if (conditions.IsContainsValue("ShowDate"))
            {
                whereScript.Append(" and p.ShowDate = ? ");
                param.Add(Convert.ToDateTime(conditions["ShowDate"]));
            }
        }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:39,代码来源:PostDao.cs

示例5: AppendMemberCreateDate

        private void AppendMemberCreateDate(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
        {
            if (conditions.IsContainsValue("CreateDateFrom"))
            {
                whereScript.Append(" and m.CreatedDate >= ? ");
                param.Add(DateTime.Parse(conditions["CreateDateFrom"]));
            }

            if (conditions.IsContainsValue("CreateDateTo"))
            {
                whereScript.Append(" and m.CreatedDate <= ? ");
                param.Add(DateTime.Parse(conditions["CreateDateTo"]));
            }
        }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:14,代码来源:MemberDao.cs

示例6: AppendPostWithOutMemberId

 private void AppendPostWithOutMemberId(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("WithOutMemberId"))
     {
         whereScript.Append(" and (p.MemberId is null or  p.MemberId = '')");
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:7,代码来源:PostDao.cs

示例7: AppendPostType

 private void AppendPostType(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("Type"))
     {
         whereScript.Append(" and p.Type = ? ");
         param.Add(conditions["Type"]);
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:8,代码来源:PostDao.cs

示例8: AppendPostParentPost

 private void AppendPostParentPost(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("ParentPostId"))
     {
         whereScript.Append(" and p.ParentPost.PostId = ? ");
         param.Add(conditions["ParentPostId"]);
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:8,代码来源:PostDao.cs

示例9: AppendFileDate

 private void AppendFileDate(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("ShowDateStart"))
     {
         whereScript.Append(" and f.ShowDate >= ? ");
         param.Add(Convert.ToDateTime(conditions["ShowDateStart"]));
     }
     if (conditions.IsContainsValue("ShowDateEnd"))
     {
         whereScript.Append(" and f.ShowDate <= ? ");
         param.Add(Convert.ToDateTime(conditions["ShowDateEnd"]));
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:13,代码来源:PostFileDao.cs

示例10: AppendMemberUserConfirm

 private void AppendMemberUserConfirm(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("UserConfirm"))
     {
         whereScript.Append(" and m.UserConfirm = ? ");
         param.Add(conditions["UserConfirm"]);
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:8,代码来源:MemberDao.cs

示例11: AppendMemberStore

 private void AppendMemberStore(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("Store"))
     {
         whereScript.Append(" and m.Store = ? ");
         param.Add(conditions["Store"]);
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:8,代码来源:MemberDao.cs

示例12: AppendMemberOrder

        private string AppendMemberOrder(IDictionary<string, string> conditions)
        {
            //// 排序條件
            string order = "order by m.CreatedDate desc ";
            if (conditions.IsContainsValue("Order"))
            {
                order = conditions["Order"];
            }

            return order;
        }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:11,代码来源:MemberDao.cs

示例13: AppendMemberLoginId

 private void AppendMemberLoginId(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("LoginId"))
     {
         whereScript.Append(" and m.LoginId = ? ");
         param.Add(conditions["LoginId"]);
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:8,代码来源:MemberDao.cs

示例14: AppendMemberKeyWord

        private void AppendMemberKeyWord(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
        {
            if (conditions.IsContainsValue("KeyWord"))
            {
                whereScript.Append(" and (m.Name like ? or m.Email like ? or m.Phone like ? or m.Mobile like ? or m.Project like ? or m.Product like ? or m.PhoneSer like ? or m.PID like ? or m.OnlineWholesalers like ? or m.MobileWholesalers like ? ) ");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
                param.Add("%" + conditions["KeyWord"] + "%");
            }
            else
            {
                if (conditions.IsContainsValue("Name"))
                {
                    whereScript.Append(" and m.Name = ? ");
                    param.Add(conditions["Name"]);
                }

                if (conditions.IsContainsValue("Email"))
                {
                    whereScript.Append(" and m.Email = ? ");
                    param.Add(conditions["Email"]);
                }
            }
        }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:31,代码来源:MemberDao.cs

示例15: AppendMemberGetCommission

 private void AppendMemberGetCommission(IDictionary<string, string> conditions, StringBuilder whereScript, ArrayList param)
 {
     if (conditions.IsContainsValue("GetCommission"))
     {
         whereScript.Append(" and m.GetCommission = ? ");
         param.Add(conditions["GetCommission"]);
     }
 }
开发者ID:dada2cindy,项目名称:my-case-petemobile,代码行数:8,代码来源:MemberDao.cs


注:本文中的IDictionary.IsContainsValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。