private void CreateParameters(DBCommandWrapper dbCommandWrapper) { dbCommandWrapper.AddInParameter("DEPARTMENTID", DbType.Decimal, "DEPARTMENTID", DataRowVersion.Current); dbCommandWrapper.AddInParameter("FIRSTNAME", DbType.AnsiString, "FIRSTNAME", DataRowVersion.Current); dbCommandWrapper.AddInParameter("LASTNAME", DbType.AnsiString, "LASTNAME", DataRowVersion.Current); dbCommandWrapper.AddInParameter("AGE", DbType.Decimal, "AGE", DataRowVersion.Current); dbCommandWrapper.AddInParameter("HIREDATE", DbType.DateTime, "HIREDATE", DataRowVersion.Current); dbCommandWrapper.AddInParameter("SALARY", DbType.Decimal, "SALARY", DataRowVersion.Current); dbCommandWrapper.AddInParameter("ISACTIVE", DbType.Decimal, "ISACTIVE", DataRowVersion.Current); dbCommandWrapper.AddParameter("TS", DbType.Decimal, ParameterDirection.InputOutput, "TS", DataRowVersion.Current, null); }
protected override DBCommandWrapper GetInsertCommand() { // Create the Database object, using the default database service. The // default database service is determined through configuration. Database db = GetDatabase(); string sqlCommand = this.SchemaStoredProcedureWithSeparator + "daab_AddDefaultValues"; DBCommandWrapper dbCommandWrapper = db.GetStoredProcCommandWrapper(sqlCommand); CreateParameters(dbCommandWrapper); // Add autokey parameters dbCommandWrapper.AddParameter("RefNumber", DbType.Decimal, 0, ParameterDirection.Output, true, 0, 0, "RefNumber", DataRowVersion.Default, Convert.DBNull); return(dbCommandWrapper); }