Esempio n. 1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(E_Model.BrandStudent model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into CMS_BRAND_STUDENT(");
            strSql.Append("BRANDID,STUDENTID)");

            strSql.Append(" values (");
            strSql.Append("@BRANDID,@STUDENTID)");
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());

            db.AddInParameter(dbCommand, "BRANDID", DbType.AnsiString, model.BRANDID);
            db.AddInParameter(dbCommand, "STUDENTID", DbType.AnsiString, model.STUDENTID);

            db.ExecuteNonQuery(dbCommand);
        }
Esempio n. 2
0
 public void Add(E_Model.BrandStudent model)
 {
     dal.Add(model);
 }