Ejemplo n.º 1
0
 public List<WeightCharge> GetAllWeightCharge()
 {
     List<WeightCharge> list = new List<WeightCharge>();
     using (SqlCommand cmd = GetCommand("getAllWeightCharge", CommandType.StoredProcedure))
     {
         WeightCharge weightCharge = new WeightCharge();
         using (SqlDataReader dr = ExeDataReader(cmd))
         {
             if (dr.HasRows)
             {
                 while (dr.Read())
                 {
                     list.Add(weightCharge.WeightChargeIDatareader(dr));
                 }
             }
         }
         weightCharge = null;
     }
     return list;
 }
Ejemplo n.º 2
0
 public List<WeightCharge> GetWeightChargeByID(string id)
 {
     List<WeightCharge> list = new List<WeightCharge>();
     using (SqlCommand cmd = GetCommand("getWeightChargeByID", CommandType.StoredProcedure))
     {
         AddParameter(cmd, "@ID", Convert.ToInt32(id));
         WeightCharge weightCharge = new WeightCharge();
         using (SqlDataReader dr = ExeDataReader(cmd))
         {
             if (dr.HasRows)
             {
                 while (dr.Read())
                 {
                     list.Add(weightCharge.WeightChargeIDatareader(dr));
                 }
             }
         }
         weightCharge = null;
     }
     return list;
 }