<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="TrimIssuesView.aspx.cs" Inherits="VMT.TrimIssuesView" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphJavaScriptContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitleContentPlaceHolder" runat="server">
    <div id="CssPageTitle">
        <h1>
            Project Trim Issues
        </h1>
    </div>
    <div id="SubPageTitle">
        <!-- OPTIONAL SUB PAGE TITLE -->
     
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphMainContentPlaceHolder" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
      <asp:UpdatePanel ID="UpdatePanel2" runat="server">
          <ContentTemplate>
               <div id="loaderdiv">
    <asp:updateprogress id="UpdateProgress1" runat="server" associatedupdatepanelid="UpdatePanel2" dynamiclayout="true">
                        <progresstemplate>
                           <img src="resource_gallery/graphics/loader.gif" class="ajax-loader">
                        </progresstemplate>
                    </asp:updateprogress>

                    </div>
              <div style="text-align:right;"><a href="default.aspx">Home</a> <strong>&#8249;&#8249;</strong> <a href="CurrentYTD.aspx">Current</a> <strong>&#8249;&#8249;</strong> Project Trim Issues</div>
                        <div >
             <fieldset class="masterform">
                <legend>Project Status</legend>
                 <%-- <fieldset class="masterform">--%>
                    <%--</fieldset>--%>
                  
                <div style=" width: 100%; height:320px; ">
                    
                   

                    <table>
                       
                        <tr>
                            <td> Business Unit:
                                <asp:DropDownList ID="ddlBUnit" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBUnit_SelectedIndexChanged" OnDataBound="ddlBUnit_DataBound">
                                </asp:DropDownList>
                            </td>

                            
                            
                            <td> Project/Event:
                                <asp:DropDownList ID="ddlEventCode" runat="server" AutoPostBack="true" OnDataBound="ddlEventCode_DataBound" OnSelectedIndexChanged="ddlEventCode_SelectedIndexChanged" >  
                                </asp:DropDownList>
                             <td> Section/WA:
                                <asp:DropDownList ID="ddlWorkArea" runat="server" AutoPostBack="true" OnDataBound="ddlWorkArea_DataBound" OnSelectedIndexChanged="ddlWorkArea_SelectedIndexChanged" >
                                </asp:DropDownList>
                            </td>
                                <td> Foreman:
                                <asp:DropDownList ID="ddlForeman" runat="server" AutoPostBack="true"   Width="153px">
                                </asp:DropDownList>
                            <td/>
                             <td> <asp:Button ID="btnGo" runat="server" Text="Go" CssClass="FormButton" OnClick="btnGo_Click"/></td> 
                        </tr>
                    </table>
                    <br />
                     <div style=" width: 99%; overflow-x: scroll; position: relative;" > <br />
               <div style="width: 1655px; height: 240px; overflow-y: scroll;" > <br />
                <asp:GridView ID="gdvWorkArea" runat="server"  HeaderStyle-CssClass="FixedHeaderlong"   BorderColor="#014567" CellPadding="3"  
                     AutoGenerateColumns="False"  emptydatatext="No data in the data source." OnSorting="gdvWorkArea_Sorting"
                      AllowSorting="True">
                    <AlternatingRowStyle BackColor="#E9EFF2" />
                    <Columns>
                        <asp:TemplateField SortExpression="EVENT_CODE"  HeaderStyle-Width="210px" ItemStyle-Width="211px">
                            <HeaderTemplate >
                                <asp:LinkButton ID="LinkButton1"  runat="server" Text="PROJECT/EVENT"  CommandName="Sort" CommandArgument="EVENT_CODE" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate >
                                  <%--<a href='MapView_PS.aspx?EVENT_CODE_ID=<%# Eval("EVENT_CODE_ID") %>&nm=<%# Eval("EVENT_CODE") %>' target="_blank">--%> 
                                <a href='<%=System.Configuration.ConfigurationManager.AppSettings["VMSWorkLink"]%>?bu=0&ec=<%# Eval("EVENT_CODE_ID") %>&wa=0&yr=0' target="_blank">   <asp:Label ID="Label2" runat="server" Text='<%# Bind("EVENT_CODE") %>'></asp:Label> </a>
                           </ItemTemplate>
                        </asp:TemplateField>

                         <asp:TemplateField SortExpression="WORK_AREA"    HeaderStyle-Width="90px" ItemStyle-Width="91px" >
                            <HeaderTemplate >
                                <asp:LinkButton ID="LinkButton2"  runat="server" Text="SECTION/WA"  CommandName="Sort" CommandArgument="WORK_AREA" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate  >
                                <%--<a href='MapView_PS.aspx?EVENT_CODE_ID=<%# Eval("EVENT_CODE_ID") %>&WORK_AREA_ID=<%# Eval("WORK_AREA_ID") %>'  target="_blank">--%> 
                                <a href='<%=System.Configuration.ConfigurationManager.AppSettings["VMSWorkLink"]%>?bu=0&ec=<%# Eval("EVENT_CODE_ID") %>&wa=<%# Eval("WORK_AREA_ID") %>&yr=0' target="_blank">  <asp:Label ID="Label1" runat="server" Text='<%# Bind("WORK_AREA") %>'></asp:Label></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="inspectionname"   HeaderStyle-Width="160px" ItemStyle-Width="160px" ItemStyle-HorizontalAlign="left">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton3" runat="server" Text="INSPECTION_NAME"  CommandName="Sort" CommandArgument="inspectionname" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                               <%--  <%# Eval("inspectionname")--%>
                                 <a href='TrimIssue_Map.aspx?INSPECTION_NAME=<%# Eval("sequencer") %>&nm=<%# Eval("inspectionname") %>&EVENT_CODE_ID=<%# Eval("EVENT_CODE_ID") %>' target="_blank">   <asp:Label ID="Label2" runat="server" Text='<%# Bind("inspectionname") %>'></asp:Label> </a>
                            </ItemTemplate>

                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="FOREMAN"    HeaderStyle-Width="100px" ItemStyle-Width="100px" >
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton4" runat="server" Text="FOREMAN"  CommandName="Sort" CommandArgument="FOREMAN" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("FOREMAN") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField SortExpression="COMPANY"   HeaderStyle-Width="100px" ItemStyle-Width="99px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton5" runat="server" Text="COMPANY"  CommandName="Sort" CommandArgument="COMPANY" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("COMPANY") %> 
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="ISSUETYPE"   HeaderStyle-Width="130px" ItemStyle-Width="130px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton6" runat="server" Text="ISSUETYPE"  CommandName="Sort" CommandArgument="ISSUETYPE" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("ISSUETYPE") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                       <asp:TemplateField SortExpression="ISSUESUBTYPE"   HeaderStyle-Width="100px" ItemStyle-Width="101px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton7" runat="server" Text="ISSUESUBTYPE"  CommandName="Sort" CommandArgument="ISSUESUBTYPE" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("ISSUESUBTYPE") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="ISSUESTATUS"   HeaderStyle-Width="90px" ItemStyle-Width="91px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton8" runat="server" Text="ISSUESTATUS"  CommandName="Sort" CommandArgument="ISSUESTATUS" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("ISSUESTATUS") %>
                            </ItemTemplate>                           
                        </asp:TemplateField>
                         <asp:TemplateField SortExpression="inspectiontype"   HeaderStyle-Width="120px" ItemStyle-Width="121px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton9" runat="server" Text="INSPECTIONTYPE"  CommandName="Sort" CommandArgument="inspectiontype" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("inspectiontype") %>
                            </ItemTemplate>                           
                        </asp:TemplateField>

                        <%--<asp:TemplateField SortExpression="flag_id"   HeaderStyle-Width="90px" ItemStyle-Width="91px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton21" runat="server" Text="FLAGID"  CommandName="Sort" CommandArgument="flag_id" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("flag_id") %>
                            </ItemTemplate>                           
                        </asp:TemplateField>--%>

                        <asp:TemplateField SortExpression="sequencer"   HeaderStyle-Width="100px" ItemStyle-Width="101px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton22" runat="server" Text="SEQUENCER"  CommandName="Sort" CommandArgument="sequencer" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("sequencer") %>
                            </ItemTemplate>                           
                        </asp:TemplateField>
                         

                         <asp:TemplateField SortExpression="creation_date"   HeaderStyle-Width="90px" ItemStyle-Width="91px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton11" runat="server" Text="CREATE_DATE"  CommandName="Sort" CommandArgument="creation_date" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("creation_date") %>
                            </ItemTemplate>
                        </asp:TemplateField>


                        <asp:TemplateField SortExpression="inspectionduedate"   HeaderStyle-Width="90px" ItemStyle-Width="90px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton12" runat="server" Text="DUEDATE"  CommandName="Sort" CommandArgument="inspectionduedate" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("inspectionduedate") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="last_updated_user_id"   HeaderStyle-Width="75px" ItemStyle-Width="75px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton13" runat="server" Text="LASTUPDBY"  CommandName="Sort" CommandArgument="last_updated_user_id" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("last_updated_user_id") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#98C8DE" Font-Bold="True" Width="1641px"/>
                    <SelectedRowStyle BackColor="#FFE98F" />
                </asp:GridView>
                    <td> </td> 
                </div>

               </div>
            </div>
       </fieldset>
        </div>
        <fieldset class="masterform">
            <div style=" width: 89%; height:42px; ">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnExportExcel" runat="server" CssClass="FormButton" OnClick="btnExportExcel_Click" Visible="false" Text="Export To Excel" /></td>
                </tr>
            </table>
            </div>
        </fieldset>
      </ContentTemplate>
     </asp:UpdatePanel>
</asp:Content>
