/// <summary> /// 增加一条数据 /// </summary> public void Add(E_Model.BrandTeacher model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into CMS_BRAND_TEACHER("); strSql.Append("BRANDID,TEACHERID)"); strSql.Append(" values ("); strSql.Append("@BRANDID,@TEACHERID)"); Database db = DatabaseFactory.CreateDatabase(); DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString()); db.AddInParameter(dbCommand, "BRANDID", DbType.AnsiString, model.BRANDID); db.AddInParameter(dbCommand, "TEACHERID", DbType.AnsiString, model.TEACHERID); db.ExecuteNonQuery(dbCommand); }
public void Add(E_Model.BrandTeacher model) { dal.Add(model); }