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

                            <td> Spray 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: 100%; height: 240px; overflow-y: scroll;" > <br />--%>

       <div style=" width: 99%; overflow-x: scroll; position: relative;  " > <br />
               <div id="griddiv" runat="server" style=" width: 2071px; height:240px; overflow-y: scroll;"><br />
                <asp:GridView ID="gdvWorkArea" runat="server"  HeaderStyle-CssClass="FixedHeader"   BorderColor="#014567" CellPadding="3"   Width="2050px"
                     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="205px" ItemStyle-Width="190px">
                            <HeaderTemplate >
                                <asp:LinkButton ID="LinkButton1"  runat="server" Text="PROJECT/EVENT"  CommandName="Sort" CommandArgument="EVENT_CODE" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate >
                                  <%--<a href='LocateSprayWA_Map.aspx?EVENT_CODE_ID=<%# Eval("EVENT_CODE_ID") %>&nm=<%# Eval("EVENT_CODE") %>' target="_blank">   <asp:Label ID="Label2" runat="server" Text='<%# Bind("EVENT_CODE") %>'></asp:Label> </a>--%>
                                <a href='<%=System.Configuration.ConfigurationManager.AppSettings["VMSWorkLink"]%>?bu=0&ec=<%# Eval("EVENT_CODE_ID") %>&wa=0&yr=0' target="_blank"> <asp:Label ID="Label2s" runat="server" Text='<%# Bind("EVENT_CODE") %>'></asp:Label> </a>
                            </ItemTemplate>
                        </asp:TemplateField>

                         <%--<asp:TemplateField SortExpression="WORK_AREA"   HeaderStyle-Width="101px" ItemStyle-Width="100px">
                            <HeaderTemplate >
                                <asp:LinkButton ID="LinkButton2"  runat="server" Text="SECTION/WA"  CommandName="Sort" CommandArgument="WORK_AREA" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate >
                               <%# Eval("WORK_AREA") %>
                            </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="205px" ItemStyle-Width="190px" >
                            <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="LENGTH"   HeaderStyle-Width="100px" ItemStyle-Width="95px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton14" runat="server" Text="PROD_MILES"  CommandName="Sort" CommandArgument="LENGTH" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("LENGTH") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                         <asp:TemplateField SortExpression="LENGTH"   HeaderStyle-Width="120px" ItemStyle-Width="115px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton43" runat="server" Text="BILLABLE_PROD"  CommandName="Sort" CommandArgument="LENGTH" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("Billable_prod") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField SortExpression="ACTUAL_LENGTH_INITIAL"   HeaderStyle-Width="147px" ItemStyle-Width="135px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton24" runat="server" Text="Worked_Miles_Initial"  CommandName="Sort" CommandArgument="ACTUAL_LENGTH_INITIAL" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("ACTUAL_LENGTH_INITIAL") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField SortExpression="ACTUAL_LENGTH_RETREAT"   HeaderStyle-Width="152px" ItemStyle-Width="140px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton25" runat="server" Text="Worked_Miles_RETREAT"  CommandName="Sort" CommandArgument="ACTUAL_LENGTH_RETREAT" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("ACTUAL_LENGTH_RETREAT") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                         <asp:TemplateField SortExpression="INITIAL_SHAPE_LEN_TOTAL"   HeaderStyle-Width="168px" ItemStyle-Width="150px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton26" runat="server" Text="Total_Assigned_Initial"  CommandName="Sort" CommandArgument="INITIAL_SHAPE_LEN_TOTAL" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("INITIAL_SHAPE_LEN_TOTAL") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                          <asp:TemplateField SortExpression="INITIAL_SHAPE_LEN_BILLABLE"   HeaderStyle-Width="168px" ItemStyle-Width="155px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton27" runat="server" Text="Billable_Assigned_Initial"  CommandName="Sort" CommandArgument="INITIAL_SHAPE_LEN_BILLABLE" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("INITIAL_SHAPE_LEN_BILLABLE") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                         <asp:TemplateField SortExpression="RETREAT_SHAPE_LEN_TOTAL"   HeaderStyle-Width="165px" ItemStyle-Width="155px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton28" runat="server" Text="Total_Assigned_Retreat"  CommandName="Sort" CommandArgument="RETREAT_SHAPE_LEN_TOTAL" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("RETREAT_SHAPE_LEN_TOTAL") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                         <asp:TemplateField SortExpression="RETREAT_SHAPE_LEN_BILLABLE"   HeaderStyle-Width="178px" ItemStyle-Width="160px" >
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton29" runat="server" Text="Billable_Assigned_Retreat"  CommandName="Sort" CommandArgument="RETREAT_SHAPE_LEN_BILLABLE" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("RETREAT_SHAPE_LEN_BILLABLE") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField SortExpression="spray_cycle"   HeaderStyle-Width="90px" ItemStyle-Width="80px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton6" runat="server" Text="SPR_CYCLE"  CommandName="Sort" CommandArgument="spray_cycle" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("spray_cycle") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        
                         <asp:TemplateField SortExpression="spray_year_target"   HeaderStyle-Width="80px" ItemStyle-Width="70px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton7" runat="server" Text="SPR_YEAR"  CommandName="Sort" CommandArgument="spray_year_target" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("spray_year_target") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>

                         <asp:TemplateField SortExpression="future_spray_yr_tgt"   HeaderStyle-Width="65px" ItemStyle-Width="60px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton8" runat="server" Text="FST_YEAR"  CommandName="Sort" CommandArgument="future_spray_yr_tgt" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("future_spray_yr_tgt") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>


                        <asp:TemplateField SortExpression="work_status_description"   HeaderStyle-Width="120px" ItemStyle-Width="120px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton5" runat="server" Text="SPRAYSTATUS"  CommandName="Sort" CommandArgument="work_status_description" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("work_status_description") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                   <%-- <HeaderStyle BackColor="#98C8DE" Font-Bold="True"/>--%>
                    <HeaderStyle BackColor="#98C8DE" Font-Bold="True" Width="2050px" ForeColor="Black" Wrap="true"/>
                    <SelectedRowStyle BackColor="#FFE98F" />
                </asp:GridView>


                   
                 </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>
