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

                            <td> Year:
                                <asp:DropDownList ID="ddlYear" runat="server" OnSelectedIndexChanged="ddlYear_SelectedIndexChanged" AutoPostBack="true" OnDataBound="ddlYear_DataBound" Width="100px">
                                </asp:DropDownList>
                            <td/>

                            <td> Project/Event:
                                <asp:DropDownList ID="ddlEventCode" runat="server" OnSelectedIndexChanged="ddlEventCode_SelectedIndexChanged" AutoPostBack="true" OnDataBound="ddlEventCode_DataBound">  
                                </asp:DropDownList>
                            </td>

                            <td> Section/WA:
                                <asp:DropDownList ID="ddlWorkArea" runat="server" OnSelectedIndexChanged="ddlWorkArea_SelectedIndexChanged" AutoPostBack="true" OnDataBound="ddlWorkArea_DataBound">
                                </asp:DropDownList>
                            </td>
                               <td>
                                   Company:
                                    <asp:DropDownList ID="ddlCompany" runat="server"  AutoPostBack="true" OnDataBound="ddlCompany_DataBound" OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged" >
                                </asp:DropDownList>
                               </td> 
                        </tr>
                    </table>
                    <br />
               <div style=" width: 100%; height: 240px; overflow-y: scroll;" > <br />
                <asp:GridView ID="gdvBidProcess" runat="server" HeaderStyle-CssClass="FixedHeader" BorderColor="#014567" CellPadding="3" 
                     AutoGenerateColumns="False"  emptydatatext="No data in the data source." 
                     OnSorting="gdvBidProcess_Sorting" AllowSorting="True">
                    <AlternatingRowStyle BackColor="#E9EFF2" />
                    <Columns>
                         <asp:TemplateField SortExpression="event_code" HeaderStyle-Width="221px" ItemStyle-Width="220px">
                            <HeaderTemplate >
                                <asp:LinkButton ID="LinkButton1"  runat="server" Text="EVENT CODE"  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_description" HeaderStyle-Width="101px" ItemStyle-Width="100px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton2" runat="server" Text="SECTION/WA"  CommandName="Sort" CommandArgument="work_area_description" 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_description") %>'></asp:Label></a>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField SortExpression="company_name"  HeaderStyle-Width="221px" ItemStyle-Width="220px">
                            <HeaderTemplate>                                      
                                <asp:LinkButton  ID="LinkButton3" runat="server" Text="COMPANY"  CommandName="Sort" CommandArgument="company_name" ForeColor="Black"/>                       
                            </HeaderTemplate >
                            <ItemTemplate>
                                <%# Eval("company_name") %>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField  SortExpression="rate_type_name" HeaderStyle-Width="151px" ItemStyle-Width="150px">
                            <HeaderTemplate>
                                <asp:LinkButton  ID="LinkButton4" runat="server" Text="RATE TYPE"  CommandName="Sort" CommandArgument="rate_type_name" ForeColor="Black"/>
                            </HeaderTemplate>
                            <ItemTemplate>
                                 <%--<%# Eval("rate_type_name") %>--%>
                                 <a href='TreeRemoval_Map.aspx?INSPECTION_NAME=<%# Eval("objectid") %>&nm=<%# Eval("rate_type_name") %>&EVENT_CODE_ID=<%# Eval("EVENT_CODE_ID") %>' target="_blank">   <asp:Label ID="Label2" runat="server" Text='<%# Bind("rate_type_name") %>'></asp:Label> </a>
                            </ItemTemplate>
                        </asp:TemplateField>

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

                    </Columns>
                    <HeaderStyle BackColor="#98C8DE" Font-Bold="True"/>
                    <SelectedRowStyle BackColor="#FFE98F" />
                </asp:GridView>
                    <td> </td> 
                </div>

               
            </div>
       </fieldset>
        </div>

                <div style="text-align:left; width: 100%;">
                        <fieldset class="masterform">
                            <legend>Tree Removal</legend>
                            <div style=" width: 100%; height:40px; overflow-y: scroll;">
                            <table>
                                <tr>
                                        <td>
                                            <asp:Button ID="btnExportExcel" runat="server" CssClass="FormButton" Visible="false" OnClick="btnExportExcel_Click" Text="Export To Excel" />
                                    </td> 
                                </tr>
                            </table>
                            </div>
                        </fieldset>
                </div>  
        </ContentTemplate>
     </asp:UpdatePanel>
</asp:Content>
