Example #1
0
 public bool DeleteFuelType(int fuelTypeID)
 {
     string sql = " Delete  FuelTypes where FuelTypeID =" + fuelTypeID;
     db = new DBAccess();
     int rows_affected = db.ExecuteNonQuery(sql);
     if (rows_affected == 1) return true;
     else return false;
 }
Example #2
0
 public bool UpdateFuelType(FuelTypeDTO fuleTypeDTO)
 {
     string sql = "update FuelTypes set FuelTypeName='" + fuleTypeDTO.FuleTypeName
         + @"' where FuelTypeID =" + fuleTypeDTO.FuelTypeID;
     db = new DBAccess();
     int rows_affected = db.ExecuteNonQuery(sql);
     if (rows_affected == 1) return true;
     else return false;
 }
Example #3
0
 public bool NewFuelType(FuelTypeDTO fuleTypeDTO)
 {
     string sql = "Insert into FuleTypes (FuelTypeName) values ("+
         "'"+fuleTypeDTO.FuleTypeName+@"')";
     db = new DBAccess();
     int rows_affected = db.ExecuteNonQuery(sql);
     if (rows_affected == 1) return true;
     else return false;
 }