Пример #1
0
        public static List <County> SearchCounty(string county, int limit, int offset)
        {
            string sql = new StringBuilder(BSql)
                         .Append(" WHERE ")
                         .Append(string.Format("(`{0}` like @{0})", County.Column.concelho.ToString()))
                         .ToString();
            List <MySqlParameter> lp = new List <MySqlParameter>();

            lp.Add(new MySqlParameter("@" + County.Column.concelho.ToString(), "%" + county.Trim().Replace(" ", "%") + "%"));

            return(County.ExecuteQuery(sql, lp, limit, offset));
        }
Пример #2
0
        public static List <County> GetCounty(string dd, string cc, int limit, int offset)
        {
            string sql = new StringBuilder(BSql)
                         .Append(" WHERE ")
                         .Append(string.Format("(`{0}` = @{0})", County.Column.cc.ToString()))
                         .Append(" AND ")
                         .Append(string.Format("(`{0}` = @{0})", County.Column.dd.ToString()))
                         .ToString();
            List <MySqlParameter> lp = new List <MySqlParameter>();

            lp.Add(new MySqlParameter("@" + County.Column.cc.ToString(), cc));
            lp.Add(new MySqlParameter("@" + County.Column.dd.ToString(), dd));

            return(County.ExecuteQuery(sql, lp, limit, offset));
        }
Пример #3
0
 public static List <County> GetAll(int limit, int offset)
 {
     return(County.ExecuteQuery(BSql, new List <MySqlParameter>(), limit, offset));
 }