<%@ page language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" inherits="Pages_BaseFramework_Security_DivisionPermission, App_Web_mfuq2den" uiculture="auto" meta:resourcekey="PageResource1" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="~/UserControls/AutoComplete/AutoCompleteControl.ascx" TagName="AutoCompleteControl"  TagPrefix="acc" %>
<%@ Register Src="../../../UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"  TagPrefix="ScreenGroup" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="MainUpdatePanel" runat="server">
        <ContentTemplate>
            <div id="divContentPage">
                <!-- ContentPlaceHolder Box Starts -->
                <div style="width: 100%; padding: 2px; margin: 2px">
                    <table width="100%" border="0" style="vertical-align: top; margin-top: -1px; border-collapse: collapse;" cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="dashBoardLeftCont" valign="top">
                                <div class="himssuHeader3WireBox">
                                    <%-- <div class="himsBoxHeader">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <asp:Label runat="server" ID="ScreenGroupNameLabel"></asp:Label>
                                            </div>
                                        </div>
                                    </div>--%>
                                    <table width="0px" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td>
                                                <div class="himsBoxContent">
                                                    <div class="leftUlMenu">
                                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="122"
                                                            Visible="true" runat="server" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                            <td style="vertical-align: top;" width="100%" class="whiteboxpaddingleft">
                                <div class="himssuHeader5WireBox whitebox">
                                    <div class="himsBoxHeader note note1 box box-danger">
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxTitle">
                                            <div class="headerText">
                                                <asp:Label ID="Label4" runat="server" Text="Assign Division Permission"></asp:Label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="himsBoxContent">
                                        <div class="contentHolder">
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="OrganizationLabel" Text="Organization" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="OrganizationDropDownList" runat="server" onmouseleave="showHideTooltip()"
                                                        onmouseenter="showHideTooltip()" AutoPostBack="true" SkinID="CustomWidthDropDownList"
                                                        Width="154px" OnSelectedIndexChanged="OrganizationDropDownList_OnSelectedIndexChanged">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="RoleLabel" runat="server" Text="Role" meta:resourcekey="RoleLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <asp:DropDownList ID="RoleDropDownList" AutoPostBack="True" DataTextField="Title"
                                                        TabIndex="4" DataValueField="ID" runat="server" OnSelectedIndexChanged="RoleDropDownList_SelectedIndexChanged"
                                                        onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()" SkinID="CustomWidthDropdownList"
                                                        Width="154px" meta:resourcekey="RoleDropDownListResource2">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                            <div class="outerBox pTop5">
                                                <div class="controlLabelWidth">
                                                    <asp:Label ID="UserLabel" runat="server" Text="User" SkinID="MandatoryLabel" meta:resourcekey="RoleLabelResource1"></asp:Label>
                                                </div>
                                                <div class="fLeft pRight5">
                                                    <acc:AutoCompleteControl ID="UserTextBox" runat="Server" MinimumPrefixLength="1"
                                                        Width="150px" ContextKey="Security.DivisionPermission" AutoPostBack="true" DisplayLoadingStatus="true"
                                                        FirstRowSelected="false" MaxLength="20" ValidateOnTextChanged="true" OnTextChanged="UserTextBox_TextChanged" />
                                                </div>
                                            </div>
                                            <br />
                                            <div class="spacer">
                                                <img src="../../../Images/spacer.gif" />
                                            </div>
                                            <div class="himssuHeader7WireBox box-body box-solid gridviewfont" id="PatientRelationDiv" runat="server">
                                                <div class="himsBoxHeader">
                                                    <div class="leftdiv">
                                                    </div>
                                                    <div class="himsBoxTitle" style="width: 99%">
                                                        <%--<div class="headerText">
                                                            <div class="fLeft">
                                                                <asp:Label ID="GridViewLabel" Text="List" runat="server" meta:resourcekey="GridViewLabelResource1" />
                                                            </div>
                                                        </div>--%>
                                                        <%-- <div align="right" class="fRight" style="margin-top: -3px;">
                                                            <uc1:GridViewPager ID="TaskGridViewPager" runat="server" OnFirstRecordClick="TaskGridViewPager_FirstRecordClick"
                                                                OnLastRecordClick="TaskGridViewPager_LastRecordClick" OnNextRecordClick="TaskGridViewPager_NextRecordClick"
                                                                OnPrevRecordClick="TaskGridViewPager_PrevRecordClick" OnTextBoxValueChange="TaskGridViewPager_TextBoxValueChange" />
                                                        </div>--%>
                                                    </div>
                                                </div>

                                                <div class="himsBoxContent">
                                                    <asp:GridView ID="TasksGridView" AutoGenerateColumns="False" EmptyDataText="No Records available"
                                                        Width="100%" runat="server" CssClass="table table-striped table-bordered"
                                                        AllowPaging="False" meta:resourcekey="TasksGridViewResource1" OnRowDataBound="TasksGridView_RowDataBound">
                                                        <%-- <PagerSettings Visible="False" />
                                                        <PagerTemplate>
                                                            <div class="gridHeader">
                                                                <div class="gridHeaderText fLeft">
                                                                </div>
                                                                <div class="fRight">
                                                                </div>
                                                            </div>
                                                        </PagerTemplate>--%>
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%"
                                                                ItemStyle-Wrap="true">
                                                                <HeaderTemplate>
                                                                    <itemstyle horizontalalign="Center" />
                                                                    <itemtemplate>
                                                        <asp:CheckBox ID="HeaderSelectCheckBox" runat="server" Enabled="true"   AutoPostBack="true"
                                                            Visible="true" OnCheckedChanged="HeaderSelectCheckBox_CheckedChanged" ></asp:CheckBox>

                                                </itemtemplate>
                                                                </HeaderTemplate>
                                                                <ItemStyle HorizontalAlign="Center" />
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="SelectCheckBox" AutoPostBack="true" runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField Visible="false" HeaderText="DPDivisionId" ItemStyle-Width="5%"
                                                                SortExpression="DPDivisionId" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="DPDivisionIdLabel" CssClass="boxEllips" ToolTip='<%# Bind("DPDivisionId") %>'
                                                                        runat="server" Text='<%# Bind("DPDivisionId") %>' Width="200px"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField Visible="false" HeaderText="DivisionId" ItemStyle-Width="5%" SortExpression="DivisionId"
                                                                ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="DivisionIdLabel" CssClass="boxEllips" ToolTip='<%# Bind("DivisionId") %>'
                                                                        runat="server" Text='<%# Bind("DivisionId") %>' Width="200px"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Department" ItemStyle-Width="10%" SortExpression="Department"
                                                                ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="DepartmentLabel" CssClass="boxEllips" ToolTip='<%# Bind("Department") %>'
                                                                        runat="server" Text='<%# Bind("Department") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Class" ItemStyle-Width="15%" SortExpression="Class"
                                                                ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="ClassLabel" CssClass="boxEllips" ToolTip='<%# Bind("Class") %>' runat="server"
                                                                        Text='<%# Bind("Class") %>' Width="200px"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Division" ItemStyle-Width="10%" SortExpression="Division"
                                                                ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="DivisionLabel" CssClass="boxEllips" ToolTip='<%# Bind("Division") %>'
                                                                        runat="server" Text='<%# Bind("Division") %>' Width="200px"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>
                    <%--HEDP History Ends Here--%>
                </div>
            </div>
            <div class="spacer">
                <img src="../../../Images/spacer.gif" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--    <script data-main="../../../JavaScript/rjs/encrypt/division-permission-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/division-permission")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
</asp:Content>