Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentTimesheetRDLC.aspx.cs" Inherits="CamstarReportPortal.Equipment.EquipmentTimesheetRDLC" MasterPageFile="~/Common/SiteMaster.Master" %>
- <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
- <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
- <asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server">
- <div title="Enter an Equipment ID to begin search.">
- <h1>
- <asp:Label ID="lblTitle" runat="server" Font-Underline="True" Font-Bold="true" Text="Equipment Timesheet"></asp:Label>
- </h1>
- </div>
- <div>
- <table>
- <tr>
- <td>
- <table>
- <tr>
- <td>
- <fieldset class="field_set">
- <legend style="color: #000000;"><a class="label">Required Filters</a></legend>
- <table style="height: 75px">
- <tr>
- <td class="label">
- Division:
- </td>
- <td>
- <asp:DropDownList ID="ddlDivision" CssClass="txtBox" runat="server" AutoPostBack="True" Width="150px"
- DataSourceID="sqldsDivision" DataTextField="DIVISION_TEXT" DataValueField="DIVISION_TEXT">
- </asp:DropDownList>
- </td>
- <td class="label">
- Date From:
- </td>
- <td style="width: 158px">
- <asp:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="Image1" TargetControlID="txtDateFrom">
- </asp:CalendarExtender>
- <asp:TextBox ID="txtDateFrom" Width="125px" CssClass="txtBox" runat="server"></asp:TextBox>
- <asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/ig_res/Trendy/images/imgDatePicker.png"
- AlternateText="Click to show calendar" />
- </td>
- <td class="label">
- Handler Type:
- </td>
- <td>
- <asp:DropDownList ID="ddlHandler" CssClass="txtBox" runat="server" AutoPostBack="True" Width="150px"
- DataSourceID="sqldsHType" DataTextField="HANDLERTYPE"
- DataValueField="HANDLERVALUE">
- </asp:DropDownList>
- </td>
- </tr>
- <tr>
- <td class="label">
- Tester Type:
- </td>
- <td>
- <asp:DropDownList ID="ddlTesterType" CssClass="txtBox" runat="server"
- DataSourceID="sqldsTesterType" Width="150px"
- DataTextField="TESTERTYPE" DataValueField="TESTERVALUE"
- AutoPostBack="True">
- </asp:DropDownList>
- </td>
- <td class="label">
- Date To:
- </td>
- <td>
- <asp:CalendarExtender ID="CalendarExtender2" runat="server" PopupButtonID="Image2" TargetControlID="txtDateTo">
- </asp:CalendarExtender>
- <asp:TextBox ID="txtDateTo" Width="125px" CssClass="txtBox" runat="server"></asp:TextBox>
- <asp:ImageButton runat="Server" ID="Image2" ImageUrl="~/ig_res/Trendy/images/imgDatePicker.png"
- AlternateText="Click to show calendar" />
- </td>
- <td class="label">
- Handler ID:
- </td>
- <td>
- <asp:DropDownList ID="ddlHandlerID" CssClass="txtBox" runat="server" Width="150px"
- DataSourceID="sqldsHandlerID" DataTextField="HANDLERID_TEXT"
- DataValueField="HANDLERID_VALUE">
- </asp:DropDownList>
- </td>
- </tr>
- <tr>
- <td class="label">
- Tester ID:
- </td>
- <td>
- <asp:DropDownList ID="ddlTesterID" CssClass="txtBox" runat="server" DataSourceID="sqldsTesterID" Width="150px"
- DataTextField="TESTERID_TEXT" DataValueField="TESTERID_VALUE">
- </asp:DropDownList>
- <asp:TextBox ID="txtTesterID" CssClass="txtBox" runat="server" Visible="false"></asp:TextBox>
- </td>
- <td class="label">
- Shift:
- </td>
- <td>
- <asp:DropDownList ID="ddlShift" CssClass="txtBox" runat="server" Width="150px">
- <asp:ListItem Text="ALL" Value="%" Selected="True"></asp:ListItem>
- <asp:ListItem Text="A" Value="A"></asp:ListItem>
- <asp:ListItem Text="B" Value="B"></asp:ListItem>
- </asp:DropDownList>
- </td>
- </tr>
- </table>
- </fieldset>
- </td>
- <td>
- <fieldset class="field_set">
- <legend style="color: #000000"><a class="label">Optional Filters</a></legend>
- <table style="height: 75px">
- <tr>
- <td class="label">
- Lot Number:
- </td>
- <td>
- <asp:TextBox ID="txtBoxLot" runat="server" CssClass="txtBox"></asp:TextBox>
- </td>
- <td class="label">
- Operator ID:
- </td>
- <td>
- <asp:TextBox ID="txtBoxOperatorID" runat="server" CssClass="txtBox"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <td class="label">
- Technician ID:
- </td>
- <td>
- <asp:TextBox ID="txtBoxTechID" runat="server" CssClass="txtBox"></asp:TextBox>
- </td>
- <td class="label">
- DieType:
- </td>
- <td>
- <asp:TextBox ID="txtBoxDieType" runat="server" CssClass="txtBox"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <td class="label">
- Status Code:
- </td>
- <td>
- <asp:TextBox ID="txtBoxStatusCode" runat="server" CssClass="txtBox"></asp:TextBox>
- </td>
- <td class="label">
- Device:
- </td>
- <td>
- <asp:TextBox ID="txtBoxDevice" runat="server" CssClass="txtBox"></asp:TextBox>
- </td>
- </tr>
- </table>
- </fieldset>
- </td>
- <td>
- <asp:Button ID="btnFilter" runat="server" Text="Search" CssClass="text"
- Width="50px" onclick="btnFilter_Click" /><br />
- <br />
- <asp:Button ID="btnReset" runat="server" Text="Reset" CssClass="text" Width="50px"/><br />
- </td>
- </tr>
- <tr>
- <td>
- </td>
- <td colspan="1" align="right">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- <div>
- <rsweb:ReportViewer ID="reportViewer" Font-Names="Verdana" AsyncRendering="false" SizeToReportContent="True"
- Font-Size="8pt" runat="server">
- <LocalReport>
- <DataSources>
- <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="EquipmentTimesheet_SP_GETEQUIPMENTTIMESHEET" />
- </DataSources>
- </LocalReport>
- </rsweb:ReportViewer>
- </div>
- <div>
- <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
- OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
- TypeName="CamstarReportPortal.Equipment.Reports.EquipmentTimesheetTableAdapters.SP_GETEQUIPMENTTIMESHEETTableAdapter">
- <SelectParameters>
- <asp:ControlParameter ControlID="txtDateFrom" Name="fromdate"
- PropertyName="Text" Type="String" />
- <asp:ControlParameter ControlID="txtDateTo" Name="todate" PropertyName="Text"
- Type="String" />
- <asp:ControlParameter ControlID="ddlDivision" Name="location"
- PropertyName="SelectedValue" Type="String" />
- <asp:ControlParameter ControlID="ddlTesterID" Name="equipment"
- PropertyName="SelectedValue" Type="String" />
- <asp:ControlParameter ControlID="ddlTesterType" Name="testertype"
- PropertyName="SelectedValue" Type="String" />
- <asp:ControlParameter ControlID="txtBoxLot" Name="lotID" PropertyName="Text"
- Type="String" />
- <asp:ControlParameter ControlID="ddlHandler" Name="handlertype"
- PropertyName="SelectedValue" Type="String" />
- <asp:ControlParameter ControlID="ddlHandlerID" Name="handlerid"
- PropertyName="SelectedValue" Type="String" />
- <asp:ControlParameter ControlID="txtBoxOperatorID" Name="operatorid"
- PropertyName="Text" Type="String" />
- <asp:ControlParameter ControlID="txtBoxStatusCode" Name="statuscode"
- PropertyName="Text" Type="String" />
- <asp:ControlParameter ControlID="txtBoxTechID" Name="techid"
- PropertyName="Text" Type="String" />
- <asp:ControlParameter ControlID="txtBoxDevice" Name="device"
- PropertyName="Text" Type="String" />
- <asp:ControlParameter ControlID="txtBoxDieType" Name="dietype"
- PropertyName="Text" Type="String" />
- <asp:ControlParameter ControlID="ddlShift" Name="shift"
- PropertyName="SelectedValue" Type="String" />
- <asp:Parameter Direction="Output" Name="pCursor" Type="Object" />
- </SelectParameters>
- </asp:ObjectDataSource>
- </div>
- <div>
- <asp:SqlDataSource ID="sqldsDivision" runat="server" ConnectionString="<%$ ConnectionStrings:Camstar %>"
- ProviderName="<%$ ConnectionStrings:Camstar.ProviderName %>" SelectCommand="SELECT DECODE(mxstatusreasoncategoryname,'WAFERSORT','WS','FINALTEST','FT','TAPENREEL','TR',mxstatusreasoncategoryname) DIVISION_TEXT
- FROM a_mxstatusreasoncategory
- ORDER BY DIVISION_TEXT"></asp:SqlDataSource>
- <asp:SqlDataSource ID="sqldsTesterType" runat="server" ConnectionString="<%$ ConnectionStrings:Camstar %>"
- ProviderName="<%$ ConnectionStrings:Camstar.ProviderName %>" SelectCommand="SELECT 'ALL' TESTERTYPE
- ,'%' TESTERVALUE
- FROM DUAL
- UNION ALL
- SELECT *
- FROM
- (
- SELECT DISTINCT r.vendormodel TESTERTYPE
- ,r.vendormodel TESTERVALUE
- FROM resourcedef r
- JOIN a_mxstatusreasoncategory src ON r.mxstatusreasoncategoryid = src.mxstatusreasoncategoryid
- WHERE r.vendormodel IS NOT NULL
- AND DECODE(src.mxstatusreasoncategoryname,'WAFERSORT','WS','FINALTEST','FT','TAPENREEL','TR','NONATE','NONATE') = :division
- AND r.attr_02 IN ('TESTER','NON-ATE')
- ORDER BY TESTERTYPE
- )">
- <SelectParameters>
- <asp:ControlParameter ControlID="ddlDivision" Name="division" PropertyName="SelectedValue" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:SqlDataSource ID="sqldsTesterID" runat="server" ConnectionString="<%$ ConnectionStrings:Camstar %>"
- ProviderName="<%$ ConnectionStrings:Camstar.ProviderName %>" SelectCommand="SELECT 'ALL' AS TESTERID_TEXT
- ,'%' AS TESTERID_VALUE
- FROM DUAL
- UNION ALL
- SELECT r.resourcename TESTERID_TEXT
- ,r.resourcename TESTERID_VALUE
- FROM resourcedef r
- JOIN a_mxstatusreasoncategory src ON r.mxstatusreasoncategoryid = src.mxstatusreasoncategoryid
- WHERE r.attr_06 = 'ACTIVE' AND r.vendormodel = :testerType AND r.resourcename NOT LIKE 'DUMMY%'
- AND DECODE(src.mxstatusreasoncategoryname,'WAFERSORT','WS','FINALTEST','FT','TAPENREEL','TR','NONATE','NONATE') = :division
- ORDER BY TESTERID_TEXT">
- <SelectParameters>
- <asp:ControlParameter ControlID="ddlTesterType" Name="testerType" PropertyName="SelectedValue" />
- <asp:ControlParameter ControlID="ddlDivision" Name="division" PropertyName="SelectedValue" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:SqlDataSource ID="sqldsHType" runat="server"
- ConnectionString="<%$ ConnectionStrings:Camstar %>"
- ProviderName="<%$ ConnectionStrings:Camstar.ProviderName %>" SelectCommand="SELECT 'ALL' HANDLERTYPE
- ,'%' HANDLERVALUE
- FROM DUAL
- UNION ALL
- SELECT *
- FROM
- (
- SELECT DISTINCT r.vendormodel HANDLERTYPE
- ,r.vendormodel HANDLERVALUE
- FROM resourcedef r
- JOIN a_mxstatusreasoncategory src ON r.mxstatusreasoncategoryid = src.mxstatusreasoncategoryid
- WHERE r.vendormodel IS NOT NULL
- AND DECODE(src.mxstatusreasoncategoryname,'WAFERSORT','WS','FINALTEST','FT','TAPENREEL','TR','NONATE','NONATE') = :division
- AND r.attr_02 IN ('PROBER','HANDLER')
- ORDER BY HANDLERTYPE
- )">
- <SelectParameters>
- <asp:ControlParameter ControlID="ddlDivision" Name="division" PropertyName="SelectedValue" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:SqlDataSource ID="sqldsHandlerID" runat="server"
- ConnectionString="<%$ ConnectionStrings:Camstar %>"
- ProviderName="<%$ ConnectionStrings:Camstar.ProviderName %>" SelectCommand="SELECT 'ALL' AS HANDLERID_TEXT
- ,'%' AS HANDLERID_VALUE
- FROM DUAL
- UNION ALL
- SELECT r.resourcename HANDLERID_TEXT
- ,r.resourcename HANDLERID_VALUE
- FROM resourcedef r
- JOIN a_mxstatusreasoncategory src ON r.mxstatusreasoncategoryid = src.mxstatusreasoncategoryid
- WHERE r.vendormodel = :handlerType AND r.resourcename NOT LIKE 'DUMMY%'
- AND DECODE(src.mxstatusreasoncategoryname,'WAFERSORT','WS','FINALTEST','FT','TAPENREEL','TR','NONATE','NONATE') = :division
- ORDER BY HANDLERID_TEXT">
- <SelectParameters>
- <asp:ControlParameter ControlID="ddlHandler" Name="handlerType"
- PropertyName="SelectedValue" />
- <asp:ControlParameter ControlID="ddlDivision" Name="division"
- PropertyName="SelectedValue" />
- </SelectParameters>
- </asp:SqlDataSource>
- </div>
- </asp:Content>
- protected void btnFilter_Click(object sender, EventArgs e)
- {
- try
- {
- reportViewer.Visible = true;
- reportViewer.LocalReport.ReportPath = Server.MapPath("~/Equipment/Reports/EquipmentTimesheet.rdlc");
- var reportParameterCollection = new ReportParameter[14];
- reportParameterCollection[0] = new ReportParameter { Name = "fromdate" };
- reportParameterCollection[0].Values.Add(txtDateFrom.Text);
- reportParameterCollection[0].Visible = true;
- reportParameterCollection[1] = new ReportParameter { Name = "todate" };
- reportParameterCollection[1].Values.Add(txtDateTo.Text);
- reportParameterCollection[1].Visible = true;
- reportParameterCollection[2] = new ReportParameter { Name = "location" };
- reportParameterCollection[2].Values.Add(ddlDivision.Text);
- reportParameterCollection[2].Visible = true;
- reportParameterCollection[3] = new ReportParameter { Name = "equipment" };
- reportParameterCollection[3].Values.Add(ddlTesterID.Text);
- reportParameterCollection[3].Visible = true;
- reportParameterCollection[4] = new ReportParameter { Name = "testertype" };
- reportParameterCollection[4].Values.Add(ddlTesterType.Text);
- reportParameterCollection[4].Visible = true;
- reportParameterCollection[5] = new ReportParameter { Name = "lotID" };
- reportParameterCollection[5].Values.Add(txtBoxLot.Text);
- reportParameterCollection[5].Visible = true;
- reportParameterCollection[6] = new ReportParameter { Name = "handlertype" };
- reportParameterCollection[6].Values.Add(ddlHandler.Text);
- reportParameterCollection[6].Visible = true;
- reportParameterCollection[7] = new ReportParameter { Name = "handlerid" };
- reportParameterCollection[7].Values.Add(ddlHandlerID.Text);
- reportParameterCollection[7].Visible = true;
- reportParameterCollection[8] = new ReportParameter { Name = "operatorid" };
- reportParameterCollection[8].Values.Add(txtBoxOperatorID.Text);
- reportParameterCollection[8].Visible = true;
- reportParameterCollection[9] = new ReportParameter { Name = "statuscode" };
- reportParameterCollection[9].Values.Add(txtBoxStatusCode.Text);
- reportParameterCollection[9].Visible = true;
- reportParameterCollection[10] = new ReportParameter { Name = "techid" };
- reportParameterCollection[10].Values.Add(txtBoxTechID.Text);
- reportParameterCollection[10].Visible = true;
- reportParameterCollection[11] = new ReportParameter { Name = "device" };
- reportParameterCollection[11].Values.Add(txtBoxDevice.Text);
- reportParameterCollection[11].Visible = true;
- reportParameterCollection[12] = new ReportParameter { Name = "dietype" };
- reportParameterCollection[12].Values.Add(txtBoxDieType.Text);
- reportParameterCollection[12].Visible = true;
- reportParameterCollection[13] = new ReportParameter { Name = "shift" };
- reportParameterCollection[13].Values.Add(ddlShift.Text);
- reportParameterCollection[13].Visible = true;
- reportViewer.LocalReport.SetParameters(reportParameterCollection);
- reportViewer.LocalReport.Refresh();
- }
- catch (Exception ex)
- {
- X.MessageBox.Alert("Warning", ex.ToString()).Show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement