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

            strSql.Append("insert into SYS_ACCOUNT_DUTY(");
            strSql.Append("ACCOUNTID,DUTYID)");

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

            db.AddInParameter(dbCommand, "ACCOUNTID", DbType.String, model.ACCOUNTID);
            db.AddInParameter(dbCommand, "DUTYID", DbType.String, model.DUTYID);
            db.ExecuteNonQuery(dbCommand);
        }
Exemplo n.º 2
0
 public void Add(E_Model.AccountDuty model)
 {
     dal.Add(model);
 }