<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsSurvey" targetNamespace="http://tempuri.org/dsSurvey.xsd" xmlns:mstns="http://tempuri.org/dsSurvey.xsd" xmlns="http://tempuri.org/dsSurvey.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="Web.config" AppSettingsPropertyName="SuperbowlConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="SuperbowlConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.SuperbowlConnectionString.ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="dsSurveyTableAdapter" GeneratorDataComponentClassName="dsSurveyTableAdapter" Name="dsSurvey" UserDataComponentName="dsSurveyTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SuperbowlConnectionString (Web.config)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        scrSurvey.SurveyID, scrSurvey.dtDate, tblManager.strUserName, ISNULL(tblEmployee.strUserName, '') AS strRepName, ISNULL(tblManager.strRegion,'') as strRegion, 
                         ISNULL(scrSurvey.txtManagerComments, '') AS txtManagerComments
FROM            scrSurvey INNER JOIN
                         mstUser AS tblEmployee ON scrSurvey.RepID = tblEmployee.UserID INNER JOIN
                             (SELECT        scrUser.UserID, mstUser.strUserName, mstUser.strRegion
                               FROM            scrUser INNER JOIN
                                                         mstUser ON scrUser.refManagerID = mstUser.UserID) AS tblManager ON scrSurvey.RepID = tblManager.UserID
WHERE        (scrSurvey.SurveyID = @SurveyID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="SurveyID" ColumnName="SurveyID" DataSourceName="Superbowl.dbo.scrSurvey" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@SurveyID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="SurveyID" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="SurveyID" DataSetColumn="SurveyID" />
              <Mapping SourceColumn="dtDate" DataSetColumn="dtDate" />
              <Mapping SourceColumn="strRegion" DataSetColumn="strRegion" />
              <Mapping SourceColumn="strUserName" DataSetColumn="strUserName" />
              <Mapping SourceColumn="strRepName" DataSetColumn="strRepName" />
              <Mapping SourceColumn="txtManagerComments" DataSetColumn="txtManagerComments" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsSurvey" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="dsSurvey" msprop:Generator_UserDSName="dsSurvey">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="dsSurvey" msprop:Generator_TableClassName="dsSurveyDataTable" msprop:Generator_TableVarName="tabledsSurvey" msprop:Generator_TablePropName="_dsSurvey" msprop:Generator_RowDeletingName="dsSurveyRowDeleting" msprop:Generator_RowChangingName="dsSurveyRowChanging" msprop:Generator_RowEvHandlerName="dsSurveyRowChangeEventHandler" msprop:Generator_RowDeletedName="dsSurveyRowDeleted" msprop:Generator_UserTableName="dsSurvey" msprop:Generator_RowChangedName="dsSurveyRowChanged" msprop:Generator_RowEvArgName="dsSurveyRowChangeEvent" msprop:Generator_RowClassName="dsSurveyRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="SurveyID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnSurveyID" msprop:Generator_ColumnPropNameInRow="SurveyID" msprop:Generator_ColumnPropNameInTable="SurveyIDColumn" msprop:Generator_UserColumnName="SurveyID" type="xs:int" />
              <xs:element name="dtDate" msprop:Generator_ColumnVarNameInTable="columndtDate" msprop:Generator_ColumnPropNameInRow="dtDate" msprop:Generator_ColumnPropNameInTable="dtDateColumn" msprop:Generator_UserColumnName="dtDate" type="xs:dateTime" />
              <xs:element name="strRegion" msprop:Generator_ColumnVarNameInTable="columnstrRegion" msprop:Generator_ColumnPropNameInRow="strRegion" msprop:Generator_ColumnPropNameInTable="strRegionColumn" msprop:Generator_UserColumnName="strRegion" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strUserName" msprop:Generator_ColumnVarNameInTable="columnstrUserName" msprop:Generator_ColumnPropNameInRow="strUserName" msprop:Generator_ColumnPropNameInTable="strUserNameColumn" msprop:Generator_UserColumnName="strUserName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strRepName" msprop:Generator_ColumnVarNameInTable="columnstrRepName" msprop:Generator_ColumnPropNameInRow="strRepName" msprop:Generator_ColumnPropNameInTable="strRepNameColumn" msprop:Generator_UserColumnName="strRepName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="txtManagerComments" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columntxtManagerComments" msprop:Generator_ColumnPropNameInRow="txtManagerComments" msprop:Generator_ColumnPropNameInTable="txtManagerCommentsColumn" msprop:Generator_UserColumnName="txtManagerComments" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:dsSurvey" />
      <xs:field xpath="mstns:SurveyID" />
    </xs:unique>
  </xs:element>
</xs:schema>