Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full code for the Chapter 1 project.
- Loading branch information
Showing
27 changed files
with
3,985 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contacts", "Contacts\Contacts.csproj", "{64DE31EA-4B7F-4674-A365-25BE712B823E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{64DE31EA-4B7F-4674-A365-25BE712B823E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{64DE31EA-4B7F-4674-A365-25BE712B823E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{64DE31EA-4B7F-4674-A365-25BE712B823E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{64DE31EA-4B7F-4674-A365-25BE712B823E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<configSections> | ||
</configSections> | ||
<connectionStrings> | ||
<add name="Contacts.Properties.Settings.ContactDBConnectionString" | ||
connectionString="Data Source=|DataDirectory|\ContactDB.sdf" | ||
providerName="Microsoft.SqlServerCe.Client.4.0" /> | ||
</connectionStrings> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
</configuration> |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!--<autogenerated> | ||
This code was generated by a tool. | ||
Changes to this file may cause incorrect behavior and will be lost if | ||
the code is regenerated. | ||
</autogenerated>--> | ||
<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | ||
<TableUISettings /> | ||
</DataSetUISetting> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema id="ContactDBDataSet" targetNamespace="http://tempuri.org/ContactDBDataSet.xsd" xmlns:mstns="http://tempuri.org/ContactDBDataSet.xsd" xmlns="http://tempuri.org/ContactDBDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified"> | ||
<xs:annotation> | ||
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource"> | ||
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | ||
<Connections> | ||
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="ContactDBConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="ContactDBConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Contacts.Properties.Settings.GlobalReference.Default.ContactDBConnectionString" Provider="Microsoft.SqlServerCe.Client.4.0" /> | ||
</Connections> | ||
<Tables> | ||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="PeopleTableAdapter" GeneratorDataComponentClassName="PeopleTableAdapter" Name="People" UserDataComponentName="PeopleTableAdapter"> | ||
<MainSource> | ||
<DbSource ConnectionRef="ContactDBConnectionString (Settings)" DbObjectName="People" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"> | ||
<DeleteCommand> | ||
<DbCommand CommandType="Text" ModifiedByUser="false"> | ||
<CommandText>DELETE FROM [People] WHERE (([ContactID] = @Original_ContactID))</CommandText> | ||
<Parameters> | ||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" /> | ||
</Parameters> | ||
</DbCommand> | ||
</DeleteCommand> | ||
<InsertCommand> | ||
<DbCommand CommandType="Text" ModifiedByUser="false"> | ||
<CommandText>INSERT INTO [People] ([Name], [Company], [Telephone], [Email], [Client], [LastCall]) VALUES (@Name, @Company, @Telephone, @Email, @Client, @LastCall)</CommandText> | ||
<Parameters> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Company" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Company" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Telephone" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Telephone" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Email" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Email" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Client" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Client" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@LastCall" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="LastCall" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
</Parameters> | ||
</DbCommand> | ||
</InsertCommand> | ||
<SelectCommand> | ||
<DbCommand CommandType="Text" ModifiedByUser="false"> | ||
<CommandText>SELECT [ContactID], [Name], [Company], [Telephone], [Email], [Client], [LastCall] FROM [People]</CommandText> | ||
<Parameters /> | ||
</DbCommand> | ||
</SelectCommand> | ||
<UpdateCommand> | ||
<DbCommand CommandType="Text" ModifiedByUser="false"> | ||
<CommandText>UPDATE [People] SET [Name] = @Name, [Company] = @Company, [Telephone] = @Telephone, [Email] = @Email, [Client] = @Client, [LastCall] = @LastCall WHERE (([ContactID] = @Original_ContactID))</CommandText> | ||
<Parameters> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Company" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Company" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Telephone" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Telephone" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Email" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Email" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Client" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Client" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@LastCall" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="LastCall" SourceColumnNullMapping="false" SourceVersion="Current" /> | ||
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" /> | ||
</Parameters> | ||
</DbCommand> | ||
</UpdateCommand> | ||
</DbSource> | ||
</MainSource> | ||
<Mappings> | ||
<Mapping SourceColumn="ContactID" DataSetColumn="ContactID" /> | ||
<Mapping SourceColumn="Name" DataSetColumn="Name" /> | ||
<Mapping SourceColumn="Company" DataSetColumn="Company" /> | ||
<Mapping SourceColumn="Telephone" DataSetColumn="Telephone" /> | ||
<Mapping SourceColumn="Email" DataSetColumn="Email" /> | ||
<Mapping SourceColumn="Client" DataSetColumn="Client" /> | ||
<Mapping SourceColumn="LastCall" DataSetColumn="LastCall" /> | ||
</Mappings> | ||
<Sources /> | ||
</TableAdapter> | ||
</Tables> | ||
<Sources /> | ||
</DataSource> | ||
</xs:appinfo> | ||
</xs:annotation> | ||
<xs:element name="ContactDBDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="ContactDBDataSet" msprop:Generator_UserDSName="ContactDBDataSet"> | ||
<xs:complexType> | ||
<xs:choice minOccurs="0" maxOccurs="unbounded"> | ||
<xs:element name="People" msprop:Generator_TableClassName="PeopleDataTable" msprop:Generator_TableVarName="tablePeople" msprop:Generator_RowChangedName="PeopleRowChanged" msprop:Generator_TablePropName="People" msprop:Generator_RowDeletingName="PeopleRowDeleting" msprop:Generator_RowChangingName="PeopleRowChanging" msprop:Generator_RowEvHandlerName="PeopleRowChangeEventHandler" msprop:Generator_RowDeletedName="PeopleRowDeleted" msprop:Generator_RowClassName="PeopleRow" msprop:Generator_UserTableName="People" msprop:Generator_RowEvArgName="PeopleRowChangeEvent"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="ContactID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="1" msprop:Generator_ColumnVarNameInTable="columnContactID" msprop:Generator_ColumnPropNameInRow="ContactID" msprop:Generator_ColumnPropNameInTable="ContactIDColumn" msprop:Generator_UserColumnName="ContactID" type="xs:int" /> | ||
<xs:element name="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnPropNameInTable="NameColumn" msprop:Generator_UserColumnName="Name" minOccurs="0"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:maxLength value="100" /> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="Company" msprop:Generator_ColumnVarNameInTable="columnCompany" msprop:Generator_ColumnPropNameInRow="Company" msprop:Generator_ColumnPropNameInTable="CompanyColumn" msprop:Generator_UserColumnName="Company" minOccurs="0"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:maxLength value="100" /> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="Telephone" msprop:Generator_ColumnVarNameInTable="columnTelephone" msprop:Generator_ColumnPropNameInRow="Telephone" msprop:Generator_ColumnPropNameInTable="TelephoneColumn" msprop:Generator_UserColumnName="Telephone" minOccurs="0"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:maxLength value="100" /> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="Email" msprop:Generator_ColumnVarNameInTable="columnEmail" msprop:Generator_ColumnPropNameInRow="Email" msprop:Generator_ColumnPropNameInTable="EmailColumn" msprop:Generator_UserColumnName="Email" minOccurs="0"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:maxLength value="100" /> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="Client" msprop:Generator_ColumnVarNameInTable="columnClient" msprop:Generator_ColumnPropNameInRow="Client" msprop:Generator_ColumnPropNameInTable="ClientColumn" msprop:Generator_UserColumnName="Client" type="xs:boolean" minOccurs="0" /> | ||
<xs:element name="LastCall" msprop:Generator_ColumnVarNameInTable="columnLastCall" msprop:Generator_ColumnPropNameInRow="LastCall" msprop:Generator_ColumnPropNameInTable="LastCallColumn" msprop:Generator_UserColumnName="LastCall" type="xs:dateTime" minOccurs="0" /> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:choice> | ||
</xs:complexType> | ||
<xs:unique name="Constraint1" msdata:PrimaryKey="true"> | ||
<xs:selector xpath=".//mstns:People" /> | ||
<xs:field xpath="mstns:ContactID" /> | ||
</xs:unique> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Oops, something went wrong.