/// <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); }
public void Add(E_Model.AccountRole model) { dal.Add(model); }