Skip to content

Commit 0a97500

Browse files
authored
Merge pull request #3550 from gewarren/2015-dt-links
[data-tools] Remove links to vs-2015 topics not in the toc
2 parents ca517b7 + df89367 commit 0a97500

File tree

42 files changed

+165
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+165
-257
lines changed

docs/vs-2015/data-tools/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
##### [Bind WPF controls to a WCF data service](bind-wpf-controls-to-a-wcf-data-service.md)
8484
##### [Create lookup tables in WPF applications](create-lookup-tables-in-wpf-applications.md)
8585
##### [Display related data in WPF applications](display-related-data-in-wpf-applications.md)
86+
##### [Walkthrough: Display Related Data in a WPF Application](walkthrough-displaying-related-data-in-a-wpf-application.md)
8687
##### [Bind controls to pictures from a database](bind-controls-to-pictures-from-a-database.md)
8788
#### [Bind Windows Forms controls to data in Visual Studio](bind-windows-forms-controls-to-data-in-visual-studio.md)
8889
##### [Bind Windows Forms controls to data](bind-windows-forms-controls-to-data.md)

docs/vs-2015/data-tools/add-code-to-datasets-in-n-tier-applications.md

Lines changed: 48 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ ms.reviewer: ""
77
ms.suite: ""
88
ms.tgt_pltfrm: ""
99
ms.topic: "article"
10-
dev_langs:
10+
dev_langs:
1111
- "VB"
1212
- "CSharp"
13-
- "C++"
14-
- "aspx"
15-
helpviewer_keywords:
13+
helpviewer_keywords:
1614
- "n-tier applications, extending datasets"
1715
ms.assetid: d43c2ccd-4902-43d8-b1a8-d10ca5d3210c
1816
caps.latest.revision: 23
@@ -23,54 +21,52 @@ manager: "ghogen"
2321
# Add code to datasets in n-tier applications
2422
[!INCLUDE[vs2017banner](../includes/vs2017banner.md)]
2523

