public int getThanaNo(String thananame, int districtno) { String s = "SELECT thana_no FROM thana,district where thana.district_no=district.district_no and thana.district_no=" + districtno + " and thana.thana_name='" + thananame + "'"; int distrintno = DB.SelectInt(s); return(distrintno); }
public int getMemberCount(String userId) { int ret = 0; String s = "select member_count from [user] where user_id='" + userId + "'"; //MessageBox.Show(s); ret = db.SelectInt(s); return(ret); }
public int getDistrictNo(String districtname) { String s = "SELECT district_no FROM district WHERE district_name = '" + districtname + "'"; int distrintno = DB.SelectInt(s); return(distrintno); }
public int getUnionNo(String unionname, String thanaid) { String s = "SELECT union_no FROM [union],thana where [union].thana_id=thana.thana_id and [union].thana_id='" + thanaid + "' and [union].union_name='" + unionname + "'"; int unionno = DB.SelectInt(s); return(unionno); }
public bool exist(String cncid) { String s = "select count(cnc_id) from cnc where cnc_id='" + cncid + "'"; int no = DB.SelectInt(s); if (no == 1) { return(true); } else { return(false); } }