勿忘初心
每天都是新的开始
 List<SqlParameter> paras = new List<SqlParameter>();
            paras.Add(new SqlParameter("@mi_id", mid));
            if (state!="")
            {
                sql += " and mi_state=@state ";
                paras.Add(new SqlParameter("@state", state));
            }
            if (category!="")
            {
                sql += " and mi_category=@category ";
                paras.Add(new SqlParameter("@category", category));
            }
            if (realname!="")
            {
                sql += " and mi_realname=@realname ";
                paras.Add(new SqlParameter("@realname", realname));
            }
            sql += " order by mi_createtime";

            SqlParameter[] parameter = paras.ToArray();

 

posted on 2017-07-14 16:53  栀子勿忘  阅读(542)  评论(0编辑  收藏  举报