<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ProjectInspectors.aspx.cs" Inherits="VMT.ProjectInspectors" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style2 {
            width: 100%;
            padding: 3px;
        }
        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphJavaScriptContentPlaceHolder" runat="server">
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitleContentPlaceHolder" runat="server">
     <div id="CssPageTitle">
        <h1>
            Assign Inspector to Trim Project/Event</h1>
    </div>
    <div id="SubPageTitle">
        <!-- OPTIONAL SUB PAGE TITLE -->
       <%-- <asp:HiddenField ID="hdfBU" runat="server" />
        <asp:HiddenField ID="hdfYR" runat="server" />
        <asp:HiddenField ID="hdfEC" runat="server" />--%>
    </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;"><strong>&#8249;&#8249;</strong> <a href="Assignments.aspx">Back</a></div>--%>
                        <div style="text-align:right;"><a href="default.aspx">Home</a> <strong>&#8249;&#8249;</strong> <a href="Administration.aspx">Administration</a> <strong>&#8249;&#8249;</strong> Assign Inspector to Trim Project/Event</div>
 <div style="text-align:left; width: 100%;">
                            <fieldset class="masterform">
                                <legend>Select Employee and Project/Event</legend>
                                <div style=" width: 100%; height:70px; ">
                                    <table class="auto-style2">
                                        <tr>
                                            <td style="width: 22%">Business Unit</td>
                                            <td style="width: 22%"><strong>Project/Event</strong></td>
                                            
                                            <td style="width: 22%"><strong>Company</strong></td>
                                            <td style="width: 22%"><strong>Employees</strong></td>
                                            <td style="width: 12%">&nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:DropDownList ID="ddl_Bunit" runat="server" AutoPostBack="True"  OnDataBound="ddl_Bunit_DataBound" OnSelectedIndexChanged="ddl_Bunit_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddl_eventcode" runat="server" AutoPostBack="True"  OnDataBound="ddl_eventcode_DataBound" OnSelectedIndexChanged="ddl_eventcode_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddl_Company" runat="server" AutoPostBack="True" OnDataBound="ddl_Company_DataBound" OnSelectedIndexChanged="ddl_Company_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddl_Employee" runat="server" AutoPostBack="True" OnDataBound="ddl_Employee_DataBound" OnSelectedIndexChanged="ddl_Employee_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:Button ID="btnGo" runat="server" CssClass="FormButton" OnClick="btnGo_Click" Text="Go" />
                                                <asp:HiddenField ID="hdn_role" runat="server" />
                                            </td>
                                        </tr>
                                        </table>
                                     </div>
                            </fieldset></div>
                                                <div style="text-align:left; width: 100%;">
                            <fieldset class="masterform">
                                <legend>Project Inspector Assignment</legend>
                              
                                <div style=" width: 100%; height:200px; overflow-y: scroll;"><br />
                                    <asp:GridView ID="gdv_EC_CompEmp" runat="server" HeaderStyle-CssClass="FixedHeader"  BorderColor="#014567" CellPadding="3"  AutoGenerateColumns="False" OnRowDeleting="gdv_EC_CompEmp_RowDeleting" OnRowCreated="gdv_EC_CompEmp_RowCreated">

                                        <AlternatingRowStyle BackColor="#E9EFF2" />
                                        <Columns>
                                            
                                            <asp:TemplateField HeaderText="PROJECT/EVENT" HeaderStyle-Width="226px" ItemStyle-Width="231px">
                                                
                                                <ItemTemplate>
                                                    <a href='MapView_PS.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>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="EMPLOYEE"  HeaderStyle-Width="171px" ItemStyle-Width="171px">
                                               
                                                <ItemTemplate>
                                                     <asp:Label ID="Label1" runat="server" Text='<%# Bind("EMPLOYEE") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                           <asp:TemplateField HeaderText="NETWORK ID"  HeaderStyle-Width="101px" ItemStyle-Width="101px">
                                               
                                                <ItemTemplate>
                                                      <asp:Label ID="Label4" runat="server" Text='<%# Bind("NETWORK_ID") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="EMAIL"  HeaderStyle-Width="241px" ItemStyle-Width="241px">
                                               
                                                <ItemTemplate>
                                                     
                                                   
                                                       <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("email") %>' NavigateUrl='<%# string.Format("mailto:{0}", Eval("email"))%>' />
    
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField ShowHeader="False" HeaderText="DELETE" HeaderStyle-Width="100px" ItemStyle-Width="100px">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"><img src="resource_gallery/graphics/icon_delete.png" /></asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("BUSINESS_UNIT_ID") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_BUSINESS_UNIT_ID" runat="server" Text='<%# Bind("BUSINESS_UNIT_ID") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("EVENT_CODE_ID") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                               <asp:Label ID="lbl_EVENT_CODE_ID" runat="server" Text='<%# Bind("EVENT_CODE_ID") %>'></asp:Label> 
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("employee_id") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_EMPLOYEE_ID" runat="server" Text='<%# Bind("employee_id") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <HeaderStyle BackColor="#98C8DE" Font-Bold="True" />
                                        <SelectedRowStyle BackColor="#FFE98F" />
                                    </asp:GridView>


                                </div>
                                
                                   
                            </fieldset></div>
                        
