예제 #1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(E_Model.AccountRole model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into SYS_ACCOUNT_ROLE(");
            strSql.Append("ACCOUNTID,ROLEID)");

            strSql.Append(" values (");
            strSql.Append(":ACCOUNTID,:ROLEID)");
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());

            db.AddInParameter(dbCommand, "ACCOUNTID", DbType.String, model.ACCOUNTID);
            db.AddInParameter(dbCommand, "ROLEID", DbType.String, model.ROLEID);
            db.ExecuteNonQuery(dbCommand);
        }
예제 #2
0
 public void Add(E_Model.AccountRole model)
 {
     dal.Add(model);
 }