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

            strSql.Append("insert into SYS_MAIN_ROLE(");
            strSql.Append("MAINID,ROLEID)");

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

            db.AddInParameter(dbCommand, "MAINID", DbType.String, model.MAINID);
            db.AddInParameter(dbCommand, "ROLEID", DbType.String, model.ROLEID);
            db.ExecuteNonQuery(dbCommand);
        }
Beispiel #2
0
 public void Add(E_Model.MainRole model)
 {
     dal.Add(model);
 }