26-
27-
You can extend the functionality of a dataset by creating a partial class file for the dataset and adding code to it (instead of adding code to the *DatasetName*.Dataset.Designer file). Partial classes enable code for a specific class to be divided among multiple physical files. For more information, see [Partial](http://msdn.microsoft.com/library/7adaef80-f435-46e1-970a-269fff63b448) or [Partial Classes and Methods](http://msdn.microsoft.com/library/804cecb7-62db-4f97-a99f-60975bd59fa1).
28-
29-
The code that defines a dataset is generated every time changes are made to the dataset definition (in the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md)). This code is also generated when you make changes during the running of any wizard that modifies the configuration of a dataset. To prevent your code from being deleted during the regeneration of a dataset, add code to the dataset's partial class file.
30-
31-
By default, after you separate the dataset and `TableAdapter` code, the result is a discrete class file in each project. The original project has a filenamed *DatasetName*.Designer.vb (or *DatasetName*.Designer.cs) that contains the `TableAdapter` code. The project that's designated in the **Dataset Project** property has a file that's named *DatasetName*.DataSet.Designer.vb (or *DatasetName*.DataSet.Designer.cs).This file contains the dataset code.
32-
24+
You can extend the functionality of a dataset by creating a partial class file for the dataset and adding code to it (instead of adding code to the *DatasetName*.Dataset.Designer file). Partial classes enable code for a specific class to be divided among multiple physical files. For more information, see [Partial](http://msdn.microsoft.com/library/7adaef80-f435-46e1-970a-269fff63b448) or [Partial Classes and Methods](http://msdn.microsoft.com/library/804cecb7-62db-4f97-a99f-60975bd59fa1).
25+
26+
The code that defines a dataset is generated every time changes are made to the dataset definition. This code is also generated when you make changes during the running of any wizard that modifies the configuration of a dataset. To prevent your code from being deleted during the regeneration of a dataset, add code to the dataset's partial class file.
27+
28+
By default, after you separate the dataset and `TableAdapter` code, the result is a discrete class file in each project. The original project has a filenamed *DatasetName*.Designer.vb (or *DatasetName*.Designer.cs) that contains the `TableAdapter` code. The project that's designated in the **Dataset Project** property has a file that's named *DatasetName*.DataSet.Designer.vb (or *DatasetName*.DataSet.Designer.cs).This file contains the dataset code.
29+
3330
> [!NOTE]
34-
> When you separate datasets and `TableAdapter`s (by setting the **DataSet Project** property), existing partial dataset classes in the project won't be moved automatically. Existing dataset partial classes must be moved manually to the dataset project.
35-
31+
> When you separate datasets and `TableAdapter`s (by setting the **DataSet Project** property), existing partial dataset classes in the project won't be moved automatically. Existing dataset partial classes must be moved manually to the dataset project.
32+
3633
> [!NOTE]
37-
> When validation code needs to be added, the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md)provides functionality for generating <xref:System.Data.DataTable.ColumnChanging> and <xref:System.Data.DataTable.RowChanging> event handlers. For more information, see [Add validation to an n-tier dataset](../data-tools/add-validation-to-an-n-tier-dataset.md).
38-
39-
### To add code to datasets in n-tier applications
40-
41-
1. Locate the project that contains the .xsd file (the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md)).
42-
43-
2. Select the **.xsd** file to open the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md).
44-
45-
3. Right-click the data table to which you want to add code (the table name in the title bar), and thenselect**View Code**.
46-
47-
A partial class is created and opens in the Code Editor.
48-
49-
4. Add code inside the partial class declaration.
50-
51-
The following example shows where to add code to the CustomersDataTable in the NorthwindDataSet:
52-
53-
```vb
54-
Partial Public Class CustomersDataTable
55-
' Add code here to add functionality
56-
' to the CustomersDataTable.
57-
End Class
58-
```
59-
60-
```csharp
61-
partial class CustomersDataTable
62-
{
63-
// Add code here to add functionality
64-
// to the CustomersDataTable.
65-
}
66-
```
67-
68-
## See Also
69-
[N-Tier Data Applications Overview](../data-tools/n-tier-data-applications-overview.md)
70-
[Add code to TableAdapters in n-tier applications](../data-tools/add-code-to-tableadapters-in-n-tier-applications.md)
71-
[TableAdapters](http://msdn.microsoft.com/library/09416de9-134c-4dc7-8262-6c8d81e3f364)
72-
[TableAdapterManager Overview](http://msdn.microsoft.com/library/33076d42-6b41-491a-ac11-6c6339aea650)
73-
[Hierarchical Update Overview](http://msdn.microsoft.com/library/c4f8e8b9-e4a5-4a02-8462-d03d1e8222d6)
74-
[Creating Data Applications](../data-tools/creating-data-applications.md)
75-
[Dataset tools in Visual Studio](../data-tools/dataset-tools-in-visual-studio.md)
34+
> When validation code needs to be added, the DataSet Designer provides functionality for generating <xref:System.Data.DataTable.ColumnChanging> and <xref:System.Data.DataTable.RowChanging> event handlers. For more information, see [Add validation to an n-tier dataset](../data-tools/add-validation-to-an-n-tier-dataset.md).
35+
36+
## Add code to datasets in n-tier applications
37+
38+
1. Locate the project that contains the .xsd file (the dataset).
39+
40+
2. Select the **.xsd** file to open the dataset.
41+
42+
3. Right-click the data table to which you want to add code (the table name in the title bar), and then select **View Code**.
43+
44+
A partial class is created and opens in the Code Editor.
45+
46+
4. Add code inside the partial class declaration.
47+
48+
The following example shows where to add code to the CustomersDataTable in the NorthwindDataSet:
49+
50+
```vb
51+
Partial Public Class CustomersDataTable
52+
' Add code here to add functionality
53+
' to the CustomersDataTable.
54+
End Class
55+
```
56+
57+
```csharp
58+
partial class CustomersDataTable
59+
{
60+
// Add code here to add functionality
61+
// to the CustomersDataTable.
62+
}
63+
```
64+
65+
## See also
7666

67+
- [N-Tier Data Applications Overview](../data-tools/n-tier-data-applications-overview.md)
68+
- [Add code to TableAdapters in n-tier applications](../data-tools/add-code-to-tableadapters-in-n-tier-applications.md)
69+
- [TableAdapters](http://msdn.microsoft.com/library/09416de9-134c-4dc7-8262-6c8d81e3f364)
70+
- [TableAdapterManager Overview](http://msdn.microsoft.com/library/33076d42-6b41-491a-ac11-6c6339aea650)
71+
- [Hierarchical Update Overview](http://msdn.microsoft.com/library/c4f8e8b9-e4a5-4a02-8462-d03d1e8222d6)
72+
- [Dataset tools in Visual Studio](../data-tools/dataset-tools-in-visual-studio.md)

docs/vs-2015/data-tools/add-code-to-tableadapters-in-n-tier-applications.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ manager: "ghogen"
2727

2828
You can extend the functionality of a `TableAdapter` by creating a partial class file for the `TableAdapter` and adding code to it (instead of adding code to the *DatasetName*.DataSet.Designer file). Partial classes enable code for a specific class to be divided among multiple physical files. For more information, see [Partial](http://msdn.microsoft.com/library/7adaef80-f435-46e1-970a-269fff63b448) or [partial (Type)](http://msdn.microsoft.com/library/27320743-a22e-4c7b-b0b3-53afe3607334).
2929

30-
The code that defines a `TableAdapter` is generated every time changes are made to the `TableAdapter` (in the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md)). This code is also generated when changes are made during the running of any wizard that modifies the configuration of the `TableAdapter`. To prevent your code from being deleted during the regeneration of a `TableAdapter`, add code to the partial class file of the `TableAdapter`.
30+
The code that defines a `TableAdapter` is generated every time changes are made to the `TableAdapter`. This code is also generated when changes are made during the running of any wizard that modifies the configuration of the `TableAdapter`. To prevent your code from being deleted during the regeneration of a `TableAdapter`, add code to the partial class file of the `TableAdapter`.
3131

3232
By default, after you separate the dataset and `TableAdapter` code, the result is a discrete class file in each project. The original project has a file named *DatasetName*.Designer.vb (or *DatasetName*.Designer.cs) that contains the `TableAdapter` code. The project that's designated in the **Dataset Project** property has a file named *DatasetName*.DataSet.Designer.vb (or *DatasetName*.DataSet.Designer.cs) that contains the dataset code.
3333

3434
> [!NOTE]
35-
> When you separate datasets and `TableAdapter`s (by setting the **DataSet Project** property), existing partial dataset classes in the project will not be moved automatically. Existing dataset partial classes must be moved manually to the dataset project.
35+
> When you separate datasets and `TableAdapter`s (by setting the **DataSet Project** property), existing partial dataset classes in the project will not be moved automatically. Existing dataset partial classes must be moved manually to the dataset project.
3636
3737
> [!NOTE]
38-
> The [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md) provides functionality for generating <xref:System.Data.DataTable.ColumnChanging> and <xref:System.Data.DataTable.RowChanging> event handlers when validation is needed. For more information, see [Add validation to an n-tier dataset](../data-tools/add-validation-to-an-n-tier-dataset.md).
38+
> The DataSet Designer provides functionality for generating <xref:System.Data.DataTable.ColumnChanging> and <xref:System.Data.DataTable.RowChanging> event handlers when validation is needed. For more information, see [Add validation to an n-tier dataset](../data-tools/add-validation-to-an-n-tier-dataset.md).
3939
4040
[!INCLUDE[note_settings_general](../includes/note-settings-general-md.md)]
4141

4242
### To add user code to a TableAdapter in an n-tier application
4343

44-
1. Locate the project that contains the .xsd file (the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md)).
44+
1. Locate the project that contains the .xsd file (the dataset).
4545

46-
2. Double click the **.xsd** file to open the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md).
46+
2. Double click the **.xsd** file to open the dataset.
4747

4848
3. Right-click the `TableAdapter` that you want to add code to, and then select**View Code**.
4949

@@ -73,6 +73,4 @@ You can extend the functionality of a `TableAdapter` by creating a partial class
7373
[Add code to datasets in n-tier applications](../data-tools/add-code-to-datasets-in-n-tier-applications.md)
7474
[TableAdapters](http://msdn.microsoft.com/library/09416de9-134c-4dc7-8262-6c8d81e3f364)
7575
[TableAdapterManager Overview](http://msdn.microsoft.com/library/33076d42-6b41-491a-ac11-6c6339aea650)
76-
[Hierarchical Update Overview](http://msdn.microsoft.com/library/c4f8e8b9-e4a5-4a02-8462-d03d1e8222d6)
77-
[Creating Data Applications](../data-tools/creating-data-applications.md)
78-
76+
[Hierarchical Update Overview](http://msdn.microsoft.com/library/c4f8e8b9-e4a5-4a02-8462-d03d1e8222d6)

docs/vs-2015/data-tools/add-validation-to-an-n-tier-dataset.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ manager: "ghogen"
2525
# Add validation to an n-tier dataset
2626
[!INCLUDE[vs2017banner](../includes/vs2017banner.md)]
2727

28-
2928
Adding validation to a dataset that is separated into an n-tier solution is basically the same as adding validation to a single-file dataset (a dataset in a single project). The suggested location for performing validation on data is during the <xref:System.Data.DataTable.ColumnChanging> and/or <xref:System.Data.DataTable.RowChanging> events of a data table.
3029

31-
The [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md) provides the functionality to create partial classes to which you can add user code to column- and row- changing events of the data tables in the dataset. For more information about adding code to a dataset in an n-tier solution, see [Add code to datasets in n-tier applications](../data-tools/add-code-to-datasets-in-n-tier-applications.md), and [Add code to TableAdapters in n-tier applications](../data-tools/add-code-to-tableadapters-in-n-tier-applications.md). For more information about partial classes, see [How to: Split a Class into Partial Classes (Class Designer)](../ide/how-to-split-a-class-into-partial-classes-class-designer.md) or [Partial Classes and Methods](http://msdn.microsoft.com/library/804cecb7-62db-4f97-a99f-60975bd59fa1).
30+
The DataSet Designer provides the functionality to create partial classes to which you can add user code to column- and row- changing events of the data tables in the dataset. For more information about adding code to a dataset in an n-tier solution, see [Add code to datasets in n-tier applications](../data-tools/add-code-to-datasets-in-n-tier-applications.md), and [Add code to TableAdapters in n-tier applications](../data-tools/add-code-to-tableadapters-in-n-tier-applications.md). For more information about partial classes, see [How to: Split a Class into Partial Classes (Class Designer)](../ide/how-to-split-a-class-into-partial-classes-class-designer.md) or [Partial Classes and Methods](http://msdn.microsoft.com/library/804cecb7-62db-4f97-a99f-60975bd59fa1).
3231

3332
> [!NOTE]
3433
> When you separate datasets from TableAdapters (by setting the **DataSet Project** property), existing partial dataset classes in the project won't be moved automatically. Existing dataset partial classes must be moved manually to the dataset project.
@@ -37,7 +36,7 @@ Adding validation to a dataset that is separated into an n-tier solution is basi
3736
> The Dataset Designer does not automatically create event handlers in C# for the <xref:System.Data.DataTable.ColumnChanging> and <xref:System.Data.DataTable.RowChanging> events. You have to manually create an event handler and hook up the event handler to the underlying event. The following procedures describe how to create the required event handlers in both Visual Basic and C#.
3837
3938
## Validatechanges to individual columns
40-
Validate values in individual columns by handling the <xref:System.Data.DataTable.ColumnChanging> event. The <xref:System.Data.DataTable.ColumnChanging> event is raised when a value in a column is modified. Create an event handler for the <xref:System.Data.DataTable.ColumnChanging> event by double-clicking the desired column on the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md).
39+
Validate values in individual columns by handling the <xref:System.Data.DataTable.ColumnChanging> event. The <xref:System.Data.DataTable.ColumnChanging> event is raised when a value in a column is modified. Create an event handler for the <xref:System.Data.DataTable.ColumnChanging> event by double-clicking the desired column on the dataset.
4140

4241
The first time that you double-click a column, the designer generates an event handler for the <xref:System.Data.DataTable.ColumnChanging> event. An `If…Then` statement is also created that tests for the specific column. For example, the following code is generated when you double-click the RequiredDate column on the Northwind Orders table:
4342

@@ -56,7 +55,7 @@ End Sub
5655

5756
#### To add validation during changes to individual column values
5857

59-
1. Open the dataset in the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md) by double-clicking the **.xsd** file in **Solution Explorer**. For more information, see [How to: Open a Dataset in the Dataset Designer](http://msdn.microsoft.com/library/36fc266f-365b-42cb-aebb-c993dc2c47c3).
58+
1. Open the dataset in the designer by double-clicking the **.xsd** file in **Solution Explorer**. For more information, see [How to: Open a Dataset in the Dataset Designer](http://msdn.microsoft.com/library/36fc266f-365b-42cb-aebb-c993dc2c47c3).
6059

6160
2. Double-click the column you want to validate. This action creates the <xref:System.Data.DataTable.ColumnChanging> event handler.
6261

@@ -111,11 +110,11 @@ End Sub
111110

112111
When orders are being entered, validation makes sure that an order is not entered with a RequiredDate that is on or before the OrderDate. In this example, the values for both the RequiredDate and OrderDate columns need to be compared, so validating an individual column change does not make sense.
113112

114-
Create an event handler for the <xref:System.Data.DataTable.RowChanging> event by double-clicking the table name in the title bar of the table on the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md).
113+
Create an event handler for the <xref:System.Data.DataTable.RowChanging> event by double-clicking the table name in the title bar of the table.
115114

116115
#### To add validation during changes to whole rows
117116

118-
1. Open the dataset in the [Creating and Editing Typed Datasets](../data-tools/creating-and-editing-typed-datasets.md) by double-clicking the **.xsd** file in **Solution Explorer**. For more information, see [How to: Open a Dataset in the Dataset Designer](http://msdn.microsoft.com/library/36fc266f-365b-42cb-aebb-c993dc2c47c3).
117+
1. Open the dataset in the designer by double-clicking the **.xsd** file in **Solution Explorer**. For more information, see [How to: Open a Dataset in the Dataset Designer](http://msdn.microsoft.com/library/36fc266f-365b-42cb-aebb-c993dc2c47c3).
119118

120119
2. Double-click the title bar of the data table on the designer.
121120

@@ -177,4 +176,3 @@ End Sub
177176
[N-Tier Data Applications Overview](../data-tools/n-tier-data-applications-overview.md)
178177
[Walkthrough: Creating an N-Tier Data Application](../data-tools/walkthrough-creating-an-n-tier-data-application.md)
179178
[Validate data in datasets](../data-tools/validate-data-in-datasets.md)
180-

0 commit comments

Comments
 (0)