コード例 #1
0
 public List<tbBill_customers> tbBill_customers_GetById(string Id)
 {
     List<Data.tbBill_customers> list = new List<Data.tbBill_customers>();
     using (SqlCommand dbCmd = new SqlCommand("sp_tbBill_customers_GetById", GetConnection()))
     {
         Data.tbBill_customers obj = new Data.tbBill_customers();
         dbCmd.CommandType = CommandType.StoredProcedure;
         dbCmd.Parameters.Add(new SqlParameter("@billid", Id));
         SqlDataReader dr = dbCmd.ExecuteReader();
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 list.Add(obj.tbBill_customersIDataReader(dr));
             }
             dr.Close();
             //conn.Close();
         }
         else
         {
             dr.Close();
         }
     }
     return list;
 }
コード例 #2
0
 public List<tbBill_customers> tbBill_customers_Paging(string CurentPage, string PageSize, string Lang)
 {
     List<Data.tbBill_customers> list = new List<Data.tbBill_customers>();
     using (SqlCommand dbCmd = new SqlCommand("sp_tbBill_customers_Paging", GetConnection()))
     {
         Data.tbBill_customers obj = new Data.tbBill_customers();
         dbCmd.CommandType = CommandType.StoredProcedure;
         dbCmd.Parameters.Add(new SqlParameter("@CurentPage", CurentPage));
         dbCmd.Parameters.Add(new SqlParameter("@PageSize", PageSize));
         dbCmd.Parameters.Add(new SqlParameter("@Lang", Lang));
         SqlDataReader dr = dbCmd.ExecuteReader();
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 list.Add(obj.tbBill_customersIDataReader(dr));
             }
             dr.Close();
             //conn.Close();
         }
         else
         {
             dr.Close();
         }
     }
     return list;
 }