public string GetProv() { string str = ""; Db.ProvinceCityDal provdal = new Db.ProvinceCityDal(); List <Model.ProvinceModel> provList = provdal.GetProvinceModelList(""); foreach (Model.ProvinceModel model in provList) { str += "<li><input type=\"button\" class=\"sel_btn\" data=\"" + model.ProvinceID + "\" value=\"" + model.ProvinceName + "\" /></li>"; } return(str); }
public string GetCityModel2(int str, int max) { int temp = 0; int er = str + max; StringBuilder sql = new StringBuilder(); sql.Append("select a.* from MovieInfo a where a.MovieID>" + str + " and a.MovieID<=" + er); Model.MovieModel model = new Model.MovieModel(); SqlDataReader dr = SqlHelper.ExecuteReader(conn, CommandType.Text, sql.ToString()); while (dr.Read()) { int cid = Convert.ToInt32(dr["CityName"].ToString()); ProvinceCityDal pcdal = new ProvinceCityDal(); pcdal.UpdateC(cid); temp += 1; } return(temp.ToString()); }