.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Which is the best approach for applying business rules and basic validation like data types?

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :WPF
Hi Everybody   Please suggest me the best approach for applying the business rules and data type validations .Here is my choices : 1)Sequential work flow 2)State machine work flow 3)Work flow rule engine 4)Rule engine without workflow Out of above choices ,which is the best approach? Please provide me the reasons or senarioes for which is the best approach for applying the business rules and also performancewise. My requirement is : After getting the reports ,need to apply the datatype validations like valid or invalid date ...etc to the reports .And stored into Database.In the next step,need to apply the business rules to that reports in such a way that data should be good quality. Thank you very much

View Complete Post

More Related Resource Links

Input Validation: Enforcing Complex Business Data Rules with WPF


Windows Presentation Foundation has a rich data binding system that includes flexible support for business data validation. We take a look at implementing some complex data input validation scenarios that include customized data errors for users.

Brian Noyes

MSDN Magazine June 2010

Web Services: Extend the ASP.NET WebMethod Framework with Business Rules Validation


In an earlier article the authors showed how to build a custom WebMethods extension that provides XML Schema validation, a function that is lacking in ASP.NET. In the process they established a foundation for enforcing business rules during the deserialization of XML data. The technique, which is described in this article, uses declarative XPath assertions to test business rule compliance.In building this business rules validation engine, the authors integrate the validation descriptions into the WSDL file that is automatically generated by the WebMethod infrastructure. Finally, they demonstrate how to extend wsdl.exe, the tool that generates WebMethod proxy/server code from WSDL files, to make use of their extensions.

Aaron Skonnard and Dan Sullivan

MSDN Magazine August 2003

SSIS User Defined Data Type (Alias Data Types) and OLE DB Command validation

Hello everyone, I've been having an issue with trying to run my SSIS package on a server, and it seems to be failing on the OLE DB Command step.  What we have in our SQL 2005 DB, is a User-Defined Data Type (base type char(7)) and the OLE DB Command is supposed to call a proc that passes in a value of this data type. ie:  CREATE PROCEDURE myProcedure ( @passedInFromSSIS MY_DATATYPE ) AS .... In my SSIS package, I have the type defined as DT_STR with a length of 7.  Now, when I run the package locally (via Visual Studio), the process runs with success.  However, once the package is deployed on a server and run from an application (note: it is run under a different user), the process fails on a validation step with a "Invalid Parameter Number" error. Now, if I change the input parameter in my proc to the base type of the user-defined data type, the process works again. Has anybody run into a similar issue or know what may be causing this issue?  I first suspected perhaps I needed to grant permissions on the user-defined data type (since I was able to run it under my security context, but not under the application's), however noticed that there isn't security tied to the types.  Any other thoughts?  Please let me know if you need further explanation.  Thanks!

SharePoint Designer 2010 External Content Types Data Source Already Exists in Business Data Connecti


I used the Secure Store to create connection in SharePoint 2010 Designer External Content Types Data Source Explorer.  Later I changed some column names in the table.  I deleted the connection from Data Source Explorer and recreated it. I right clicked on the table and selected Create All Operations. When I clicked the Finish button, I got "The system definition with the same name as this data source already exists in the Business Data Connectivity Metadata Store and it refers to a different data source.  Cannot complete operation generation.  Add a connection to this data source with a different name and try again." 

I re-created the Secure Store using a different name in SharePoint 2010 Central Administration.  I didn't find the option to choose the connection name in SharePoint 2010 Designer. After I clicked Add Connection, I entered the Database Server and the Database Name, selected Connect with Impersonated Window Identity, entered Secure Store name, and clicked OK. The connection created with the database name as before.

Defining Validation rules with Data annotations - ???


I am having following problem:

Defined RegisterModel class - with some validation rules for creating new users, and this works fine.

Then I get this class, strip few properties and wanted to reuse it as UserInfo_Form_Model,   for editing user properites.

No changes, just deleted few items, renamed and reused in strongly typed View for editing.

And result of validation is: -

[DisplayName("Name")] works fine, showing correct

