/// <summary>
 ///  ����һ������
 /// </summary>
 public void Add(PartProductModel model)
 {
     DbCommand dbCommand = dbw.GetStoredProcCommand("UP_pdPartProduct_ADD");
     dbw.AddInParameter(dbCommand, "ProductId", DbType.Int32, model.ProductId);
     dbw.AddInParameter(dbCommand, "PartProductId", DbType.Int32, model.PartProductId);
     dbw.ExecuteNonQuery(dbCommand);
 }
 /// <summary>
 /// ����ʵ�������
 /// </summary>
 public PartProductModel ReaderBind(IDataReader dataReader)
 {
     PartProductModel model=new PartProductModel();
     object ojb;
     ojb = dataReader["ProductId"];
     if(ojb != null && ojb != DBNull.Value)
     {
         model.ProductId=(int)ojb;
     }
     ojb = dataReader["PartProductId"];
     if(ojb != null && ojb != DBNull.Value)
     {
         model.PartProductId=(int)ojb;
     }
     return model;
 }
 /// <summary>
 /// ����һ������
 /// </summary>
 public void Update(PartProductModel model)
 {
     dal.Update(model);
 }
 /// <summary>
 /// ����һ������
 /// </summary>
 public void Add(PartProductModel model)
 {
     dal.Add(model);
 }
 /// <summary>
 /// ��������б�
 /// </summary>
 public List<PartProductModel> GetModelList(string strWhere)
 {
     DataSet ds = dal.GetList(strWhere);
     List<PartProductModel> modelList = new List<PartProductModel>();
     int rowsCount = ds.Tables[0].Rows.Count;
     if (rowsCount > 0)
     {
         PartProductModel model;
         for (int n = 0; n < rowsCount; n++)
         {
             model = new PartProductModel();
             if(ds.Tables[0].Rows[n]["ProductId"].ToString()!="")
             {
                 model.ProductId=int.Parse(ds.Tables[0].Rows[n]["ProductId"].ToString());
             }
             if(ds.Tables[0].Rows[n]["PartProductId"].ToString()!="")
             {
                 model.PartProductId=int.Parse(ds.Tables[0].Rows[n]["PartProductId"].ToString());
             }
             modelList.Add(model);
         }
     }
     return modelList;
 }