<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ForecastAnalysis.aspx.cs" Debug="true" EnableEventValidation="false" Inherits="VMT.ForecastAnalysis" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="resource_gallery/js/ShowHide.js"></script>
    <style type="text/css">
        .auto-style2 {
            width: 100%;
            padding: 3px;
        }
        .auto-style17 {
            width: 1%;
        }
        .auto-style18 {
            width: 210px;

        }
        .auto-style19 {
            width: 27%;
        }
        .auto-style20 {
            width: 31%;
        }
        .auto-style22 {
            width: 19%;
        }
        </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>
            Planning
        </h1>
    </div>
    <div id="SubPageTitle">
        <!-- OPTIONAL SUB PAGE TITLE -->     
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphMainContentPlaceHolder" runat="server">

    <style type="text/css">
        .FixedHeader {
            position: absolute;
            font-weight: bold;
            top:expression(this.parentNode.parentNode.parentNode.scrollTop-1);
        }     
        
        /*.GridViewContainer
        {
            overflow-y: scroll;
           overflow-x: hidden;
        }*/
       
    </style>
    <script type="text/javascript">
       

        
        function MakeStaticHeader(gridId, height, width, headerHeight, isFooter) {
     var tbl = document.getElementById(gridId);
     if (tbl) {
         var DivHR = document.getElementById('DivHeaderRow');
         var DivMC = document.getElementById('DivMainContent');
         var DivFR = document.getElementById('DivFooterRow');

         //*** Set divheaderRow Properties ****
         DivHR.style.height = headerHeight + 'px';
         DivHR.style.width = (parseInt(width) - 16) + 'px';
         DivHR.style.position = 'relative';
         DivHR.style.top = '0px';
         DivHR.style.zIndex = '10';
         DivHR.style.verticalAlign = 'top';

         //*** Set divMainContent Properties ****
         DivMC.style.width = width + 'px';
         DivMC.style.height = height + 'px';
         DivMC.style.position = 'relative';
         DivMC.style.top = -headerHeight + 'px';
         DivMC.style.zIndex = '1';

         //*** Set divFooterRow Properties ****
         DivFR.style.width = (parseInt(width) - 16) + 'px';
         DivFR.style.position = 'relative';
         DivFR.style.top = -headerHeight + 'px';
         DivFR.style.verticalAlign = 'top';
         DivFR.style.paddingtop = '2px';

         if (isFooter) {
             var tblfr = tbl.cloneNode(true);
             tblfr.removeChild(tblfr.getElementsByTagName('tbody')[0]);
             var tblBody = document.createElement('tbody');
             tblfr.style.width = '100%';
             tblfr.cellSpacing = "0";
             tblfr.border = "0px";
             tblfr.rules = "none";
             //*****In the case of Footer Row *******
             tblBody.appendChild(tbl.rows[tbl.rows.length - 1]);
             tblfr.appendChild(tblBody);
             DivFR.appendChild(tblfr);
         }
         //****Copy Header in divHeaderRow****
         DivHR.appendChild(tbl.cloneNode(true));
     }
        }

        function OnScrollDiv(Scrollablediv) {
            document.getElementById('DivHeaderRow').scrollLeft = Scrollablediv.scrollLeft;
            document.getElementById('DivFooterRow').scrollLeft = Scrollablediv.scrollLeft;
        }
    </script>



    <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="Analysis.aspx">Analysis</a> <strong>&#8249;&#8249;</strong> Planning
    </div>   
          
    <div style="text-align:right;">

    </div>

    <div style="text-align:left; width: 100%;">
                           
       <fieldset class="masterform">
       <legend>Select Business Unit and Year</legend>
          <div style=" width: 100%; height:150px; " > 
                                               
            <table class="auto-style2"> 
                <caption>      
                    <tr>  

                    <td class="auto-style22">
                            <asp:RadioButton ID="radBtnCreate" runat="server" AutoPostBack="true" Checked="true" TextAlign="Left" GroupName="radSandBox" 
                                OnCheckedChanged="radBtnCreate_CheckedChanged"  /> Create
                        </td>
                            <td class="auto-style20">
                            <asp:RadioButton ID="radBtnView" runat="server" AutoPostBack="true" Checked="false" TextAlign="Left" GroupName="radSandBox" 
                                OnCheckedChanged="radBtnView_CheckedChanged"/> View/Update
                                <asp:HiddenField ID="hdn_role" runat="server" />
                        </td>
                    </tr>                              
                   <tr>
                    <td class="auto-style22">
                        &nbsp;</td>
                    
                   
                    <td style="width: 15%">
                        &nbsp;</td>
                   </fieldset >

                   
                    <tr>
                        <td class="auto-style22">&nbsp;</td>
                        <td class="auto-style18">
                            &nbsp;</td>
                        <td class="auto-style17">
                            &nbsp;<td class="auto-style20"><strong>SCEG Forecast </strong> </td>
                            <td class="auto-style19">
                                &nbsp;</td>
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style22">Business Unit:</td>
                        <td class="auto-style18">
                            <asp:DropDownList ID="ddl_Bunit" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddl_Bunit_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                        <td class="auto-style17">
                            <td class="auto-style20">Urban Rate $: </td>
                            <td class="auto-style19">
                                <asp:TextBox ID="txtUrbanRate" runat="server" AutoPostBack="True" OnTextChanged="txtUrbanRate_TextChanged" 
                                    Text="" TabIndex="1">  </asp:TextBox>
                            </td>
                        </td>
        </tr>
                    <tr>
                        <td class="auto-style22">Work Year:</td>
                        <td class="auto-style18">
                            <asp:DropDownList ID="ddl_Year" runat="server" AutoPostBack="True" 
                                OnSelectedIndexChanged="ddl_Year_SelectedIndexChanged"  OnDataBound="ddl_Year_DataBound" TabIndex="4">
                            </asp:DropDownList>
                        </td>
                        <td class="auto-style17">
                            <td class="auto-style20">Rural Rate $: </td>
                            <td class="auto-style19">
                                <asp:TextBox ID="txtRuralRate" runat="server" AutoPostBack="True" OnTextChanged="txtRuralRate_TextChanged" 
                                    Text="" TabIndex="2">  </asp:TextBox>
                            </td>
                            <tr>
                                <td class="auto-style22">VMS User:</td>
                                <td class="auto-style18">
                                    <asp:Label ID="lblVmtUser" runat="server" Enabled="false" ></asp:Label>
                                    <asp:DropDownList ID="ddlVmtUser" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlVmtUser_SelectedIndexChanged"  OnDataBound="ddlVmtUser_DataBound" visible="false">
                                    </asp:DropDownList>
                                </td>
                                <td class="auto-style17">
                                    <td class="auto-style20">Climbing Rate $:</td>
                                    <td class="auto-style19">
                                        <asp:TextBox ID="txtClimbRate" runat="server" AutoPostBack="True" OnTextChanged="txtClimbRate_TextChanged" 
                                            Text="" TabIndex="3">  </asp:TextBox>
                                    </td>
                                </td>
                                <tr>
                                    <td class="auto-style22">Description:</td>
                                    <td class="auto-style18">
                                        <asp:TextBox ID="txtSandBoxDesc" runat="server" TabIndex="5"></asp:TextBox>
                                        <asp:DropDownList ID="ddlSandBox" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSandBox_SelectedIndexChanged" Visible="false">
                                        </asp:DropDownList>
                                    </td>
                                    <td class="auto-style17">
                                        <td class="auto-style20">
                                            <asp:Button ID="btnGo" runat="server" CssClass="FormButton" OnClick="btnGo_Click" Text="Go" visible="true" TabIndex="6"/>
                                        </td>
                                        <td class="auto-style19">
                                            <asp:Button ID="btnExportExcel" runat="server" CssClass="FormButton" OnClick="btnExportExcel_Click" Text="Export To Excel" visible="false" />
                                        </td>
                                    </td>
                                </tr>
                                
                            </tr>
                        </td>
                    </tr>
                    </caption>
                    
            </table>                                    
          </div>                  
       </fieldset>
    </div>
                            
    <div style="text-align:left; width: 100%;"   >
                <fieldset class="masterform">
                    <legend>Forecast</legend>
                    <%--<div style="width:100%;border:1px solid #084B8A; ">
                    <table style="background-color: #e8e3c5; overflow-y: scroll;" >
                        <tr>
                            <td style ="width:106px; display:none;">DIST_ID</td>
                            <td style ="width:106px; display:none;">EVENT_CODE_ID</td>
                            <td style ="width:107px;">PROJECT/EVENT</td>
                            <td style ="width:115px;"></td>
                            <td style ="width:65px;">URBAN</td>
                            <td style ="width:50px;">RURAL</td>
                            <td style ="width:50px;">CLIMBING</td>
                            <td style ="width:50px;">COMPANY</td>
                            <td style ="width:90px;">3-UNIT</td>
                            <td style ="width:50px;">FLAT_RATE</td>
                            <td style ="width:50px;">URBAN_RATE</td>
                            <td style ="width:50px;">RURAL_RATE</td>
                            <td style ="width:50px;">CLIMBING_RATE</td>
                            
                        </tr>
                    </table>
                    </div>--%>
                      <div style=" width: 99%; overflow-x: scroll; height: 240px; overflow-y: scroll;  position: relative;" > <br />
                   <div style="width: 1992px; " > <br />
                   <%-- <div id="dvScroll" style=" width: 100%; height:200px; overflow-y: scroll;">--%>
                                   
                        <asp:GridView ID="gdv_Forescast_Analysis" runat="server" BorderColor="#014567" CellPadding="3"  HeaderStyle-CssClass="FixedHeaderlong"                            
                        ShowFooter="True" OnRowDataBound="gdv_Forescast_Analysis_RowDataBound" AutoGenerateColumns="False"
                            OnSorting="gdv_Forescast_Analysis_Sorting" AllowSorting="True" emptydatatext="No data in the data source."  Width="1974px"
                        > 

                         <%--   <HeaderStyle CssClass="FixedHeader" />--%>
                            <AlternatingRowStyle BackColor="#E9EFF2" /> 
                            <Columns>

                                <asp:TemplateField  SortExpression="DIST_ID" HeaderStyle-Width="106px" ItemStyle-Width="105px" Visible="false">  
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton1"  runat="server" Text="DIST_ID"  CommandName="Sort" CommandArgument="DIST_ID" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblDIST_ID" runat="server"
                                            Text='<%# Bind("DIST_ID") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                

                                <asp:TemplateField  SortExpression="EVENT_CODE_ID" HeaderStyle-Width="106px" ItemStyle-Width="105px" Visible="false"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton3"  runat="server" Text="EVENT_CODE_ID"  CommandName="Sort" CommandArgument="EVENT_CODE_ID" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblEVENT_CODE_ID" runat="server"
                                            Text='<%# Bind("EVENT_CODE_ID") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField  SortExpression="EVENT_CODE" HeaderStyle-Width="216px" ItemStyle-Width="215px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton3"  runat="server" Text="PROJECT/EVENT"  CommandName="Sort" CommandArgument="EVENT_CODE" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="EVENT_CODE" runat="server"
                                            Text='<%# Bind("EVENT_CODE") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>
                                        
                                <asp:TemplateField  SortExpression="URBAN" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton6"  runat="server" Text="URBAN"  CommandName="Sort" CommandArgument="URBAN" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblURBAN" runat="server"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "URBAN", "{0:##0.0000}")%>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                 <asp:TemplateField  SortExpression="RURAL" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton5"  runat="server" Text="RURAL"  CommandName="Sort" CommandArgument="RURAL" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblRURAL" runat="server"
                                           Text='<%# DataBinder.Eval(Container.DataItem, "RURAL", "{0:##0.0000}")%>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField  SortExpression="CLIMBING" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton4"  runat="server" Text="CLIMBING"  CommandName="Sort" CommandArgument="CLIMBING" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblCLIMBING" runat="server"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "CLIMBING", "{0:##0.0000}")%>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                <%-- <asp:TemplateField  SortExpression="FLAT" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton7"  runat="server" Text="FLAT"  CommandName="Sort" CommandArgument="FLAT" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="FLAT" runat="server"
                                            Text='<%# Bind("FLAT") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>--%>
                                        
                                

                                <asp:TemplateField  SortExpression="COMPANY" HeaderStyle-Width="25px" ItemStyle-Width="25px" Visible="false"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton13"  runat="server" Text="COMPANY"  CommandName="Sort" CommandArgument="COMPANY" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblCOMPANY" runat="server"
                                            Text='<%# Bind("COMPANY") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>                 
                                           
                                <asp:TemplateField  SortExpression="COMPANY" HeaderStyle-Width="100px" ItemStyle-Width="100px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton20"  runat="server" Text="COMPANY"  CommandName="Sort" CommandArgument="COMPANY" ForeColor="Black"/>
                                    </HeaderTemplate>  
                                                                       
                                    <ItemTemplate>
                                        <asp:DropDownList runat="server" ID="ddlCompany" OnSelectedIndexChanged="ddlCompany_SelectedIndexChanged" Width="100px"
                                          AutoPostBack="True" ></asp:DropDownList>  
                                        </ItemTemplate>
                                </asp:TemplateField> 

                                <asp:TemplateField HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton19"  runat="server" Text="3-UNIT"   ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk3Unit" runat="server" AutoPostBack="True" OnCheckedChanged="chk3Unit_CheckedChanged" Enabled="false"
                                            Checked='<%# Eval("THREE_UNIT").ToString() == "Y"  %>'></asp:CheckBox>
                                        </ItemTemplate>
                                </asp:TemplateField>        
                                                  
                                <asp:TemplateField  SortExpression="FLAT_RATE" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton14"  runat="server" Text="FLAT_RATE"  CommandName="Sort" CommandArgument="FLAT_RATE" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtFLAT_RATE" runat="server" AutoPostBack="True" width="70px" OnTextChanged="txtFLAT_RATE_TextChanged" 
                                            Text='<%# DataBinder.Eval(Container.DataItem, "FLAT_RATE", "{0:##0.00}")%>'></asp:TextBox>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                                                  
                                            
                                <asp:TemplateField  SortExpression="URBAN_RATE" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton9"  runat="server" Text="URBAN_RATE"  CommandName="Sort" CommandArgument="URBAN_RATE" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtURBAN_RATE" runat="server" AutoPostBack="True" width="70px" OnTextChanged="txtURBAN_RATE_TextChanged" Enabled="false"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "URBAN_RATE", "{0:##0.00}")%>'></asp:TextBox>
                                        </ItemTemplate>
                                </asp:TemplateField>
                                        
                                <asp:TemplateField  SortExpression="RURAL_RATE" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton10"  runat="server" Text="RURAL_RATE"  CommandName="Sort" CommandArgument="RURAL_RATE" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtRURAL_RATE" runat="server" AutoPostBack="True" width="70px" OnTextChanged="txtRURAL_RATE_TextChanged" Enabled="false"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "RURAL_RATE", "{0:##0.00}")%>'></asp:TextBox>
                                        </ItemTemplate>
                                </asp:TemplateField>
                                          

                                <asp:TemplateField  SortExpression="CLIMBING_RATE" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton12"  runat="server" Text="CLIMBING_RATE"  CommandName="Sort" CommandArgument="CLIMBING_RATE" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtCLIMBING_RATE" runat="server" AutoPostBack="True" width="70px" OnTextChanged="txtCLIMBING_RATE_TextChanged" Enabled="false"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "CLIMBING_RATE", "{0:##0.00}")%>'></asp:TextBox>
                                        </ItemTemplate>
                                </asp:TemplateField>                                            
                                                 
                                <asp:TemplateField  SortExpression="BID_TOTAL" HeaderStyle-Width="80px" ItemStyle-Width="80px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton15"  width="80px" runat="server" Text="BID_TOTAL"  CommandName="Sort" CommandArgument="BID_TOTAL" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtBID_TOTAL" runat="server" AutoPostBack="True" width="70px" OnTextChanged="txtBID_TOTAL_TextChanged"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "BID_TOTAL", "{0:##0.00}")%>'></asp:TextBox>
                                        </ItemTemplate>
                                </asp:TemplateField>
                                
                                <asp:TemplateField  SortExpression="TOTAL_MILES" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton17"  runat="server" Text="TOTAL_MILES"  CommandName="Sort" CommandArgument="TOTAL_MILES" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblTOTAL_MILES" runat="server"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "TOTAL_MILES", "{0:##0.0000}")%>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField  SortExpression="SCEG_FORECAST" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton8"  runat="server" Text="SCEG_FORECAST"  CommandName="Sort" CommandArgument="SCEG_forecast" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblSCEG_forecast" runat="server"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "SCEG_FORECAST", "{0:##0.00}")%>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>
                                        
                                <asp:TemplateField  SortExpression="VARIANCE" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton16"  runat="server" Text="VARIANCE"  CommandName="Sort" CommandArgument="VARIANCE" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblVARIANCE" runat="server"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "VARIANCE", "{0:##0.00}")%>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField  SortExpression="NEW_Bid" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton18"  runat="server" Text="NEW_Bid"  CommandName="Sort" CommandArgument="NEW_Bid" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblNEW_Bid" runat="server"
                                            Text='<%# DataBinder.Eval(Container.DataItem, "NEW_Bid", "{0:##0.00}")%>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField  SortExpression="STATUS" HeaderStyle-Width="106px" ItemStyle-Width="105px" Visible="false" > 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton18"  runat="server" Text="STATUS"  CommandName="Sort" CommandArgument="STATUS" ForeColor="Black" />
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblSTATUS" runat="server"
                                            Text='<%# Bind("STATUS") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>

                                <asp:TemplateField  SortExpression="DISTRICT" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton1"  runat="server" Text="DISTRICT"  CommandName="Sort" CommandArgument="DISTRICT" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="lblDISTRICT" runat="server"
                                            Text='<%# Bind("DISTRICT") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>
                                        
                                <asp:TemplateField  SortExpression="BUSINESS_UNIT" HeaderStyle-Width="106px" ItemStyle-Width="105px"> 
                                    <HeaderTemplate >
                                        <asp:LinkButton ID="LinkButton2"  runat="server" Text="BUSINESS_UNIT"  CommandName="Sort" CommandArgument="BUSINESS_UNIT" ForeColor="Black"/>
                                    </HeaderTemplate>                           
                                    <ItemTemplate>
                                        <asp:Label ID="BUSINESS_UNIT" runat="server"
                                            Text='<%# Bind("BUSINESS_UNIT") %>'></asp:Label>
                                        </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>

                      
                             <HeaderStyle BackColor="#98C8DE" Font-Bold="True" Width="1972px"/>
                            <SelectedRowStyle BackColor="#FFE98F" />
                        </asp:GridView>

                 </div>
            </div>
        
                </fieldset>
       
    </div>
          <input type="hidden" id="div_position" name="div_position" />


    <div style="text-align:left; width: 100%;">
        <table class="auto-style2">
            <tr>
            <td style=" width: 70%;">   
                <fieldset class="masterform">
                    <legend>Summary</legend>
                    <div style="width: 100%; height: 185px; overflow-y: scroll;" > 
                    <asp:GridView ID="gdvSummary" runat="server"  BorderColor="#014567" CellPadding="3"  Width="96%"
                            OnRowDataBound="gdvSummary_RowDataBound"
                            AutoGenerateColumns="true" AllowPaging="false" emptydatatext="No data in the data source." >
                        <AlternatingRowStyle BackColor="#E9EFF2" />
                        
                        <HeaderStyle BackColor="#98C8DE" Font-Bold="True"/>
                        <SelectedRowStyle BackColor="#FFE98F" />
                    </asp:GridView>
                               
                </fieldset>
            </td>

                        
            <td style="vertical-align:top; width: 30%;">
                <div style="text-align:left;" runat="server" id="divCreateSandBox">
                <fieldset class="masterform">
                <legend>Create SandBox</legend>
                    <table>
                    <tr>          
                        <td style="width: 15%"></td> 
                        <td style="width: 15%"> <asp:Button ID="btnSubmitSandBox" runat="server" Text="Save" OnClick="btnSubmitSandBox_Click"
                            enabled="false"  CssClass="FormButton"/>
                        </td> 
                        <td style="width: 15%"> <asp:Button ID="btnPostSandBox" runat="server" Text="Save and Post" OnClick="btnPostSandBox_Click"
                            enabled="false"  CssClass="FormButton"/>
                        </td>
                    </tr>
                </table>
                </fieldset> 
            </div>      
            </td>    
                                        
        </tr>

        </table>
        </div>

    </ContentTemplate>
   </asp:UpdatePanel>
</asp:Content>

<%--Enabled='<%# Eval("STATUS").ToString() == "S"  %>'--%>