<div style="text-align:left; width: 100%;">
                            <fieldset class="masterform">
                                <legend>Assign Inspector to Section/WA</legend>
                                <div style=" width: 100%; height:140px; ">

                                    <table class="auto-style2">
                                       
                                        <tr>
                                            <td style="width: 20%"><strong>Project/Event</strong></td>
                                            <td style="width: 8%">&nbsp;</td>
                                            <td style="width: 20%"><strong>Selected Project/Event</strong></td>
                                            <td style="width: 4%">&nbsp;</td>
                                            <td style="width: 20%"><strong>Employees</strong></td>
                                            <td style="width: 8%">&nbsp;</td>
                                            <td style="width: 20%"><strong>Selected Employees</strong></td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20%">
                                                <asp:ListBox ID="lst_WorkArea" runat="server" Rows="6"></asp:ListBox>
                                            </td>
                                            <td style="width: 8%; text-align: center;"> <asp:Button ID="btn_addWA" runat="server" CssClass="FormButton" Text="&gt;&gt;" OnClick="btn_addWA_Click" />
                                                <br />
                                                <br />
                                                <asp:Button ID="btn_remWA" runat="server" CssClass="FormButton" Text="&lt;&lt;" OnClick="btn_remWA_Click" /></td>
                                            <td style="width: 20%">
                                                <asp:ListBox ID="lst_selWorkArea" runat="server" Rows="6"></asp:ListBox>
                                            </td>
                                            <td style="width: 4%">&nbsp;</td>
                                            <td style="width: 20%">
                                                <asp:ListBox ID="lst_Employee" runat="server" Rows="6"></asp:ListBox>
                                            </td>
                                            <td style="width: 8%; text-align: center;">  <asp:Button ID="btn_addEmp" runat="server" CssClass="FormButton" Text="&gt;&gt;" OnClick="btn_addEmp_Click" />
                                                <br />
                                                <br />
                                                <asp:Button ID="btn_remEmp" runat="server" CssClass="FormButton" Text="&lt;&lt;" OnClick="btn_remEmp_Click" /></td>
                                            <td style="width: 20%">
                                                <asp:ListBox ID="lst_selEmployee" runat="server" Rows="6"></asp:ListBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 20%">&nbsp;</td>
                                            <td style="width: 8%">&nbsp;</td>
                                            <td style="width: 20%">&nbsp;</td>
                                            <td style="width: 4%">&nbsp;</td>
                                            <td style="width: 20%">
                                                <asp:Button ID="btn_expExcel" runat="server" CssClass="FormButton" OnClick="btn_expExcel_Click" Text="Export to Excel" />
                                            </td>
                                            <td style="width: 8%">&nbsp;</td>
                                            <td style="width: 20%"><asp:Button ID="btn_add1" runat="server" CssClass="FormButton" Text="Apply" OnClick="btn_add1_Click" /></td>
                                        </tr>
                                        </table>
                                    
                                </div>
                            </fieldset></div>
<div style="text-align:left; width: 100%;">
                            </div>
                        <div style="text-align:left; width: 100%;">
                            </div>
</ContentTemplate>
            </asp:UpdatePanel>
</asp:Content>
