Exemple #1
0
 public override bool select()
 {
     if (cpsID == C.ERROR_INT)
         return false;
     string sqlCommand = String.Format("select * from CityPlanStandard where cpsID = {0}", cpsID.ToString());
     Sql sql = new Sql();
     SqlDataReader reader = sql.selectCityPlanStandard(sqlCommand);
     reader.Read();
     cpsID = Int32.Parse(reader[0].ToString());
     cpsNumber = reader[1].ToString();
     cpsShortDescription = reader[2].ToString();
     cpsLongDescription = reader[3].ToString();
     sql.closeConnection();
     return true;
 }