<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsQuery" targetNamespace="http://tempuri.org/dsQuery.xsd" xmlns:mstns="http://tempuri.org/dsQuery.xsd" xmlns="http://tempuri.org/dsQuery.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" GeneratorFunctionsComponentClassName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" UserFunctionsComponentName="QueriesTableAdapter" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="gwcs" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="gwcs (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.FPJ0000.Properties.Settings.GlobalReference.Default.gwcs" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="JobReportItemListTableAdapter" GeneratorDataComponentClassName="JobReportItemListTableAdapter" Name="JobReportItemList" UserDataComponentName="JobReportItemListTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.JobReport" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="FillSearch" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetSearch" GeneratorSourceName="FillSearch" GetMethodModifier="Public" GetMethodName="GetSearch" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetSearch" UserSourceName="FillSearch">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT  pidx, projectName, MAX(pdate) AS pdate
FROM     JobReport WITH (nolock)
WHERE  (ISNULL(projectName, N'') LIKE @search OR
               ISNULL(description, N'') LIKE @search) AND (projectName &lt;&gt; '') AND (gcode = @gcode)
GROUP BY pidx, projectName
ORDER BY projectName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="search" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="String" Direction="Input" ParameterName="@search" Precision="0" Scale="0" Size="1024" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.JobReport" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="pidx" DataSetColumn="pidx" />
              <Mapping SourceColumn="projectName" DataSetColumn="projectName" />
              <Mapping SourceColumn="pdate" DataSetColumn="pdate" />
            </Mappings>
            <Sources />
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="HolydayUserListTableAdapter" GeneratorDataComponentClassName="HolydayUserListTableAdapter" Name="HolydayUserList" UserDataComponentName="HolydayUserListTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="gwcs (Settings)" DbObjectName="EE.dbo.Holyday" DbObjectType="Table" 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="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT  uid, dbo.getUserName(uid) AS UserName
FROM     Holyday WITH (NOLOCK)
WHERE  (gcode = @gcode) AND (sdate &gt;= @sd) AND (sdate &lt;= @ed)
GROUP BY uid
ORDER BY UserName</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="gcode" ColumnName="gcode" DataSourceName="EE.dbo.Holyday" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@gcode" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="gcode" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="sd" ColumnName="sdate" DataSourceName="EE.dbo.Holyday" DataTypeServer="date" DbType="AnsiString" Direction="Input" ParameterName="@sd" Precision="0" ProviderType="Date" Scale="0" Size="3" SourceColumn="sdate" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="ed" ColumnName="sdate" DataSourceName="EE.dbo.Holyday" DataTypeServer="date" DbType="AnsiString" Direction="Input" ParameterName="@ed" Precision="0" ProviderType="Date" Scale="0" Size="3" SourceColumn="sdate" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="uid" DataSetColumn="uid" />
              <Mapping SourceColumn="UserName" DataSetColumn="UserName" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources>
          <DbSource ConnectionRef="gwcs (Settings)" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="CheckHoliday" MethodsParameterType="CLR" Modifier="Public" Name="CheckHoliday" QueryType="Scalar" ScalarCallRetval="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="CheckHoliday">
            <SelectCommand>
              <DbCommand CommandType="Text" ModifiedByUser="true">
                <CommandText>SELECT  ISNULL(free, 0) AS free
FROM     HolidayLIst
WHERE  (pdate = @pdate)</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="true" AutogeneratedName="pdate" ColumnName="pdate" DataSourceName="GroupWare.dbo.HolidayLIst" DataTypeServer="varchar(10)" DbType="AnsiString" Direction="Input" ParameterName="@pdate" Precision="0" ProviderType="VarChar" Scale="0" Size="10" SourceColumn="pdate" SourceColumnNullMapping="false" SourceVersion="Current" />
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsQuery" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="dsQuery" msprop:Generator_UserDSName="dsQuery">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="JobReportItemList" msprop:Generator_TableClassName="JobReportItemListDataTable" msprop:Generator_RowEvArgName="JobReportItemListRowChangeEvent" msprop:Generator_TableVarName="tableJobReportItemList" msprop:Generator_TablePropName="JobReportItemList" msprop:Generator_RowDeletingName="JobReportItemListRowDeleting" msprop:Generator_RowChangingName="JobReportItemListRowChanging" msprop:Generator_RowDeletedName="JobReportItemListRowDeleted" msprop:Generator_RowEvHandlerName="JobReportItemListRowChangeEventHandler" msprop:Generator_UserTableName="JobReportItemList" msprop:Generator_RowChangedName="JobReportItemListRowChanged" msprop:Generator_RowClassName="JobReportItemListRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="pidx" msprop:Generator_ColumnVarNameInTable="columnpidx" msprop:Generator_ColumnPropNameInRow="pidx" msprop:Generator_ColumnPropNameInTable="pidxColumn" msprop:Generator_UserColumnName="pidx" type="xs:int" />
              <xs:element name="projectName" msprop:Generator_ColumnVarNameInTable="columnprojectName" msprop:Generator_ColumnPropNameInRow="projectName" msprop:Generator_ColumnPropNameInTable="projectNameColumn" msprop:Generator_UserColumnName="projectName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="255" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="pdate" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnpdate" msprop:Generator_ColumnPropNameInRow="pdate" msprop:Generator_ColumnPropNameInTable="pdateColumn" msprop:Generator_UserColumnName="pdate" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="10" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="HolydayUserList" msprop:Generator_TableClassName="HolydayUserListDataTable" msprop:Generator_TableVarName="tableHolydayUserList" msprop:Generator_TablePropName="HolydayUserList" msprop:Generator_RowDeletingName="HolydayUserListRowDeleting" msprop:Generator_RowChangingName="HolydayUserListRowChanging" msprop:Generator_RowEvHandlerName="HolydayUserListRowChangeEventHandler" msprop:Generator_RowDeletedName="HolydayUserListRowDeleted" msprop:Generator_UserTableName="HolydayUserList" msprop:Generator_RowChangedName="HolydayUserListRowChanged" msprop:Generator_RowEvArgName="HolydayUserListRowChangeEvent" msprop:Generator_RowClassName="HolydayUserListRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="uid" msprop:Generator_ColumnVarNameInTable="columnuid" msprop:Generator_ColumnPropNameInRow="uid" msprop:Generator_ColumnPropNameInTable="uidColumn" msprop:Generator_UserColumnName="uid">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="UserName" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnUserName" msprop:Generator_ColumnPropNameInRow="UserName" msprop:Generator_ColumnPropNameInTable="UserNameColumn" msprop:Generator_UserColumnName="UserName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="200" />
                  </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:JobReportItemList" />
      <xs:field xpath="mstns:pidx" />
      <xs:field xpath="mstns:projectName" />
    </xs:unique>
    <xs:unique name="HolydayUserList_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:HolydayUserList" />
      <xs:field xpath="mstns:uid" />
    </xs:unique>
  </xs:element>
</xs:schema>