public int GetMenuCount(String type) { DBHelper.SqlHelper b = new DBHelper.SqlHelper(); String sql = "select count(*) from mainmenus where Type='" + type + "'"; //String sql = "select count(*) from Users "; int r = int.Parse(b.GetSingle(sql).ToString()); return(r); }
public int Collectcount(String UserNumber, String MenuNumber) { DBHelper.SqlHelper b = new DBHelper.SqlHelper(); String sql = "select count(*) from usercollection where Account='" + UserNumber + "' and ObjectNumber='" + MenuNumber + "'"; //String sql = "select count(*) from Users "; int r = int.Parse(b.GetSingle(sql).ToString()); return(r); }
public int GetUserFoodProductionCount(string usernumber)//用户制作菜品 { DBHelper.SqlHelper b = new DBHelper.SqlHelper(); String sql = "select count(*) from lf_userproduction where UserNumber='" + usernumber + "'"; int r = int.Parse(b.GetSingle(sql).ToString()); return(r); }
public int Followcount(String UserNumber, String ObUserNumber) { DBHelper.SqlHelper b = new DBHelper.SqlHelper(); String sql = "select count(*) from userfollowview where Account='" + UserNumber + "' and ObjectNumber='" + ObUserNumber + "'"; //String sql = "select count(*) from Users "; int r = int.Parse(b.GetSingle(sql).ToString()); return(r); }
public int GetDataCount(String bywhat, String tablename) { String sql = ""; DBHelper.SqlHelper b = new DBHelper.SqlHelper(); if (bywhat == "") { sql = "select count(*) from " + tablename; } else { sql = "select count(*) from " + tablename + " where " + bywhat; } // sql = "select count(*) from user where UserName='******' and PassWord='******'"; //String sql = "select count(*) from Users "; int r = int.Parse(b.GetSingle(sql).ToString()); return(r); }