Project server event handler onupdating
One of the really nice things about the Currently we are displaying the foreign-key integer values in our Grid View for the Supplier and Category of each Product: While accurate from a data model perspective, it isn't very end-user friendly.
What I really want to-do is to display the Category Name and Supplier Name instead, and provide a drop-downlist while in Edit mode to enable end-users to easily associate the Supplier ID and Category ID values.
We'll customize each column to have a dropdownlist control when in edit mode, where the available values in the dropdownlists are pulled from the categories and suppliers datasource controls above, and where we two-way databind the selected value to the Product's Supplier ID and Category ID foreign keys: And now when end-users click edit in the Grid View, they are presented a drop-down list of all valid Supplier's to associate the product with: And when they hit save the Product is updated appropriately (the Grid View will use the Drop Down List's currently selected value to bind the Supplier ID).
Rather than show all products within the database, we can update our UI to include a dropdownlist that allows the user to filter the products by a particular category.
Below are the first four parts of my LINQ to SQL series: control that is shipping as part of ASP. All of the business rules and business validation logic will be implemented in our data model tier - and within the UI tier or in any of the UI pages.Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL.LINQ to SQL is a built-in O/RM (object relational mapper) that ships in the . NET (like the Object Data Source and SQLData Source controls that shipped with ASP. NET UI controls to LINQ to SQL data models super easy.As you've seen in my previous posts in this series, writing code using the LINQ to SQL ORM is extremely clean.
You can always write custom UI code to directly work against your LINQ to SQL data model if you prefer, or when you find a UI scenario that isn't particularly suited to using the control to build the web application scenario I defined above.We'll begin working on the application by first defining the data model we'll use to represent our database.