[StringLength(20, ErrorMessage = "xxxx...")] - not working, no message showed when suppose to be one

[Required(ErrorMessage = "xxxx.")] - not working, not showing messages when delete required values?

but  (ModelState.IsValid) is false when I checked it in controller (it had to be because required value is missing)?

Is it this only partially correct and how this can be?

Well this is a bit frustrating because it cant be simpler than this and I cant make this simple code reuse. :|

Quite a few gotchas I already found or I am coding completely wrong.

Data Types - Date and Time in SqlServer

Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

Date and Time Data Types and Functions

The following sections in this topic provide an overview of all Transact-SQL date and time data types and functions. For information and examples that are common to date and time data types and functions

Frequently Asked Questions - SQL Server Data Types

This is good and precise introduction and Frequently Asked Questions - SQL Server Data Types

Data Points: Data Validation with Silverlight 3 and the DataForm


In this month's column, John Papa shows you how the DataForm control works and how it can be customized.  He presents in detail a sample application that uses several features to bind, navigate, edit and validate data using the DataForm.

John Papa

MSDN Magazine October 2009

Basic Instincts: Dynamic Data Entry With XML Literals


Learn how to use Windows Presentation Foundation (WPF), XAML, and the deep XML support in Visual Basic to generate user interfaces dynamically.

Beth Massi

MSDN Magazine October 2008

Mine Your Business: AMO Lets You Dig Deeper into Your Data from Your Own Applications


Analysis Management Objects (AMO) for SQL Server 2005 facilitates client-side custom programming as Decision Support Objects (DSO), the object model in SQL Server 2000 Analysis Services. With AMO, a whole range of data mining questions can be answered at the operational level. This means that sales and marketing departments get answers more quickly and thus can make informed decisions.

Liu Tang and Paul Bradley

MSDN Magazine June 2005

Advanced Basics: Data Binding in Visual Basic .NET


Ken Spencer introduces data binding in Visual Basic .NET.

Ken Spencer

MSDN Magazine August 2003

Spider in .NET: Crawl Web Sites and Catalog Info to Any Data Store with ADO.NET and Visual Basic .NE


Visual Basic .NET comes loaded with features not available in previous versions, including a new threading model, custom class creation, and data streaming. Learn how to take advantage of these features with an application that is designed to extract information from Web pages for indexing purposes. This article also discusses basic database access, file I/O, extending classes for objects, and the use of opacity and transparency in forms.

Mark Gerlach

MSDN Magazine October 2002

BizTalk: Implement Design Patterns for Business Rules with Orchestration Designer


Because the value of good software planning and design should never be underestimated, it can be beneficial to use one of the many existing design patterns as a foundation for solving some of your toughest architecture problems. This article describes several traditional design patterns including the Observer pattern and the Dispatcher pattern, elaborates on their structures, what they're used for, and how they can help you build a BizTalk-based solution. Following this is a discussion on using the BizTalk Orchestration Designer to build designs and integrate existing business processes.

Christian Thilmany and Todd McKinney

MSDN Magazine October 2001

Business Data Error: System.OverFlowException


I have a Business Data Catalog file I've uploaded to connect to our back end Firebird DBMS through ODBC.

The SharePoint server is MOSS 2007 x64. The web front end server(s) all have an x64 Firebird Engine and ODBC driver with verified connectivity to Firebird.

When I use one of the methods, I can see connections being made to our Firebird server and the query being passed. I know the query returns results (it's a stored procedure with no parameters), but I get the following error "An error occurred while retrieving data from MROTest1. Administrators, see the server log for more information" in IE. If I look in the server logs, I see (12\Hive\Logs)

Exception handed to HandleRuntimeException.HandleException System.OverflowException: Arithmetic operation resulted in an overflow.     at System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut)

Business Data Column cascade


Good afternoon, I would like to know if is possible to have two business data columns linked to each other. This is the scenario that I want:

BD Column 1 called State with all US states

BD Column 2 called City with all the cities based on the state selected on BD Column 1

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend