Version 1.47 - 4/16/2012 -------------------------------------------------------------------------- Modified \Templates\ASPNET-AddEditDel-PDSAFW5x-WebForms\VB_AddEditDelete_WebForm.txt Template Removes duplicate Imports if not using Separate assemblies Modified \Templates\ASPNET-Snippets\VB_ASP_AddEditDeleteCodeBehind.txt Changed "Public Sub BindGridSizes()" to "Protected Overloads Sub BindGridSizes()" Worked on Null setting problem There was a problem with 'int' data types where the 'value for null' was a zero. If the value was null in the table, and you then read the value in, the originalValue was stored as a zero. When you then set the value to a zero, the change was not detected and thus a null was put back into the database where you expected it to be set to a zero Removed //prop.ValueForNull = <|COLUMN_DOTNET_VALUE_FOR_NULL|>; from the InitDataColumns() method in the .Data.Generated class This was causing problems with updating 'int' columns to 0 when they were null in the table Added Entity.SetOriginalValueForProperty(<|CLASS_NAME|>Validator.ColumnNames.<|COLUMN_PUBLIC_PROPERTY|>, ValidatorObject.Properties.GetByName(<|CLASS_NAME|>Validator.ColumnNames.<|COLUMN_PUBLIC_PROPERTY|>).Value); to the ColumnCollectionToEntityData() method in the Data.Generated class This helps us figure out the original value and compare to the value you set in code. If the original value is Null and you set the value to a 0 for example, then the 0 will be stored because the two values are different. Modified the PDSA.Common.dll Changed the SetOriginalValueForProperty method from protected to public Fixed a bug in the SetOriginalValueForProperty where it was not adding a property to the PropertyTracker collection if it was not there. All of the changes above means that if you really want to set a null in a column of a table, you need to call mgr.Entity.SetAsNullFlagForProperty("COLUMNNAME", true); explicitly This is probably a better idea anyway Added ASP.NET MVC Generation NOTES: MVC will currently only generate if you are using a IDENTITY or SEQUENCE NUMBER Only for C# right now, will add VB in the next version Added \Templates\ASPNET-AddEditDelete-MVC folder CS_Controller.txt CS_Create.txt CS_Delete.txt CS_Details.txt CS_Edit.txt CS_Index.txt Added \Xml\CS_ASPNET_AddEditDelete-MVC.txt Modified \Xml\CSharp_Templates\CS_Snippets.xml file Added \Templates\CSSnippets\CS_ASPNetMVCModelPKParams.txt Added \Templates\CSSnippets\CS_ASPNetMVCPKParams.txt Added \Templates\CSSnippets\CS_ASPNetMVCViewModelPKParams.txt Added entry in CS_TemplateGroups.xml for the new MVC templates Added the ability to add [CLASS_NAME] in the GenerateToSubFolder in the Template xml files Example: ASP.NET-MVC-Pages\Views\[CLASS_NAME] This allows us to generate views in MVC for each individual class If you put this token into the GenerateToSubFolder only the OutputFilePrefix/OutputFileSuffix elements will be used in the file name, not the Class Name This allows us to generate names such as Index.cshtml and Delete.cshtml instead of IndexProduct.cshtml and DeleteProduct.cshtml Added new loop qualifier {|FOR EACH COLUMN:IsPKNoEdit=True|} This is used in the Edit.cshtml page Added {|REMOVE_WHEN_AUTONUMBER|} to remove code when there is an auto-number primary key field like SQL Identity. Version 1.46 - 4/10/2012 -------------------------------------------------------------------------- Fixed bug when trying to set a DateTime data type min/max value caused an error When you save a table and you have set the project to generate FK methods, all related tables are now read, statements are created and they are ready to be generated. Added the following properties to the PDSAProperty class /// /// Get/Set whether or not to display this property in a Grid /// public bool DisplayInGrid { get; set; } /// /// Get/Set the order in which to display this property /// public int DisplayOrder { get; set; } /// /// Get/Set whether or not to display this property in a detail edit panel /// public bool DisplayInEdit { get; set; } /// /// Get/Set whether or not this property should be read-only in an edit panel /// public bool IsFieldReadOnlyOnEdit { get; set; } Modified the {|FOR EACH FOREIGNKEYCOLUMN|} to be {|FOR EACH FOREIGNKEYCOLUMN:DisplayInEdit=True|} where applicable Also changed the default setting of DisplayInEdit for all FK's from false to true so it works with the above change Added PasswordBox style to WPFEditStyles.xaml resource file Created a new Template Group for the Asynchronous View Models We now generate everything required for each type of application into the appropriate Gen folder For example, all \BusinessClasses, \DataClasses\, and \EntityClasses folders are generated under ASP.NET, WPF and Silverlight folders This makes it easy for you to just visit one folder to copy all files into your project. Created a new XML file that is now called after generation This XML file allows you to specify copy rules for copying folders under other folders in the generation folder We have set this file up to copy the \BusinessClasses, \DataClasses\, and \EntityClasses under each of the UI folders. This allows you to just have to visit one folder to copy all files into your project. Updated documentation Version 1.45 - 3/21/2012 -------------------------------------------------------------------------- DLL Changes -Eliminated the PDSA.Validation.DLL by moving all classes into the PDSA.Common.dll. The namespace is still the same. -Eliminated the PDSA.UI.Library.DLL by moving all classes into the PDSA.Common.dll. The namespace is still the same. -Eliminated the PDSA.XmlDataClasses.DLL by moving all classes into the PDSA.Common.dll. The namespace is still the same. -All projects must now reference the Desaware.MachineLicense40.dll. This includes any projects you use and distribute to your users. -We have eliminated the Assemblies-For-RuntimeOnly. All DLLs are now licensed for development and runtime -Added IsValueNull() method to the Validator class. You can now test to see if a value is null after loading using the following code: mgr.Validator.IsValueNull("Cost") or mgr.Validator.IsValueNull(ProductValidator.ColumnNames.Cost) Samples -Added new WPF Asynchrous Project Template under \TemplateProjects\WPF\Sample.Project-WPF-Async.CS Added the following column to the DBProject table -ProjectSolutionFile varchar(500) NULL -This will be used in a future version so you can select where to generate Added the following columns to the DBColumn table -GridAttribute varchar(500) NULL - Allows you to specify any extra attributes you want on Grid columns. For example you could add 'IsSortable="True" IsFilterable="True"' and these attributes would be added to your grid column control -EditAttribute varchar(500) NULL - Allows you to specify any extra attributes when generating text boxes or other edit controls. -DisplayInGrid bit NULL - Whether or not to display this column when generating a grid -DisplayInEdit bit NULL - Whether or not to display this column in the edit panel on an edit screen -IsFieldReadOnlyOnEdit bit NULL - Whether or not to set the ReadOnly property for a control when editing -IsReturnValueInService bit NULL - This will control whether or not this property will be returned after an Insert or Update in the Response object from a WCF service call -Tooltip varchar(80) NULL - The value to display in a Tooltip over the edit field -DisplayOrder int NULL - Used to put the columns on the screen in this order. We initialize this value by taking the ordinal position of the column and multiplying it times 10 Added the following column tokens <|COLUMN_ISREADONLY_ONEDIT|> <|COLUMN_GRID_ATTRIBUTES|> <|COLUMN_EDIT_ATTRIBUTES|> <|COLUMN_TOOLTIP|> <|COLUMN_DISPLAYORDER|> Column Information Screen -Lots of screen design changes to accomodate all of the new fields listed above. -Added checking on Numeric fields on Column Information screen. Minimum Value must be less than the Maximum Value We now check for numeric values entered in Minimum Value, Maximum Value and Min Length fields Table Information Screen -You can now edit some of the column information right on the grid -Fixed bug after hitting Refresh where it would not read a new column in if you added one during the same session of Haystack Also, fixed for Views and Stored Procedure Parameters If you now add or delete a column the 'All' and 'Search' SELECT statements are automatically rebuilt along with the 'All' INSERT and UPDATE. If you change the Is Insertable, Is Selectable, Is Updatable fields on the Column Information Screen, the appropriate SELECT All, INSERT All or UPDATE All statements will be automatically regenerated. -You can now search on a table using just a partial name and no schema filled in. -After generating an object, the 'Generate' flag is now reset back to False Stored Proc Screen -You can now type values right into the grid -You can now select the Entity to Map To from a drop down of all "Ready To Gen" tables -You can now search on a stored proc using just a partial name and no schema filled in. -After generating an object, the 'Generate' flag is now reset back to False View Information Screen -You can now edit some of the column information right on the grid -After generating an object, the 'Generate' flag is now reset back to False Template Group Screen -Added a new screen which will allow you to unselect which things you do not wish to generate. -For instance if you never generate WPF or Silverlight you can uncheck the "IsSelected" field. -You will need to stop and start Haystack for this to take affect. -Unselecting does not eliminate the Folders from the [My Documents]\Haystack\Gen folder. However, you can manually delete these and they will not be re-generated for any templates that are IsSelected=False Haystack.exe.config file changes -These will be used in a future version to allow you to not display certain tables and schemas. New Generation Tokens Added -Added {|FOR EACH GRIDCOLUMN|} looping token Allows you to loop through all columns that have DisplayInGrid marked as true -Added {|FOR EACH EDITCOLUMN|} looping token Allows you to loop through all columns that have DisplayInEdit marked as true -Added {|FOR EACH STANDARDFIELDCOLUMN|} looping token Used to loop through just the list of standard fields in an object -Added {|FOR EACH SERVICERETURNCOLUMN|} looping token This will be used in a future version for controlling what data gets returned from a service -Added <|STATEMENT_NAME_FUNCTION|> token This is used in VB for any reserved words that may be used in a function name. Previously it would be [] around the statement name, causing an invalid function name -Added the following qualifiers on {|FOR EACH COLUMN|} DisplayInGrid - Ex. {|FOR EACH COLUMN:DisplayInGrid=True|} - However, you will probably want to use {|FOR EACH GRIDCOLUMN|} DisplayInEdit - Ex. {|FOR EACH COLUMN:DisplayInEdit=True|} - However, you will probably want to use {|FOR EACH EDITCOLUMN|} IsReturnValueInService - Ex. {|FOR EACH COLUMN:IsReturnValueInService=True|} IsFieldReadOnlyOnEdit - Ex. {|FOR EACH COLUMN:IsFieldReadOnlyOnEdit=True|} Code Generation Changes -Added DictionaryToEntity() method to the Table Manager class This allows you to pass in a generic Dictionary object and this method will return an Entity object with the values from the Dictionary object This is used a lot in ASP.NET web applications. -Overloaded the InitEntityObject() method in the Table Manager class to accept an 'Entity' class -Added ControlsToDictionary() method in the code behind of ASP.NET web pages/user controls. This method moves the control values into a Dictionary generic collection This method is now called from the ValidateDataTypes() method to create the dictionary object This allows you to call this method and then pass the resulting dictionary object to the DictionaryToEntity() method in the Table Manager class -Changed the Title on Generated WPF User Controls to bind to RecordNamePlural -Modified all templates to use the new tokens added in this version -Modified the ASP.NET View Model to use <|CLASS_NAME|>Manager when storing the manager in session XML Generation -Fixed issues with XML generation -Added Search field to XML Generation You still have to build the search functionality. This will be added in a future version Haystack XML File Changes -Added to SqlServer_DBTypes.xml and Oracle_DBTypes.xml file and use that value to set the initial value of DisplayInGrid -Added to SqlServer_DBTypes.xml file and Oracle_DBTypes.xml and use that value to set the initial value of DisplayInEdit Set DisplayInGrid/DisplayInEdit to false for all uniqueidentifiers, auto-generated primary keys, all standard fields, and data types: binary, image, text, xml, ntext, etc. -Added to StandardFields.xml file and use that value to set the initial value of DisplayInGrid -Added to StandardFields.xml file and use that value to set the initial value of DisplayInEdit -Added to StandardFields.xml file and use that value to set the initial value of IsReturnValueInService -Added ProjectTypes.xml file to help you select which types of projects you wish to generate -Added 'Resume' and 'Event' to ReservedWords.xml file Misc Fixes -Fixed bug where calling RowCount() after setting a WhereFilter two times in a row caused an exception. -Fixed bug where the Header Text for field names such as Object_Id would have two spaces between Object and Id because we were looking for upper case letters and and underscore on which to split words. -Added better error handling when processing templates so it tells you which template is in error. -Added new check box on Code Generation screen for "Open Gen Folder" and removed the button that used to perform this function -Fixed bug where _ViewModel and _PageNumber had a hard-coded underscore in the templates instead of using PRIVATE_VAR_PREFIX token Version 1.44 - 3/1/2012 -------------------------------------------------------------------------- In WPF Edit Forms, modified the IsExpanded property to use {Binding Path=IsSearchAreaEnabled} This helps on smaller displays when the Validation rules appear Modified the Title on WPF User Controls to use 16 point font instead of 20. Added Silverlight Sample showing how to do a Parent/Child relationship Located under the \Samples\CSharp-Silverlight\ParentChild folder Added NotAuthenticated to the PDSAServiceStatus Enumeration This will be used when we need to authenticate to a WCF Service from an application Modified Licensing to solve problem with DLLs having slow performance at runtime Modified the Code Generation Screen Removed the "Clean Gen Folder" button and turned this into a check box Added CleanGenFolderPriorToGeneration to App.Config This setting will set the new Check Box for Cleaning the Generation Folder Set this to true in your config file to clean out your generation folder each time you generate Fixed problem in Validation dll where if you did not set a property, it would sometimes throw an exception in SetDirtyFlag method Version 1.43 - 2/20/2012 -------------------------------------------------------------------------- Forgot to include the Haystack-v1.41.sql file in the \SqlScripts\Update folder. This was not a big deal if you connected up to your old Haystack database normally, but for anyone that uses a different location for your Haystack database, you need this file in order to upgrade to the new version. Wrapped a try...catch around retrieving then new ConfigFileLocation in the Haystack.exe.config. This is reading from the Program Files folder where you install Haystack. For some reason, some anti-virus software had an issue with reading this. Added GetDataSetAsExcelString() method to the base data class for the DataObject string excel = mgr.DataObject.GetDataSetAsExcelString(); Modified the Haystack.exe.config file so the following values are now using the Special Folder Tokens TemplatesFolder=[AppPath]\Templates XmlFolder=[AppPath]\Xml XsdFolder=[AppPath]\Xsd These tokens are now stored this way in the DBProject table in the Haystack database and expanded at runtime. You can still modify them when you save the project, but if you leave them as expanding tokens, this helps when you have two programmers on two different operating systems and one installs Haystack into C:\Program Files\Haystack and one installs into C:\Program Files (x86)\Haystack and they are both generating code for the same project. The GenerationFolder in Haystack.exe.config used to be expanded when read from the .Config file. Now it is expanded at generation time. This token is now stored this way in the DBProject table in the Haystack database and expanded at runtime. Added "Application Name=" to connection strings Added the ability for you to add Application Name= to your connection strings The SQL Connection Builder screen has a text box for Application Name Modified the LoadByPK() method. Set the WhereFilter to None because the LoadByPK method sets the SelectFilter to PK which contains the WHERE clause that includes the PK WhereFilter = WhereFilters.None In the Search() method of the ViewModels set the WhereFilter = WhereFilters.None. This fixes the problem if you call the Search after you had previously set the WhereFilter to something else. Fixed bug where if you tabbed into the Stored Proc name field when looking at a generated stored proc for a table it would remove the "." after the schema name. Added an override of the ToString() method in the Entity classes This method returns the primary key field name and value and the description field name and value This is useful when viewing collection classes in the debugger in Visual Studio Added a chapter on Deploying ASP.NET Web Projects Fixed FK bug when generating Combo Boxes in Silverlight Version 1.42 - 2/3/2012 -------------------------------------------------------------------------- Added ConfigFileLocation element in Haystack.exe.config that you can modify prior to running Haystack the first time to specify where to put the Haystack.exe.config file. This is useful if you have mapped your My Documents folder to a network folder and that folder is not available when you are disconnected. Changed commented out RETURNVALUE property in partial entity class from 'int' data type to 'long' If you enter a Namespace that has invalid characters in the Project Information screen, those characters are now removed. We now check to ensure the Private Variable prefix is filled in. Removed the 'Column Alias' field. It was not being used. When saving a column we now check for duplicate column, public and private property names. In Manager class added Get method by Foreign Key where the FK columns are passed into the method. Added support for Silverlight Drop Down list with Foreign Keys in C# only (will add VB next version) Had to add PDSAComboBoxExtension class with bug fix for SelectedValue and SelectedValuePath in Silverlight 4 Added code to Silverlight view model and to the generated Silverlight user control Added new stylesheet for IE specific things. Styles/Styles-ieonly.css Added the following at the top of all generated Web Form pages The generated web pages now look consistent in IE, Opera, FireFox and Chrome Added InitEntityObject() method that is called from the Init() method in the Manager class This class will be filled in with code to initialize any standard fields You can also add any other default values as needed to initialize the 'Entity' object in the Manager class Added entity.IsDirty = false; in the GetData() method in the Code Behind of ASP.NET web pages and user controls. This fixes a bug related to Audit Tracking Added a DataModificationAction property on the Validator classes When ValidateCore() is called from Insert or Update, you can now check this property to see if it was the Insert or Update methods that called the validation This allows you to only check certain rules during an insert or update. Added a new Style to the WPFEditStyles.xaml and SilverlightEditStyles.xaml Added a new Row to the WPF and Silverlight User Controls This row is for a User Control Title Added Refresh.png to Silverlight Resources Added ProductSearchByNameCost stored proc to PDSASamples table Added new VB ASP.NET Search sample using the ProductSearchByNameCost stored proc Modified the Column Information screen to only show pertinent information when displaying a Stored Procedure column Fixed bug where an 'int' parameter in a stored proc was getting mapped to a Long in .NET Version 1.41 - 1/26/2012 -------------------------------------------------------------------------- Lots of work on ASP.NET pages Replaced all tables with
tags A style sheet is now supplied to give a better look and feel right out of the box Drop Down List so you can choose the page size Made all code-generation templates use snippets to make maintenance of ASP.NET templates easier Replaced .jpg images with .PNG images that are sizable on ASP.NET pages Lots of work on other things as well... Below is a list of enhancements... Added IsVisible and IsSelected to Validator.Properties("ColumnName") class You can use these however you see fit. Added <|CLASS_DESCRIPTION|> token to retrieve the current class description Example: Customer We are using this to set the RecordName property on the ViewModel. This is used to help us with multi-lingual capabilities. Added <|CLASS_DESCRIPTION_PLURAL|> token to retrieve the current class description in the 'plural' form Example: Customers Added new remove filter {|REMOVE_WHEN_NO_PDSA_FRAMEWORK|} Lines are removed when the Is PDSA Framework Project is NOT checked in the Project. Added new filter {|REMOVE_WHEN_PDSA_FRAMEWORK|} Lines are removed when the Is PDSA Framework Project IS checked in the Project. Added code in TrackChanges() method in the Manager class to log changes if you are using the PDSA FW 5.0 Changed code in ViewModel class for ASP.NET to call the mgr.Insert, mgr.Update and mgr.Delete instead of mgr.DataObject.Insert, mgr.DataObject.Update and mgr.DataObject.Delete Added Web Forms for PDSA Framework v5.x \Templates\ASPNET-AddEditDel-PDSAFW5x-WebForms\*.* \Xml\CSharp_Templates\CS_ASPNET_AddEditDelete-PDSA-FW5x.xml Made all Web Forms/User Controls consistent for the UI and the Code Behind and the .Designer file Eliminated all tags and now use
tags and controls Added \ASPNET-Snippets\CS_ASP_AddEditDelete.Designer.txt Added \ASPNET-Snippets\VB_ASP_AddEditDelete.Designer.txt Added \ASPNET-Snippets\CS_ASP_ReadOnly.Designer.txt Added \ASPNET-Snippets\VB_ASP_ReadOnly.Designer.txt Replaced all .jpg files with .png files in ASP.NET Web Pages and User Controls Added Styles.css to all template ASP.NET Projects A \Styles folder is now generated with a Styles.css file for adding to any project. Updated the UPDATE by Primary Key statement to include OR (ConcurrencyValue is null) when using standard fields Added code to ensure that the Namespace for a project is a valid identifier Modified the PDSAProperty class so it does not set the IsRequired=True when IsPrimaryKey=True. This is set elsewhere, so it does not need to be set. Added IsPDSAFrameworkProject column to DBProject table in Haystack database This will be used to specify if you are generating code for a PDSAFramework project Added DBObjectDescriptionPlural column to DBObject table in Haystack database We are using this to set the RecordNamePlural property on the ViewModel. This is used to help us with multi-lingual capabilities. Added \SqlScripts\OracleDrops.sql for dropping the Oracle sample tables Added \SqlScripts\AddStandardFieldsToTables.sql for adding PDSA Standard Fields to your tables Added prop.IsPrimaryKey = <|COLUMN_ISPRIMARYKEY|> to the InitDataColumns method to set the primary key field You can now check the AllColumns class to find out which columns are the primary keys Added TotalPrimaryKeys property to AllColumns property in DataObject The PrimaryKey property of the DataTable object that is returned from a GetDataSet/GetDataTable methods are now set automatically. Added CreateDataRowFromEntity() method to the PDSADataClassReadOnly class. public void DataRowSample() { ProductManager mgr = new ProductManager(); // Load up a valid Entity object first mgr.DataObject.LoadByPK(1); // Return a DataRow object from the mgr.Entity object DataRow dr = mgr.DataObject.CreateDataRowFromEntity(); } public void DataRowSample2() { ProductManager mgr = new ProductManager(); Product entity = new Product(); entity.ProductId = 1; entity.ProductName = "A Product"; // etc. // Load up a valid Entity object first mgr.Entity = entity; // Return a DataRow object from the mgr.Entity object DataRow dr = mgr.DataObject.CreateDataRowFromEntity(); } Fixed bug where if you opened the column information window, then closed it, went to the Project Information screen, closed it, then went back to the column, you got an error that it could not find a data type for the column. The last language you used is now saved, so when you create a new project, that language will be the default. Version 1.40 - 1/9/2012 -------------------------------------------------------------------------- Upgraded to new licensing system from Desaware Old license keys will no longer work Current customers will have to be issued new keys Now a 180 day trial license NOTE: Please uninstall the old version of Haystack first Delete the [My Documents]\Haystack folder manually Added ability to generate ASP.NET Web Form Pages Added searching capabilities to web form pages and user controls Simplified the process of creating new applications with Haystack Added _Resources-For-ASP.NET-WebForms folder where all .DLLs and an \Images folder is now located This makes creating a new ASP.NET web application quick and easy Added _Resources-For-Silverlight folder where all .DLLs and an \Images folder is now located This makes creating a new Silverlight application quick and easy Added _Resources-For-WPF folder where all .DLLs and an \Images folder is now located This makes creating a new WPF application quick and easy Added Assemblies-For-RuntimeOnly folder where all .DLLs for your final application are now located. Added TrackChanges() method to Manager class This can be used for your to implement audit tracking Added Asynchronous View Model for WPF Applications In order to use this, you will need to Add a Service Reference to your WPF application, and choose "Generate asynchronous operations" in the Advanced tab of the Add Service Reference dialog In the client side WPF application you only need references to the PDSA.Common, PDSA.UI.Library, PDSA.Validation and PDSA.WPF dlls Added 'Open' menu item Added 'Open Install Folder' to make it easier to get to the 'Resources' folders Moved all other 'Open' menu items that used to be under Haystack under this menu option Upgraded the install process to better detect SQL Express. This should make this a more automated installation process Added ability to turn off loading messages in order to speed up loading table/view/sp process. Moved the constructor of all "Entity" classes into the partial class that is 'not' generated. This will allow you to initialize variables in the constructor Moved the constructor of all "Validator" classes into the partial class that is 'not' generated. This will allow you to initialize variables in the constructor We now save the following defaults into the .Config file after you create a project so they are available next time you create a new project: -Project Namespace -Author -Company Name -Private Varible Prefix -Schema Provider (ie SQL or Oracle) -Last Connection String Used Added AddBusinessRuleMessage() method to PDSAValidatorBase class This makes it easier to add your own business rule messages in the ValidateCore() method Added a Multi-Lingual/Localization helper method call GetResourceMessage to support multi-lingual applications. Added to PDSAValidatorBase class All required field messages are now return from this method. There is an override of this method in the partial validation class generated so you can localize your messages Added to PDSAManagerBase class Added to PDSAUIViewModelBase class Added to PDSAUIViewModelReadOnlyBase class Added to PDSADataClassBase class Added PDSAValidationMessages class with static properties for each validation message that the PDSAValidatorBase class uses Will help in the future with localizing your applications This method does nothing but return the default message, but allows you to override and supply your message from any resource file, xml file, or a database Upgraded the [HaystackInstallFolder]\Samples\CSharp\Validation_Sample_CS sample to show how to change default messages from English to Spanish Optimized the provider loading methods to improve performance in your projects Added GetDataSet method to all ASP.NET ViewModels All Stored Procs for the current generation are now written into an _AllStoredProcs.sql file Added new looping filter "IsSearch=". For example: {|FOR EACH COLUMN:IsSearch=True|} This allows you to return the set of columns where the IsSearch check box is set in each column in Haystack Added new remove filter {|REMOVE_WHEN_NO_SEARCH_FIELDS|} If there are no columns on a table marked with "IsSearch", then the section of code is removed Added new SELECT statement for Searching (Both Dynamic SQL and Stored Proc) Added a GetDataSet method to the Manager class for tables and views EmployeeTypeManager mgr = new EmployeeTypeManager(); DataSet ds; ds = mgr.GetDataSet(); Added Filtering methods to the Manager class for table classes These methods allow an easy way for you to filter data based on the IsSearch columns you select in Haystack EmployeeTypeManager mgr = new EmployeeTypeManager(); DataSet ds; mgr.SearchEntity.SalaryMaximum = 100000; ds = mgr.GetDataSetUsingSearchFilters(); // Or you can use BuildCollection() EmployeeTypeCollection coll = mgr.BuildCollection(); Added Insert(), Update() and Delete() methods to the Manager class for a table EmployeeTypeManager mgr = new EmployeeTypeManager(); EmployeeType entity = new EmployeeType(); // Fill in entity properties ... // Insert data mgr.Insert(entity); Added SearchOperator to each data type in ??_DotNetTypes.xml files Added <|COLUMN_SEARCH_OPERATOR|> token to generator Added ValueForNullAsString to ??_DotNetTypes.xml files Added <|COLUMN_VALUE_FOR_NULL_AS_STRING|> token to generator Added SearchWildCard to each data type in ??_DotNetTypes.xml files Added <|COLUMN_SEARCH_WILDCARD|> token to generator Added <|COLUMN_SEARCH_WILDCARD_WITH_CONCATENATION|> token to generator Added <|CONNECT_STRING|> token to generator to return your project connection string. Added Concatenation to each language in Languages.xml file Added <|CONCATENATION|> token to generator Removed PDSA.Provider.Library.dll and PDSA.ServiceModel.dll These classes have been moved into the PDSA.Common.dll Removed PDSA.Common.Silverlight.dll and PDSA.Validation.Silverlight.dll These have been combined into the PDSA.Silverlight.dll Removed all VS.NET 2008 samples and templates Fixed bug where a field name was the same name as the table This would generate a property with the same name as the class which does not work Fixed bug where a field name either was a number (1, 2, etc) or a field name started with a number. An 'x' is now prefixed onto these field names prior to generating the property Fixed bug where a FK table was located in another schema from the PK table. Fixed bug where stored procs where generated incorrectly the 2nd time around Fixed Concurrency handling Updated Standard Field handling Standard Fields no longer appear in any Grids or in Detail Standard fields are now defaulted through the StandardFields.xml file Added 'DatabaseDataType' column to DBColumn table in Haystack database Added 'IsSearch' column to DBGeneratorStatement table in Haystack database Added more reserved words to handle field names like 'object', 'integer', 'float', etc. Changed the replacement word in the reserved words to add "_x" to the end of the word instead of the beginning. This makes your property easier to find. Fully qualified *CompletedEventArgs in the Silverlight View Models Modified the ASP.NET Generation to ensure that the same ViewModel object is used in both the code behind and in the ObjectDataSource Fixed bug if the first character was lower case on a table or view, where the generated Silverlight ViewModel had the wrong class name generated Modified the look and feel of generated XAML views Modified Grid look and feel for Silverlight views to be consistent with add/edit/delete views Modified Grid look and feel for WPF views to be consistent with add/edit/delete views Fixed bug in the FK_PRIMARYKEY_PUBLIC_PROPERTY token where it returned the wrong column name Fixed bug in Stored Procedure generator where the Execute type of SPs where asking for columns Fixed bug in SP_UpdateByPK.txt file where Concurrency field was not added to parameter list Fixed bug in SP_DeleteByPK.txt file where Concurrency field was not added to parameter list Standard Fields are no longer added to any "Grids". Added more Oracle data types Worked on Oracle stored procedure generation Moved the PDSACommonBase class into PDSA.Common Added more XML comments where some were missing Added a DLL Reference manual in the form of a Haystack.chm file Added a DLL Reference manual on CodeHaystack.com The following changes were made to the generated XAML Views for WPF ------------------------------------------------------------------------- Added Background="Transparent" on the ListView control To all TextBlocks added Style="{StaticResource textBlockStyle}" To the Button controls in the ListView added Style="{StaticResource buttonImageStyle}" To the Button controls in the ActionBar area added Style="{StaticResource buttonImageStyle}" Added <|OUTPUT_FILE_SUFFIX|> to name of the generated XAML and code behind class When generating the "GridDetail" view, it will now be suffixed with Grid Add Close button to Validation and Exception areas Added the appropriate code to close those areas if the button is hit Added new styles for these Close buttons to the WPFEditStyles.xaml files To all controls added Style="{StaticResource imageStyle}" Added for Search Area Added Style 'searchAreaStyle' Generating Search criteria controls for filtering the grid NOTE: The search capability does not yet work when working with Stored Procedures. That will be added in the next version. The action bar now has been assigned a style Style="{StaticResource actionBarStyle}" To the tbError TextBox added Style="{StaticResource errorMsgStyle}" To the tbError TextBox added Style="{StaticResource validationMsgStyle}" Changed Add.jpg to Add.png Changed Edit.jpg to Edit.png Changed Trash.jpg to Trash.png Changed Save.jpg to Save.png Changed Undo.jpg to Undo.png Added Refresh.png Added Close.png There is a new WPFEditStyles.xaml file that you need to add to your old projects if you wish to take advantage of the new look and feel There are new .png files in the \Images folder of the template projects that you need to add to your old projects. The following changes were made to the generated XAML Views for Silverlight ---------------------------------------------------------------------------- Same as for WPF - except for the filtering, that will be in the next version All Buttons - Removed HorizontalAlignment="Right" To all TextBox controls added Style="{StaticResource textBoxStyle}" To all TextBlock controls added Style="{StaticResource textBlockStyle}" To all CheckBox controls added Style="{StaticResource checkBoxStyle}" The following changes were made to the generated XAML Views for XML/WPF ------------------------------------------------------------------------ Same as for WPF - except for the filtering, that will be in the next version The following changes were made to the generated ASP.NET User Controls/Pages ---------------------------------------------------------------------------- Added for Search Area Generating Search criteria controls for filtering the grid view Fixed bug when deleting and no records where deleted or other error, the error message did not show up. It does now Added checking for correct data types Added Combo Box for any FK's in the tables Added AllowSorting="True" to all data grids Add ObjectDataSource objects now call the GetDataSet method on the ViewModel Changed all grid columns to use the actual column name not the property names NOTE: The search capability does not yet work when working with Stored Procedures. That will be added in the next version. -------------------------------------------------------------------------- Version 1.37 - 8/25/2011 -------------------------------------------------------------------------- Reset _PageNumber = 1 in the LoadAllUsingPaging method No longer need to supply the XSD file for XML class generation Modified the CS_IServices.txt template to return a "Response" object instead of a "Collection" object for any FK relationships Problem with install or creating new project bombed when regional settings where something other than M/dd/yyyy has now been corrected. Added if(Entity != null) in InitializeEntity() method in Validator.Generated class so the Validation class can be used stand-alone without an Entity class Modified the CheckBusinessRules() method in the PDSA.Validation.dll to check for correct data type in 'Value' property and return appropriate business rule message if an invalid type Fixed bug when looking up FKs in a different schema caused code not to generate Eliminated all 2008 projects Converted Haystack to only VS.NET 2010 All dates are now in yyyy-MM-dd format. This should now handle running Haystack and generating data classes for any culture Eliminated "HaystackAssemblies" folder and called this "Private". There was confusion as people were adding DLLs from here to their projects. The DLLs in this folder are ONLY for Haystack.exe to use. Created "AssembliesForYourProjects" folder where all DLLs for your projects can be referenced from. It is still a good idea to only use the DLLs from the \TemplateProjects\[PROJECTYPE]\[SAMPLE]\PDSAAssemblies folders If tables do not have a primary key a message is now displayed If the FK tables for a table do not have a primary key, a message is now displayed, but processing continues. Eliminated [DataContract] and [DataMember] by default from the generated code in order to simplify the creation of projects. Added WCF Services when generating for Views. Version 1.36 - 3/20/2011 -------------------------------------------------------------------------- Added using System.ServiceModel.Activation; to all WCF Services so you can use Session variables Added [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] attribute to all WCF Service classes so you can use Session variables Added Reference to System.Web in the Services DLL in case you wish to use Session or Application objects Added NumberOfPages method to PDSANumbers class in PDSA.Common DLL Added using PDSA.Common to WCF Service classes Modified all Silverlight controls to use asynchronous paging to fill the DataCollection property Added PageSize variable to PDSAUIViewModelBase class. This is used so you can determine how many rows to return in a page from your WCF Service class Added private int _PageSize variable to all WCF Service classes. This can be used instead of the PageSize in the view model if you wish to control the paging from the Service layer instead of the View Model Added the following methods to all WCF Service classes // Get rows one page at a time using default PageSize set in the service layer Get<|CLASS_NAME|>ByPage(page As Integer) // Get rows one page at a time passing in the page size. This is what is called from the ViewModel. Get<|CLASS_NAME|>ByPage(page As Integer, pageSize As Integer) // Get total rows in your table Get<|CLASS_NAME|>RowCount() // Get total number of pages using default PageSize which is 10 Get<|CLASS_NAME|>PageCount() // Get total number of pages passing in the page size Get<|CLASS_NAME|>PageCount(pageSize As Integer) The above "ByPage" methods use a session variable and will require that you uncomment the AspNetCompatibilityRequirements attribute Modifying Existing Silverlight Applications =========================================== In order to use the new paging mechanism in Silverlight you will need to do the following: 1. Add a reference to System.Web.dll to the DLL where your Service classes are located 2. Add the aspNetCompatibilityEnabled attribute to the Web.Config file 3. Regenerate the WCF Service Interface and Service Class files 4. Regenerate your ViewModel class a. If you have modified your ViewModel, you just need to add the "LoadAllUsingPaging" region in the newly generated class. b. You should also initialize the PageSize=25 in the constructor of your ViewModel class 5. Update your Service Reference 6. Instead of calling the LoadAll() method in the ViewModel from your UI, call the LoadAllUsingPaging() method in the ViewModel 7. You may adjust the PageSize (how many records are returned) from the Constructor of your ViewModel class Version 1.35 - 3/11/2011 -------------------------------------------------------------------------- Added a HandleCustomExceptions method to the ViewModel classes. This will help you write custom code to handle SQL errors such as PK violations Changed ValueForNull from "MinValue" to "0" for all numeric data types. This helps so that nulls will display as 0 instead of MinValue. Fixed bug in UI View Model base class where if you got an exception after a validation error, the exception message would not display Fixed bug in ASP.NET Pages for FW 4.2. Version 1.34 - 2/27/2011 -------------------------------------------------------------------------- Added more error information when licensing does not work Added Concurrency Checking on Entity Objects Added NoRowsAffectedMessageUpdate and NoRowsAffectedMessageDelete messages to View Model Base Class Modified View Model to catch a PDSAZeroRowsException when updating or deleting and report the appropriate error. To specify a Concurrency Field, you will need to update the [InstallFolder]\Haystack\Xml\StandardFieldList.xml file This file can now be modified thru the Maintenance | Standard Fields menu Added Maintenance menu to Haystack to help you modify the various XML files Standard Field Names Languages .NET Types for language Added ASP.NET Relationship samples for C# and VB Fixed typo in WPF templates (Visiblity to Visibility) Fixed bug when using stored procs only in the PDSATransaction class Added more XML Comments to generated code Changed the AppSettings.ConfigSettings property to AppSettings.Instance in the template projects Added column UseSeparateAssemblies bit to DBProject table This is used if you are separating the generated data, entity and business classes into different assemblies Added check box to Project Information screen for this new field Added <|ASSEMBLY_NAMESPACE:xxxx|> generation token to generate namespaces and assembly names when classes are in different assemblies Renamed file \CSSnippets\CS_WPF_FKNamespace.txt to CS_WPF_DLNamespace.txt Added file \CSSnippets\CS_WPF_VMNamespace.txt Renamed file \VBSnippets\VB_WPF_FKNamespace.txt to VB_WPF_DLNamespace.txt Added file \VBSnippets\VB_WPF_VMNamespace.txt Removed PDSA.File.dll from the Samples\PDSAAssemblies folder This DLL was not being used for anything Removed the DependencyObject inheritance from PDSA.UI.Library. This allows us to remove the dependency on WindowsBase.dll in ASP.NET Web apps Fixed bug where columns or parameters were not refreshing if you had not saved the data, but clicked on Reset or Refresh buttons. Deleted Use Audit Tracking from Table Information screen. This flag is set in the .Config file of your application. Added new token {|REMOVE_WHEN_NOT_USE_SEPARATE_ASSEMBLY|} to remove code when the Use Separate Assemblies is NOT checked in the project Added new token {|REMOVE_WHEN_USE_SEPARATE_ASSEMBLY|} to remove code when the Use Separate Assemblies is checked in the project ** Template Projects ** Added new ASP.NET Template Projects showing how to separate business, entity and data layers into separate projects Added new Silverlight Template Projects showing how to separate business, entity and data layers into separate projects These also show how to Add...Link the Entity classes into a Silverlight project and reference that project from the Silverlight UI in order to avoid the Add Service Reference from creating proxy classes for your Entity classes Added new WPF Template Projects showing how to separate business, entity and data layers into separate projects ** ASP.NET for FW 4.2 ** In SetUIState method in ASP.NET for FW 4.2 changed appropriate "Enabled" to "Visible" In VB ASP.NET for FW 4.2 added MyBase.ParentPageName = "PAGE NAME" in Page_Init() event Eliminated PDSAWebSessionInfo variable from ASP.NET FW 4.2 pages ** Stored Procedure Classes ** Eliminated the Validation Classes from the Stored Procedure classes as the default Most people said they did not want them generated The old templates are still there if you want to use them in the XML files, you simple need to change the element to True ** XmlData Classes ** Added ability to pass in an XML String instead of having to read from a file Modified templates to support this new functionality Added PDSAXmlFile class to PDSA.Xml.DataClasses DLL. This now contains the static.GetCurrentDirectory() methods that was used in the AppConfig class in the PDSAXMLDataClasses samples and template projects. ** Silverlight Enhancements ** Added a PDSA.Validation.Silverlight.dll to all silverlight projects Added PDSA.UI.Library.Silverlight.dll to all Silverlight projects. Removed all PDSA.UI Namespace classes from PDSA.Silverlight.dll. They are now part of the PDSA.UI.Library.Silverlight In the Entity Collection Class added a #if SILVERLIGHT in the Get method Version 1.33 - 2/7/2011 -------------------------------------------------------------------------- Added ability to set the ConnectionObject with your own connection in our data classes. Fixed issue when reading Views where the data type was not set correctly in Oracle Fixed issue where Reset on Stored Procs was not resetting parameters collection Added 3 columns to the DBColumn table to support new functionality ColumnAttributes varchar(500) - Add the ability to add custom attributes to each column ColumnRegularExpression varchar(500) - Add the ability to use regular expressions for business logic to each column. Performs an IsMatch() method. RegularExpressionMessage varchar(255) - The message to return is the Regular Expression fails to match Added appropriate UI to Haystack Added Regular Expression Message field to the project info screen Added RegularExpressionMessage to .Config file with a default message Added 2 columns to the DBObject table to support new functionality GenViewAsTable bit - Will allow you to generate a View with add,edit,delete functionality. Won't work for all views, but might for some Not yet implemented GenViewSQL bit - Will allow you to replace the SELECT portion of the view with the actual VIEW description. This is used when you can't use a view, such as when using SQL Compact Not yet implemented Added RegularExpression property to PDSAProperty class in PDSA.Validation.dll Added RegularExpressionMessage property to PDSAProperty class in PDSA.Validation.dll Added new tokens to code generator COLUMN_REGULAR_EXPRESSION COLUMN_REGULAR_EXPRESSION_MESSAGE COLUMN_ATTRIBUTES CLASS_ATTRIBUTES Added <|COLUMN_ATTRIBUTES|> to all snippets that generate properties Added <|COLUMN_REGULAR_EXPRESSION|> and <|COLUMN_REGULAR_EXPRESSION_MESSAGE|> to Create properties in Validator.Generated classes Added <|CLASS_ATTRIBUTES|> to all class generation templates. Added element to the Languages.xml file. You can now set the default .NET Attributes you wish to add to each column within this XML file. These will be automatically defaulted on all columns Added element to all class generation .xml files. You can use this to set different attributes on different classes that are generated. For example, on all entity classes, we set the [DataContract] attribute by default Added RegularExpressions.xml which holds a list of commonly used regular expressions There is a popup screen that allows you to pick from a common set of regular expressions Added System.Char and mapped to Database Data type of String to solve bug when selecting a Char data type when creating a custom column Sorted .NET data types in Column type drop down Added GetDataSetAsXml() method to all DataObject classes You can use this to return XML in either Attribute or Element based format. Fixed relationship problem in WPF Combo Box Added Clean Gen Folder button to delete all files under the \Gen folder Modified WPF UI Templates Eliminated rows for Validation & Exception These now displayed over the ListBox area Added new styles to WPFStyles.xaml in \Resources folder of WPF applications Screens are now resizable Added PDSANotBooleanConverter class to PDSA.WPF.dll Added PDSANotBooleanToVisibilityConverter class to PDSA.WPF.dll Modified Silverlight UI Templates Eliminated rows for Validation & Exception These now displayed over the ListBox area Added new SilverlightEditStyles.xaml in \Resources folder of Silverlight Template Projects Screens are now resizable Updated documentation Version 1.32 - 1/26/2011 -------------------------------------------------------------------------- Reworked the Haystack Configuration Screen Now has a SQL Builder that is part of the PDSA Framework contained in the PDSA.SqlServer.Picker.dll Simplified the code in this screen Added the ability to build a SQL Server connection string via a pop-up dialog instead of having to type it in. Added Order / Order Line Items to TransactionSample-?? sample Shows how to use the AfterSubmit and BeforeSubmit events Added 'Entity.IsDirty = false;' to the CreateEntityFromDataRow method in the *Data.Generated.* files The entity was marked as dirty after just reading from a database when it needs to be marked as false Added GetChanged() method to the Collection class This method returns all objects where IsDirty=True Added new WPF Samples (VS.NET 2010 only) showing using a DataGrid to edit several records, then how to update all records at one time. Have samples to show using a transaction and not using a transaction \Samples\WPFGridSample-?? Version 1.31 - 1/19/2011 -------------------------------------------------------------------------- Can now use the "Entity Class to Map To" field for all stored procs This is used when the stored proc has the exact same named parameters as a table you have already generated for. This cuts down on the amount of classes you generate Added a commented out "RETURNVALUE" property to the Entity class template You can uncomment this out when you use the mapping to another entity class in a stored proc Made changes in the ASP.NET Templates for the PDSA .NET Productivity Framework Added FK_NAME generation token to return the name of a Foreign Key Modified the "Manager" templates to use this new token when generating FK methods Solved the problem of duplicate method names on tables with more than 1 FK relationship Version 1.30 - 1/12/2011 -------------------------------------------------------------------------- Recreated all videos to reflect new screens and generation folders Updated CodeHaystack.com Version 1.29 - 1/11/2011 - Internal Release -------------------------------------------------------------------------- Removed "SqlString" variable from ViewModel for View Classes in ASP.NET Reworked C# XML Data Classes Template Project in VS.NET 2010, it had a few issues Version 1.28 - 1/10/2011 -------------------------------------------------------------------------- Fixed a couple minor bugs More documentation updates Version 1.27 - 1/7/2011 -------------------------------------------------------------------------- Created PDSACommonBase class that PDSAEntityBase and PDSAManagerBase now inherit from. PDSAManagerBase used to inherit from PDSAEntityBase but with the changes to EntityBase, we just needed the Manager class to inherit from CommonBase which only implements the INotifyPropertyChanged event Redid the complete structure of where files are generated to We now generate into folders such as ASP.NET, WPF, Silverlight, WCF and XML Silverlight WCF Services you will now retrieve from the WCF folder We no longer generate the *ResponseSelect, *ResponseInsert, *ResponseUpdate and *ResponseDelete classes All of these are now simply consolidated into one *Response class All WCF Services now use this one *Response class We now generate the "Data" classes into separate folders "DataClasses", "BusinessClasses" and "EntityClasses". Modified all Template projects to use these new folders. This will make it easier to break these folders into separate projects should you choose to do so. Moved the \PDSAAssemblies, \Samples and \Template Projects folders into the C:\Program Files\Haystack folder Changed DatabaseFolder element in App.Config to SqlScriptsFolder element Moved the SqlExpress database into \Database folder Moved all .SQL scripts into the [InstallFolder]\Haystack\SqlScripts folder All documentation has been updated to reflect these changes Added a Chapter 12 - MVVM Made Simple Version 1.26 - 1/3/2011 -------------------------------------------------------------------------- Added method CreateAllEntityProperties() to Validator base class. This allows you to create all properties in the PropertyTrackerCollection in the Entity class. You would not want to do this for an SOA application, but this allows you to set all SetAsNull properties to true, so if you do not modify a property then a null will be put into the database automatically. Added IPDSAEntity "Entity" property to Validator base class. Added call to MyBase.Entity or base.Entity to the Validator base class Added ability to just generate the .Generated files to Haystack. Fixed SetAsNull* methods to make sure that no fields marked as IsRequired=True can be set to Null. Added two snippets to handle concatenated primary keys in ASP.NET Fixed bug in PDSAProperty.ConvertToGuid() method Fixed bug in PDSAProperty.ConvertToByteArray() method Added , Threading.Thread.CurrentThread.CurrentUICulture.DateTimeFormat to we generated Convert.ToDateTime("Date", , Threading.Thread.CurrentThread.CurrentUICulture.DateTimeFormat). This helps handle international date/time formats Removed call to InitializeEntity() in the *Validator.Generated.* classes Fixed bug when generating ASP.NET user control and the primary key name was the same name as one of the attributes for an ImageButton. Version 1.25 - 12/27/2010 -------------------------------------------------------------------------- Fixed bug in Haystack setup form so you can now type in a server in case you can't load servers from your network. Added logic to deal with setting min/max values on NUMERIC (SQL) and NUMBER (ORACLE) Modified the "MaxLoopLinesTillException" element in the App.Config to be 50 instead of 30. Added the FK generation methods to the WCF Services class. Fixed problem where Haystack did not recognize varchar(MAX), nvarchar(MAX) and varbinary(MAX). Need to add 'using PDSA.UI;' or 'Imports PDSA.UI' to your Silverlight View Model classes and to the Silverlight User Controls that you previously generated Added caching to DBSchema and Data Layer provider DLLs. Fixed a bug where they were not cleared when switching between two different providers. Fixed bug where after reading a stored procedure and setting its generate type to something other than what Haystack thought it was, the next time you read it, the value went back to what it was before Added new ENTITY_CLASS_NAME token. This will return either the same value as CLASS_NAME token, or the value that is stored in the 'EntityToMapTo' field Modified all stored proc read-only templates to use ENTITY_CLASS_NAME token where applicable Removed SetDirtyFlag method from Data.Generated classes Added a IPDSAEntity interface that the PDSAEntityBase class now implements The PDSADataClassTable now has a 'EntityObject' property that is of type IPDSAEntity This allows us to perform standard methods on the 'Entity' object *** NULL HANDLING CHANGE !!!! IMPORTANT !!!! *** ========================================================= Major rework of IsDirty and Null handling Do not use the mgr.Validator.Properties.SetIsNullFlag anymore. You MUST use the Entity.SetAsNullFlagForProperty("ColumnName", true); You may also set the SetAsNull property on the PropertyTrackerCollection that is part of the Entity class mgr.Entity.PropertyTrackerCollection.GetByName("ColumnName").SetAsNull = true; Modified ViewModel class' CreateNewEntity() method // Create blank Entity Object DetailData = _Manager.Validator.CreateNewEntity(); Audit Tracking Simplification =============================== Eliminated the DataRow for Audit tracking. Not needed since we now store the original value in the Properties collection NOTE: You will need to delete the "SetAuditTrackRowFromEntity" method from your Data.Generated.* classes You will also need to delete the "If" statement in the LoadByPK() method that calls the "SetAuditTrackingDataRow()" method. if (UseAuditTracking) { SetAuditTrackingDataRow(); } If UseAuditTracking Then SetAuditTrackingDataRow() End If Modified the ASPNET-AddEditDel-PDSAFW4x\CS_AddEditDelete_ViewModel.txt DataUpdate() method to eliminate reloading the record for audit tracking Modified the ASPNET-AddEditDel-PDSAFW4x\VB_AddEditDelete_ViewModel.txt DataUpdate() method to eliminate reloading the record for audit tracking Modified the WPF-ListViewDetail\CS_ListViewDetail_ViewModel.txt DataUpdate() method to eliminate reloading the record for audit tracking Modified the WPF-ListViewDetail\VB_ListViewDetail_ViewModel.txt DataUpdate() method to eliminate reloading the record for audit tracking Fixed the Silverlight Delete button's Tooltip Attribute which had "EditToolTip" instead of "DeleteToolTip" Fixed bug where IsSqlServer and IsOracle flag were set to true at the same time. This caused some templates to be removed when they should not have been. Changed ASP.NET GetData() method in User Control to check for empty controls. If they are empty a Null will be put into the database. Version 1.24 - 11/30/2010 -------------------------------------------------------------------------- Modified the calls to Entity.InitialDataCollection to use the property name and not the column name. Added PublicPropertyName to PDSADataColumn class. This is needed for when people have spaces in their column names and we are checking for null Added Get[ClassName] method to the Collection class to retrieve an object in the collection by the Primary Key field. This only works for those tables that have a single primary key column Added new token {|REMOVE_WHEN_CONCAT_PK|} to remove code when the current object does not have just a single primary key field. Added \Templates\WPF-GridDetail folder Added new template for ListView and Detail that share the same space for WPF Added new template for DataGrid/Detail that share the same space for Silverlight Made some changes to the ViewModel classes to reuse the Manager object in the various methods Fixed problem with Precision and Scale not being set properly in Oracle Scale was not being shown properly on the Column Info screen Moved all WCF Service templates into a separate folder Silverlight templates still generate into \Silverlight-Services generation folder, but are duplicated in \WCF-Services folder (this is for backward compatibility) Now WCF Service classes are also generated into a \WCF-Services folder Added CSWCF-Services and VBWCF-Services folder Added stored procedure generation for tables in Oracle Fixed problem with Views not reading correctly in Oracle Added PackageSpecTemplateFile and PackageBodyTemplateFile elements to DatabaseServers.xml file These elements hold the Package Body and Package Spec file name into which you will put the stored procs. For SQL Server, you just fill in the PackageBody. Added UsePackageName to DatabaseServers.xml file Set to True if you need to use the PackageName in the name of the stored procedure. Added <|PACKAGE_SUFFIX|> token to return the value from the DatabaseServers.xml file Modified all double, float, single, real Min/MaxValues to use Decimal so we avoid the scientific notation which causes errors. Added a "Search" row to all XAML user controls. There is nothing in it, but is left for you to add search fields to. Fixed bug where if you had stored procs only selected, views would not get generated. Added UsePrecisionAndScaleForMinMax to ??_DBTypes.xml file. This allows you to specify for a certain data type to use the Precision and Scale for figuring out MinValue and MaxValue In Manager class there is now a method for each WHERE clause you create on tables and views. Added new snippet to generate these methods. Added "partial" to all Manager and Service classes Modified Services class and interface to include methods for each WHERE clause generated in the Table classes Added <|CLASS_NAME_PLURAL|> token to code generator. If the class name is 'Product', this token returns 'Products'. If the class name is 'Employees', then this token just returns 'Employees'. It does not add on an extra 's'. Added <|REMOVE_WHEN_ORACLE|> token to remove lines when the current project is going against an Oracle database Added <|REMOVE_WHEN_SQLSERVER|> token to remove lines when the current project is going against a SQL Server database Added 'DatabaseDataTypeEnum' element to ??_DBTypes.xml files. This will return the database data type enumeration to use. Added <|COLUMN_DATABASETYPE_ENUM|> token to return the element. Fixed bug in ASP.NET Template in the btnAdd_Click event where you need to assign the newly created entity object to the EntityObject property. Made major changes to the Entity and Data Classes on how we now handle the Null settings Lots of changes to the ??Data.Generated.?? templates Lots of changes in the underlying PDSAProperty class to help with null value handling Added Unchecked event to WPF Check Box Added a CreateManagerObject() method to all View Models Added SetAllSetAsNullToTrue() method to Validator.Properties class. This can be used to ensure that all values are set to Null when you add a new record and you do not set any Entity properties. You will have to regenerate your classes to make them work with the new versions of the DLLs We now generate all Boolean types as Nullable. This may require you to wrap some of your code in a Convert.ToBoolean(). Versions 1.22 and 1.23 - Internal Releases only -------------------------------------------------------------------------- All changes are listed in 1.24 Version 1.21 - 10/4/2010 -------------------------------------------------------------------------- Modified the DataObject classes so you can do stand-alone validation on the entity data from the data classes Added Validate() method to DataObject classes Added BusinessRuleCheck() method to DataObject classes Added BusinessRuleMessages property to DataObject classes Updated Chapter 7 in the documentation to document new way of doing validation Updated Chapter 3 to describe how to modify the .Config file if you are using Stored Procedures Added new samples to DynamicSQLOnly_?? solutions to illustrate the use of the validation on data classes Removed the setting in the SqlServer_SPSettings.xml file that filters out stored proc that are prefixed with "sp_". Added DisplayTipAfterGenerate to .Config file. Added Tip screen to display after generation Added \Documentation\Tips folder to hold HTML tips Modified project info screen so you can't change language after you have opened a table/view/sp. Added COLUMN_NAME_ONLY token. This returns a column name without the [] around it. Changed all ColumnNames classes to use the COLUMN_NAME_ONLY token. Updated Entity Class to hold an "Initial Data" collection with all properties and whether or not a columns' data was read in as null. Modified the CreateEntityFromDataRow() method to add properties to the InitialData collection Changed EntityDataToColumnCollection to add CheckNullFlags() call. Changed ColumnCollectionToEntityData to store data for null flags. In the ASP.NET User Control generation Added and EntityObject property to store the current object in Session Changed grdData_RowCommand so when an entity is selected, it stores it in the EntityObject property Modified the GetData method to retrive the entity object from the EntityObject property. Version 1.20 - 9/23/2010 -------------------------------------------------------------------------- Moved all code generation classes into separate DLL (preparing for adding more screens in WPF) Removed initial status loading form to increase speed of loading Haystack Recreated tips form as a WPF form. Removed winMsg.xaml and \MiscForms folder from WPF Template Projects Modified WPF User Control that is generated to use ViewModel to display exception info and validation messages. Added EMPLOYEE_TYPE table to PDSASamples.sql file. It was missing in the last version Version 1.19 - 9/22/2010 -------------------------------------------------------------------------- Internal version Version 1.18 - 9/20/2010 -------------------------------------------------------------------------- Fixed bug with Underscores and UpperCase to ProperCase. Added new table (EMPLOYEE_TYPE) to both oracle and SQL Server samples. Version 1.17 - 9/14/2010 -------------------------------------------------------------------------- Added the ability to detect a Computed Column and set the appropriate flags so that column won't be added or updated. Fixed bug where in certain situations the business rule failure objects were not being cleared Did some optimizations. Version 1.16 - 9/13/2010 -------------------------------------------------------------------------- Added Byte SQL Server data type. For some reason, a tinyint will sometimes be reported as "byte" instead of tinyint. Updated documentation, added TOC and Index to each chapter. Minor mods throughout Changed the ValueForNull on Date data types to DateTime.MinDate. When a Null date value is read in from one of your fields in your tables, the entity will be set the DateTime.MinDate. Added {|REMOVE_WHEN_NO_AUTO_NUMBER|} template token to remove the PrimaryKeySet() method when there is not an auto-number field. Fixed problem when a Primary Key was a Foreign Key it would goof up some of the generated code. Removed PDSA.DataLayer.OracleClient.dll from setup. All further Oracle development will require the Oracle ODP .NET Provider. Continued work on Oracle. Tables and Views seem to work with Dynamic SQL. Still working on stored procs and packages. Added ability to request a demo expiration extension. Fixed some problems in the validation dll that were preventing validation from happening at the correct time. Version 1.15 - 9/2/2010 -------------------------------------------------------------------------- Fixed bug where if you had a "tinyint" data type on one of your columns, it stopped reading columns. Fixed bug where if there was no WHERE clause, or no ORDER BY, after clicking New, you would get an error. Added SetColumnValueToNull("colName") method to make it easy to set the value of a column to null when performing an INSERT or UPDATE Version 1.14 - 9/1/2010 -------------------------------------------------------------------------- Fixed bug where IDENTITY for bigint data type was not being returned correctly. Added DbTypeForNull to ??_DBTypes.xml and .xsd files. This is for setting a "null" when you want to put a null back into a field. Fixed bug where .SetAsNull would not put a Null value back into your table Fixed bug when adding a new Select, Where, etc. caused it not to generate the correct code. Removed the "ListBox" select filter when loading a new View in Haystack. Added exception handling on SELECT in ASP.NET user controls so a message is displayed in case of an error. Added code "ViewModel" templates to hold the current "Manager" class in session in ASP.NET apps. This is used to ensure that Nulls get updated correctly. Modified WPF "ViewModel" templates to allow you to keep any current null values in the table. Added sample to the "Table_DynamicSQLStoredProc_??" to show you how to deal with reading and setting Nulls into a field in a table. Version 1.13 - 8/29/2010 -------------------------------------------------------------------------- Modified the "Manager" classes so the "GetBy..." method name that is generated uses the column name of the FK in combination with the Primary Key table name. Fixed bug when there was more than 1 FK on a table it was putting in all columns from all FKs. Added new token <|FK_PRIMARYKEY_COLUMN_NAME|> to retrieve the primary key column name that a FK points to. Renamed "Gen" folder ASPNET-UI-FW4x to ASPNET-UI-PDSA-FW4x. This folder is only for people running V4.x of the PDSA .NET Productivity Framework. This name better reflects its purpose. Renamed ..\Haystack\Templates\ASPNET-AddEditDelete-FW4x to ..\Haystack\Templates\ASPNET-AddEditDel-PDSAFW4x. Renamed XML files for the "ASPNET-UI-FW4x" to have "PDSA" in the name. Fixed bug where adding a custom column to the PrimaryKey SELECT statement removed the WHERE clause. This is now fixed. Added Time(7) to SQL Server data types. Added PDSABooleanToVisibilityConverter value convert class to PDSA.WPF.dll Made Save/Cancel button invisible until an edit is made in WPF User Controls Version 1.12 - 8/25/2010 -------------------------------------------------------------------------- Fixed some of the templates for PDSA Framework 4.2 Fixed bug where saving a custom column for the 2nd time failed You used to be able to close the main code generation form and there was no way to make it reopen. You now can't close it. Added DefaultDataType element to DatabaseServers.xml file. This will be used if a data type can not be found in the ??_DBTypes.xml file Got views and tables (Dynamic SQL Only) working in Oracle Check for SQL Server Version to make sure it is 2005 and later when setting up a project. Fixed bug where if no columns or statements were loaded (most likely due to invalid SQL Server version), then the table is marked as not being able to be generated. An error message is reported to the user. Clicking on Load Tables/Apply Filter will now always reload tables/views/stored procs Fixed bug in ASP.NET Template so generating with just stored procs now works Removed "pdsa_" prefix when generating stored procedures Version 1.11 - 8/16/2010 -------------------------------------------------------------------------- Modified the Init() method in the DataObject classes to set the following values from the data provider: UseAuditTracking = DataProvider.UseDBAuditTracking UseStoredProcs = DataProvider.UseStoredProcedures Added MessageDelimiter to PDSAUIViewModelBase. You can use this to specify the delimiter to use for all returned Validation, Info and Error Messages. The default is Environment.NewLine (CRLF) Fixed the templates for ASP.NET so if validation rules fail, or exceptions happen, then these messages are displayed in the correct labels. Fixed the templates so that all parameters use the PublicPropertyName instead of the column name Fixed Haystack so any field names with spaces or any other weird characters now work. Modified Stored Proc templates to use SP_PARAMETER_NAME instead of COLUMN_NAME in certain areas Can now set "Standard Fields" with default values New field in Project Info (Options) tab to set whether or not to use standard fields Removed UseStandardFields key from .Config file. Stored Proc Parameters are now defaulted to a default value based on the data type All columns and parameters now have their MinValue and MaxValue values set based on the data type Added FK_PRIMARYKEY_PUBLIC_PROPERTY token top return the primary key public property for a FK. Version 1.10 - 8/05/2010 -------------------------------------------------------------------------- Made the Table/View/SP screen re-sizable Added Oracle Client & Oracle ODP DLLs for testing on Oracle Now detects GUID primary key types. Also, if you use an int for the primary key and no autonumber, will set PK type as PDSA. Added defaults to CreateNewEntity() in ViewModel on Silverlight applications to set default values when creating a new entity Fixed bug in the Undo methods in Silverlight templates Now you must press the Edit button to go into edit mode in Silverlight. Fixed templates so they handle "No Records" in the table Added a HasValueChanged() method to the PDSAEntityBase class. This is now used to compare properties in the Property Set. This method handles nulls and other data types that we need to compare. Added a work around for a bug in VS.NET 2010 when adding a service reference. If the 1st character of your Service class was lower case, VS.NET 2010 added an "I" to it. Created <|CLASS_NAME_UPPER_FIRSTCHAR|> token to force all "Service" class names to start with upper case. Added new methods and properties to help when you are not using SQL Identity for your primary key. The view model now has properties tied to the PK fields to ensure that you can't update them, only add when they are not auto-number PKs. Version 1.09 - 7/28/2010 -------------------------------------------------------------------------- Added new token PK_CONVERT_TO_METHOD that returns the convert method to use for the primary key for the current table Fixed bug where SP parameters were not showing up. Fixed type in Help menu Version 1.08 - 7/27/2010 -------------------------------------------------------------------------- Fixed bug when reading stored procs where not all parameters were not being read in Modified "sql_variant" in the SqlServer_DBtypes.xml file to be "variant" Modified the ucListViewDetail.xaml.txt template so the Primary Key will be set to IsReadOnly="False" if the PK is not an auto-number Fixed bug in the update process that caused it to submit too many changes. Added new token <|PK_IS_AUTONUMBER|> that you can use in the ViewModel class to control the ReadOnly flag on the PK field. Added new token <|UICONTROLPREFIX|> Added new token <|UICONTROLSUFFIX|> Added new token <|UICONTROLPROPERTY|> Modified all ASP.NET templates to use the UICONTROLPREFIX, UICONTROLSUFFIX and UICONTROLPROPERTY tokens. Added new XML files under \Xml\UIControl_Templates\ ASPNETDesignerControlsCS.xml ASPNETDesignerControlsVB.xml Added new entries in the UIControls.xml file to support the new tokens. Added new TXT files under \Templates\ASPNET-Snippets\ ASPNET-CheckBox-DesignerCS.txt ASPNET-CheckBox-DesignerVB.txt ASPNET-TextBox-DesignerCS.txt ASPNET-TextBox-DesignerVB.txt Version 1.07 - 7/26/2010 -------------------------------------------------------------------------- Changed the "Is Defined as NOT NULL?" to "Allow Nulls?" on the Column screen. Fixed bug where the Primary Key Columns were being duplicated after you hit the Reset button Added [DataMember] snippet to View Entity class Added code generation for Views for Silverlight Applications Fixed a couple of bugs in the Silverlight templates Modified the TinyInt SQL Server data type to map to an Int16 .NET data type instead of Byte Added IsSearchField to Haystack.DBColumn table This will be used in a future version ALTER TABLE Haystack.DBColumn ADD IsSearchField bit NULL; Added the following TXT, XML and XSD files \Templates\ASPNET-Snippets ASP-CheckBox.txt ASP-Textbox.txt \Templates\CSSilverlight-ForViews - Whole Folder \Templates\Silverlight-Snippets - Whole Folder \Templates\VBSilverlight-ForViews - Whole Folder \Templates\WPF-Snippets WPF-CheckBox.txt WPF-CheckBox-ReadOnly.txt WPF-Textbox.txt WPF-Textbox-ReadOnly.txt \Xml\UIControl_Templates - Whole Folder \Xml\UIControls.xml \Xml\CSharp_Templates CS_Silverlight_GridAndDetail-Views.xml \Xml\VB_Templates CS_Silverlight_GridAndDetail-Views.xml \Xsd\Controls.xsd \Xsd\UIControls.xsd Added entries in the .Config file to support the new XML Files Added a <|UICONTROL:Name=xxxx|> token to the template language This will allow you to define what WPF/Silverlight/ASP.NET control gets generated for which .NET data type. For example, for all Boolean types, a check box is now generated instead of a text box You can now define any control such as a 3rd party control to be generated for any .NET data type Modified all code generation templates to use the new <|UICONTROL|> token Version 1.06 - 7/23/2010 -------------------------------------------------------------------------- Fixed bug in stored proc generation where Unknown was persisting instead of what you chose. Fixed bug where cursor did not reset after loading stored procs. Fixed bug when loading project. Version 1.05 - 7/23/2010 -------------------------------------------------------------------------- Fixed bug where InsertName/InsertDate was not being filled in when saving a project Version 1.04 - 7/22/2010 -------------------------------------------------------------------------- If you have a stored procedure that returns multiple result sets, all unique columns are now returned Added new configuration screen for First Time Run. Added batch file to copy DLLs to template folders. Fixed bug in VB_AddEditDelete.aspx.txt where it had ".ascx" instead of ".aspx" Added new Configuration form for 1st time configuration of Haystack Updated documentation Added table of contents to longer chapters Fixed some typos Updated Chapter 2 - install to reflect new configuration screen Removed .DLLs from all \PDSAAssemblies folder in the TemplateProjects. They are now copied over on the first time run of haystack. This saves some space in the MSI file Updated Install Video Created video on "Creating your First Project" Modified Config file to point to MyDocuments for Last XML File. Added menu to open the Samples folder Added menu to open the Template Projects folder Added menu to Purchase Haystack All samples now work off the local PDSASamples.mdf by default Version 1.03 - 7/12/2010 -------------------------------------------------------------------------- Modified Validation Samples to show how to display messages in a ListView control Published video on the Haystack Validation System Fixed bug in Views where the statements were not being loaded after coming back into the project and just clicking on Generate Published new video on Create Data Classes for Views Added templates to generate ASP.NET pages for Views Added templates for PDSA Framework 4.x for generating ASP.NET Add/Edit/Delete pages Added the following elements to StandardFieldsList.xml file -DefaultValue -IsRequired -IsInsertable -IsUpdatable -IsSelectable -IncludeInAuditTracking Created video on Generating Classes for Stored Procedures Created video on using Relationships between tables Version 1.02 - 7/9/2010 -------------------------------------------------------------------------- Added 4 more videos to web site Added Videos menu to main form Added more documentation on the classes and methods in the PDSA DLLs. You can view this through the Object Browser and the Tool tips in VS.NET Added code to Haystack database screen that will allow you to open the SQLServer_Haystack.sql file right from this screen. Changed Min/Max value in column screen to use date fields too. Added COLUMN_MIN_VALUE token to generator Added COLUMN_MAX_VALUE token to generator Added COLUMN_MIN_LENGTH token to generator Modified the PDSAProperty.Create() static method to accept MinValue, MaxValue and MinLength. Updated code generation templates to set the MinValue, MaxValue, MinLength properties in the Validation class Added column in DBColumn table to stored MinLength alter table Haystack.DBColumn add MinLength int null Added NullToken element to Languages.xml file Modified all stored proc templates to use STORED_PROC_NAME instead of DBOBJECT_NAME token. Modified some of the VB stored proc templates to correctly generate parameters Fixed bug where SP could be marked for generation when the columns were not read yet Added Haystack Update Form and HaystackDBUpdate.xml file to allow updates to the Haystack database. Version 1.01 - 7/6/2010 -------------------------------------------------------------------------- Added code to go to Buy Now screen from Buy Now button on License Form Updated Chapter 3-Quickstart, added more instructions for adding code to your own projects Fixed bug in Silverlight XAML file where the Mode=TwoWay was not there.