/// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(KPS.Model.Manufacturer model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update PSI_Manufacturer set ");
            strSql.Append("manufacturerName=@manufacturerName,");
            strSql.Append("manufacturerTel=@manufacturerTel,");
            strSql.Append("manufacturerAdd=@manufacturerAdd");
            strSql.Append(" where manufacturerID=@manufacturerID");
            OleDbParameter[] parameters =
            {
                new OleDbParameter("@manufacturerName", OleDbType.VarChar, 255),
                new OleDbParameter("@manufacturerTel",  OleDbType.VarChar, 255),
                new OleDbParameter("@manufacturerAdd",  OleDbType.VarChar, 255),
                new OleDbParameter("@manufacturerID",   OleDbType.Integer, 4)
            };
            parameters[0].Value = model.manufacturerName;
            parameters[1].Value = model.manufacturerTel;
            parameters[2].Value = model.manufacturerAdd;
            parameters[3].Value = model.manufacturerID;

            int rows = DbHelperOleDb.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(KPS.Model.Manufacturer model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into PSI_Manufacturer(");
            strSql.Append("manufacturerName,manufacturerTel,manufacturerAdd)");
            strSql.Append(" values (");
            strSql.Append("@manufacturerName,@manufacturerTel,@manufacturerAdd)");
            OleDbParameter[] parameters =
            {
                new OleDbParameter("@manufacturerName", OleDbType.VarChar, 255),
                new OleDbParameter("@manufacturerTel",  OleDbType.VarChar, 255),
                new OleDbParameter("@manufacturerAdd",  OleDbType.VarChar, 255)
            };
            parameters[0].Value = model.manufacturerName;
            parameters[1].Value = model.manufacturerTel;
            parameters[2].Value = model.manufacturerAdd;

            int rows = DbHelperOleDb.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public KPS.Model.Manufacturer DataRowToModel(DataRow row)
 {
     KPS.Model.Manufacturer model = new KPS.Model.Manufacturer();
     if (row != null)
     {
         if (row["manufacturerID"] != null && row["manufacturerID"].ToString() != "")
         {
             model.manufacturerID = int.Parse(row["manufacturerID"].ToString());
         }
         if (row["manufacturerName"] != null)
         {
             model.manufacturerName = row["manufacturerName"].ToString();
         }
         if (row["manufacturerTel"] != null)
         {
             model.manufacturerTel = row["manufacturerTel"].ToString();
         }
         if (row["manufacturerAdd"] != null)
         {
             model.manufacturerAdd = row["manufacturerAdd"].ToString();
         }
     }
     return(model);
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public KPS.Model.Manufacturer GetModel(int manufacturerID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select manufacturerID,manufacturerName,manufacturerTel,manufacturerAdd from PSI_Manufacturer ");
            strSql.Append(" where manufacturerID=@manufacturerID");
            OleDbParameter[] parameters =
            {
                new OleDbParameter("@manufacturerID", OleDbType.Integer, 4)
            };
            parameters[0].Value = manufacturerID;

            KPS.Model.Manufacturer model = new KPS.Model.Manufacturer();
            DataSet ds = DbHelperOleDb.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public KPS.Model.Manufacturer DataRowToModel(DataRow row)
 {
     KPS.Model.Manufacturer model=new KPS.Model.Manufacturer();
     if (row != null)
     {
         if(row["manufacturerID"]!=null && row["manufacturerID"].ToString()!="")
         {
             model.manufacturerID=int.Parse(row["manufacturerID"].ToString());
         }
         if(row["manufacturerName"]!=null)
         {
             model.manufacturerName=row["manufacturerName"].ToString();
         }
         if(row["manufacturerTel"]!=null)
         {
             model.manufacturerTel=row["manufacturerTel"].ToString();
         }
         if(row["manufacturerAdd"]!=null)
         {
             model.manufacturerAdd=row["manufacturerAdd"].ToString();
         }
     }
     return model;
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public KPS.Model.Manufacturer GetModel(int manufacturerID)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("select manufacturerID,manufacturerName,manufacturerTel,manufacturerAdd from PSI_Manufacturer ");
            strSql.Append(" where manufacturerID=@manufacturerID");
            OleDbParameter[] parameters = {
                    new OleDbParameter("@manufacturerID", OleDbType.Integer,4)
            };
            parameters[0].Value = manufacturerID;

            KPS.Model.Manufacturer model=new KPS.Model.Manufacturer();
            DataSet ds=DbHelperOleDb.Query(strSql.ToString(),parameters);
            if(ds.Tables[0].Rows.Count>0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }