<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="WorkAreaView.aspx.cs" Inherits="VMT.WorkAreaView" %>
<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 Status
        </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 Status</div>
                        <div >
             <fieldset class="masterform">
                <legend>Project Status</legend> 
                <div style=" width: 100%; height:320px; ">
                    <table>
                        <tr>
                            <td> Business Unit:
                                <asp:DropDownList ID="ddlBUnit" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBUnit_SelectedIndexChanged">
                                </asp:DropDownList>
                            </td>

                            <td> Work Year:
                                <asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlYear_SelectedIndexChanged" OnDataBound="ddlYear_DataBound">
                                </asp:DropDownList>
                            <td/>
                            <td>
                                Status:
                                <asp:DropDownList ID="ddlBidStatus" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlBidStatus_SelectedIndexChanged" OnDataBound="ddlBidStatus_DataBound"></asp:DropDownList>
                            </td>
                            <td> Project/Event:
                                <asp:DropDownList ID="ddlEventCode" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlEventCode_SelectedIndexChanged" OnDataBound="ddlEventCode_DataBound">  
                                </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: 1566px; 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="160px" ItemStyle-Width="160px">
                            <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="120px" ItemStyle-Width="120px" >
                            <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") %>&nm=<%# Eval("WORK_AREA") %>'  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="work_area_description">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton3" runat="server" Text="WORK DESC"  CommandName="Sort" CommandArgument="work_area_description" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("work_area_description") %>
                            </ItemTemplate>

                        </asp:TemplateField>--%>
                        <asp:TemplateField SortExpression="project_description"   HeaderStyle-Width="140px" ItemStyle-Width="140px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton4" runat="server" Text="PROJECT DESC"  CommandName="Sort" CommandArgument="project_description" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("project_description") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="URBAN"   HeaderStyle-Width="70px" ItemStyle-Width="70px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton14" runat="server" Text="URBAN"  CommandName="Sort" CommandArgument="URBAN" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("URBAN") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="RURAL"   HeaderStyle-Width="70px" ItemStyle-Width="70px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton14" runat="server" Text="RURAL"  CommandName="Sort" CommandArgument="RURAL" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("RURAL") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="CLIMBING"   HeaderStyle-Width="80px" ItemStyle-Width="80px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton3" runat="server" Text="CLIMBING"  CommandName="Sort" CommandArgument="CLIMBING" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("CLIMBING") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="LENGTH"   HeaderStyle-Width="60px" ItemStyle-Width="60px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton14" runat="server" Text="MILES"  CommandName="Sort" CommandArgument="LENGTH" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("LENGTH") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="BILLABLE_LENGTH"   HeaderStyle-Width="90px" ItemStyle-Width="90px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton15" runat="server" Text="BILLABLE"  CommandName="Sort" CommandArgument="BILLABLE_LENGTH" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("BILLABLE_LENGTH") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                       <asp:TemplateField SortExpression="NONBILLABLE_LENGTH"   HeaderStyle-Width="110px" ItemStyle-Width="110px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton16" runat="server" Text="NONBILLABLE"  CommandName="Sort" CommandArgument="NONBILLABLE_LENGTH" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("NONBILLABLE_LENGTH") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="trim_cycle"   HeaderStyle-Width="90px" ItemStyle-Width="90px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton6" runat="server" Text="CYCLE"  CommandName="Sort" CommandArgument="trim_cycle" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("trim_cycle") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                         <asp:TemplateField SortExpression="trim_date"   HeaderStyle-Width="120px" ItemStyle-Width="120px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton6" runat="server" Text="TRIMDATE"  CommandName="Sort" CommandArgument="trim_date" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("trim_date") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                         <asp:TemplateField SortExpression="trim_year_target"   HeaderStyle-Width="80px" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="left">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton6" runat="server" Text="WORKYEAR"  CommandName="Sort" CommandArgument="trim_year_target" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("trim_year_target") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>

                         <asp:TemplateField SortExpression="future_trim_yr_tgt"   HeaderStyle-Width="45px" ItemStyle-Width="45px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton6" runat="server" Text="FTYT"  CommandName="Sort" CommandArgument="future_trim_yr_tgt" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("future_trim_yr_tgt") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>


                        <asp:TemplateField SortExpression="work_status_description"   HeaderStyle-Width="145px" ItemStyle-Width="145px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton5" runat="server" Text="STATUS"  CommandName="Sort" CommandArgument="work_status_description" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("work_status_description") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField SortExpression="Change_reason"   HeaderStyle-Width="185px" ItemStyle-Width="185px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton5" runat="server" Text="CHANGE REASON"  CommandName="Sort" CommandArgument="Change_reason" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("Change_reason") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="Company"   HeaderStyle-Width="185px" ItemStyle-Width="185px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton53" runat="server" Text="COMPANY"  CommandName="Sort" CommandArgument="Company" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("Company") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle BackColor="#98C8DE" Font-Bold="True" Width="1546px"/>
                    <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>
