public ProductAttrValueInfo GetProductAttrValueInfo(string _proID,int _attrID)
 {
     ProductAttrValueInfo productAttrValueInfo = null;
     StringBuilder sql= new StringBuilder();
     sql.Append("SELECT * FROM");
     sql.Append(" [Tbl_ProductAttrValue]");
     sql.Append(" WHERE");
     sql.Append(" [ProID]=@ProID");
     sql.Append(" AND");
     sql.Append(" [AttrID]=@AttrID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ProID",_proID),
         dbhelper.CreateParameter("@AttrID",_attrID)
       };
       using(IDataReader reader=dbhelper.ExecuteReader(sql.ToString(),p_Parms))
       {
         if(reader.Read())
         {
             productAttrValueInfo = ProductAttrValueInfo.SetValue(reader);
         }
       }
     }
     return productAttrValueInfo;
 }
Beispiel #2
0
 public PriceLevelInfo GetPriceLevelInfo(int _id)
 {
     PriceLevelInfo priceLevelInfo = null;
     StringBuilder sql= new StringBuilder();
     sql.Append("SELECT * FROM");
     sql.Append(" [Tbl_PriceLevel]");
     sql.Append(" WHERE");
     sql.Append(" [ID]=@ID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@ID",_id)
       };
       using(IDataReader reader=dbhelper.ExecuteReader(sql.ToString(),p_Parms))
       {
         if(reader.Read())
         {
             priceLevelInfo = PriceLevelInfo.SetValue(reader);
         }
       }
     }
     return priceLevelInfo;
 }
Beispiel #3
0
 public AutoNumInfo GetAutoNumInfo(int _keyID)
 {
     AutoNumInfo autoNumInfo = null;
     StringBuilder sql= new StringBuilder();
     sql.Append("SELECT * FROM");
     sql.Append(" [AutoNum]");
     sql.Append(" WHERE");
     sql.Append(" [KeyID]=@KeyID");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@KeyID",_keyID)
       };
       using(IDataReader reader=dbhelper.ExecuteReader(sql.ToString(),p_Parms))
       {
         if(reader.Read())
         {
             autoNumInfo = AutoNumInfo.SetValue(reader);
         }
       }
     }
     return autoNumInfo;
 }
Beispiel #4
0
 public CustomerInfo GetCustomerInfo(string _customerNO)
 {
     CustomerInfo customerInfo = null;
     StringBuilder sql= new StringBuilder();
     sql.Append("SELECT * FROM");
     sql.Append(" [Tbl_Customer]");
     sql.Append(" WHERE");
     sql.Append(" [CustomerNO]=@CustomerNO");
     using(NetShopHelper dbhelper=new NetShopHelper())
     {
       IDbDataParameter[] p_Parms = new IDbDataParameter[]{
         dbhelper.CreateParameter("@CustomerNO",_customerNO)
       };
       using(IDataReader reader=dbhelper.ExecuteReader(sql.ToString(),p_Parms))
       {
         if(reader.Read())
         {
             customerInfo = CustomerInfo.SetValue(reader);
         }
       }
     }
     return customerInfo;
 }