public List<DistanceCharge> GetAllDistanceCharge()
 {
     List<DistanceCharge> list = new List<DistanceCharge>();
     using (SqlCommand cmd = GetCommand("getAllDistanceCharge", CommandType.StoredProcedure))
     {
         DistanceCharge distanceCharge = new DistanceCharge();
         using (SqlDataReader dr = ExeDataReader(cmd))
         {
             if (dr.HasRows)
             {
                 while (dr.Read())
                 {
                     list.Add(distanceCharge.DistanceChargeIDatareader(dr));
                 }
             }
         }
         distanceCharge = null;
     }
     return list;
 }
 public List<DistanceCharge> GetDistanceChargeByID(string id)
 {
     List<DistanceCharge> list = new List<DistanceCharge>();
     using (SqlCommand cmd = GetCommand("getDistanceChargeByID", CommandType.StoredProcedure))
     {
         AddParameter(cmd, "@ID", Convert.ToInt32(id));
         DistanceCharge distanceCharge = new DistanceCharge();
         using (SqlDataReader dr = ExeDataReader(cmd))
         {
             if (dr.HasRows)
             {
                 while (dr.Read())
                 {
                     list.Add(distanceCharge.DistanceChargeIDatareader(dr));
                 }
             }
         }
         distanceCharge = null;
     }
     return list;
 }