public static CityPlanStandard GetCityPlanStandardByNumber(string number) { string sqlCommand = String.Format(@"select cpsID from CityPlanStandard where cpsNumber='{0}'", number); Sql sql = new Sql(); int cpsID = sql.selectCityPlanStandardIDByCpsNumber(sqlCommand); if (cpsID == C.ERROR_INT) return null; CityPlanStandard cityPlanStandard = new CityPlanStandard(); cityPlanStandard.id = cpsID; cityPlanStandard.select(); return cityPlanStandard; }
public static bool IsCityPlanStandardNumberAndShortDescription(string number, string shortDescription) { string SqlCommand = String.Format(@"select cpsID from CityPlanStandard where cpsNumber='{0}'", number); Sql sql = new Sql(); int cpsID = sql.selectCityPlanStandardIDByCpsNumber(SqlCommand); if (cpsID == C.ERROR_INT) return false; CityPlanStandard cityPlanStandard = new CityPlanStandard(); cityPlanStandard.id = cpsID; cityPlanStandard.select(); return cityPlanStandard.shortDescription == shortDescription; }