<%@ Page Title="" Language="C#" AutoEventWireup="false" MasterPageFile="~/SiteMaster.Master" CodeBehind="EntityTreeScoreConfig.aspx.cs" Inherits="MKInsight.Online.RRAM2.Methodologies.EntityTreeScoreConfig" %>

<%@ Register Src="../UIControls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="FormulaGrammerControl.ascx" TagName="FormulaGrammerControl" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc3" %>
<%@ Register Assembly="UIWebControls" Namespace="UIWebControls" TagPrefix="cc4" %>
<%@ Register Src="~/UIControls/Interface/TextBoxEx.ascx" TagPrefix="uc1" TagName="TextBoxEx" %>
<%@ Register Src="~/UIControls/Interface/TextBoxDecimalEx.ascx" TagPrefix="uc1" TagName="TextBoxDecimalEx" %>
<%@ Register Src="~/UIControls/Interface/ColorBoxEx.ascx" TagPrefix="uc1" TagName="ColorBoxEx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>
    <script type="text/javascript" src="../scripts/jquery/jquery.box-min.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/jquery/jqbox.css" />


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">
    <uc1:Header ID="u_H" runat="server" />
    <asp:UpdatePanel ID="up" runat="server">
        <ContentTemplate>

            <uc3:MessageBox ID="u_M" runat="server" />


            <asp:Panel ID="tbP" runat="server" CssClass="w-bar">
                <asp:LinkButton runat="server" ID="tbl_SaveChanges" CssClass="w-button" Style="background: url(../images/save32.png); ">
                    <asp:Label ID="tbl_SaveChangesLabel" runat="server"></asp:Label>

                </asp:LinkButton>

                <asp:LinkButton runat="server" ID="tbl_TestCalc" CssClass="w-button" Style="background: url(../images/calc32.png); " OnClientClick="$.colorbox({ transition: 'none', width: '95%', height: '90%', iframe: true,href:'TestConfiguration.aspx' });  return false;">
                    <asp:Label ID="tbl_TestCalcLabel" runat="server"></asp:Label>

                </asp:LinkButton>


            </asp:Panel>

            <asp:Panel ID="tb_Config" runat="server" CssClass="w-bar">

                <asp:LinkButton runat="server" ID="tbl_Formulas" CssClass="w-button" Style="background: url(../images/formula32.png); ">
                    <asp:Label ID="tbl_FormulasLabel" runat="server"></asp:Label>

                </asp:LinkButton>

                <asp:LinkButton runat="server" ID="tbl_Labels" CssClass="w-button" Style="background: url(../images/colorLabels32.png); ">
                    <asp:Label ID="tbl_LabelsLabel" runat="server"></asp:Label>

                </asp:LinkButton>

            </asp:Panel>

            <asp:MultiView ID="mv" runat="server">
                <asp:View ID="v_f" runat="server">
                    <table>
                        <tr>
                            <td style="vertical-align: top; width: 215px">
                                <asp:Label ID="lbl_AssessmentRows" runat="server"></asp:Label>


                            </td>

                            <td style="vertical-align: top; width: 215px">
                                <asp:Label ID="lbl_Options" runat="server"></asp:Label>
                            </td>

                            <td style="vertical-align: top;">

                                <asp:Label ID="lbl_Formula" runat="server"></asp:Label>

                            </td>

                        </tr>

                        <tr>
                            <td style="vertical-align: top; width: 215px">
                                <asp:ListBox ID="lst_AssessmentRows" runat="server" AutoPostBack="True" Height="300px" Width="200px"></asp:ListBox>
                                <td style="vertical-align: top;">
                                    <asp:ListBox ID="lst_Options" runat="server" Height="300px" Width="200px"></asp:ListBox>
                                </td>
                            </td>
                            <td style="vertical-align: top;">
                                <table>
                                    <tr>
                                        <td style="vertical-align: top;">
                                            <asp:TextBox ID="txt_Formula" runat="server" AutoPostBack="True" Height="71px" TextMode="MultiLine" Width="393px"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:ImageButton ID="btn_Formula" runat="server" ImageUrl="../images/sum24.png" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="vertical-align: top;">
                                            <hr class="ee" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>

                                            <asp:Label ID="lbl_FormulaEntities" runat="server"></asp:Label>

                                        </td>
                                        <td>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td style="vertical-align: top;">
                                            <asp:TextBox ID="txt_FormulaEntities" runat="server" AutoPostBack="True" Height="71px" TextMode="MultiLine" Width="393px"></asp:TextBox>
                                        </td>
                                        <td style="vertical-align: top;">
                                            <asp:ImageButton ID="btn_FormulaEntities" runat="server" ImageUrl="../images/sum24.png" />
                                        </td>
                                    </tr>
                                </table>
                                <asp:Panel ID="pn_Formula" runat="server" Visible="false">
                                    <uc2:FormulaGrammerControl ID="u_Formula" runat="server" />
                                </asp:Panel>

                            </td>

                        </tr>

                    </table>

                    <table>

                        <tr>
                            <td>
                                <asp:CheckBox ID="chk_IncludeWeigting" runat="server" />
                            </td>

                            <td>&nbsp;</td>

                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lbl_ParentScoreSetting" runat="server"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="drp_ParentChildSetting" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </asp:View>

                <asp:View ID="v_l" runat="server">

                    <div>
                        <asp:Button ID="btn_NewLabel" runat="server" />
                    </div>
                    <table>
                        <tr>
                            <td style="vertical-align: top;">
                                <table>


                                    <tr>
                                        <td>
                                            <asp:CheckBox ID="chk_UnboundedLower" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:CheckBox ID="chk_UnboundedUpper" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="vertical-align: top;">
                                            <cc4:MKGridView ID="dg_Labels" runat="server" AllowPaging="false" AllowSorting="false"
                                                AutoGenerateColumns="False" BorderStyle="None" CellPadding="3" DataKeyNames="ID"
                                                Width="95%">
                                                <AlternatingRowStyle CssClass="alternatingrowstyle" />
                                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                                <HeaderStyle CssClass="headerstyle" Font-Bold="True" HorizontalAlign="Left" Wrap="False" />
                                                <PagerStyle HorizontalAlign="Left" />

                                                <Columns>
                                                    <asp:TemplateField HeaderStyle-Width="0">
                                                        <ItemTemplate>
                                                            <asp:HiddenField ID="hdID" runat="server" Value='<%#Eval("ID")%>' />
                                                        </ItemTemplate>
                                                    </asp:TemplateField>

                                                    <asp:CommandField HeaderText="Select" ShowSelectButton="True" />

                                                    <asp:BoundField DataField="Name" HeaderText="Name" />
                                                    <asp:BoundField DataField="Lower" HeaderText="FromValue" />
                                                    <asp:BoundField DataField="Upper" HeaderText="ToValue" />
                                                    <asp:BoundField DataField="colour" HeaderText="Colour" />

                                                </Columns>

                                                <SelectedRowStyle BackColor="#D6E8FF" />
                                            </cc4:MKGridView>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <asp:Panel ID="pn_C" runat="server" Visible="false">
                                    <table>
                                        <tr>
                                            <td>
                                                <uc1:TextBoxEx runat="server" ID="u_Name" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <uc1:TextBoxDecimalEx runat="server" ID="u_Lower" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <uc1:TextBoxDecimalEx runat="server" ID="u_Upper" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <uc1:ColorBoxEx runat="server" ID="u_Color" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btn_AddLable" runat="server" Text="Add" Font-Bold="true" />
                                                <asp:Button ID="btn_UpdateLabel" runat="server" Text="Update" Font-Bold="true" />
                                                <asp:Button ID="btn_CancelLabel" runat="server" Text="Cancel" />
                                                <span class="tab"></span>
                                                <asp:Button ID="btn_DeleteLabel" runat="server" Text="Delete" ForeColor="Red" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>

                    </table>


                </asp:View>

            </asp:MultiView>

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