<%@ page title="" language="C#" masterpagefile="~/Pages/Common/MasterPages/MainMasterPage_new.master" autoeventwireup="true" validaterequest="false" inherits="Pages_Assessment_CCESubjectActivity, App_Web_kphyvkas" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/UserControls/GridViewPager/GridViewPager.ascx" TagName="GridViewPager" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/Common/ScreenGroup/ScreenGroup.ascx" TagName="ScreenGroupControl"
    TagPrefix="ScreenGroup" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
    <asp:UpdatePanel ID="OTQueueListingUpdatePanel" runat="server">
        <ContentTemplate>


            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="leftUlMenu">
                                        <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl" ScreenGroupId="220"
                                            Visible="true" runat="server" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box" id="SearchDiv" runat="server" visible="True">
                        <div class="himsBoxHeader card-head">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="leftdiv">
                                </div>
                                <div class="himsBoxTitle">
                                    <div class="headerText">
                                        <header>
                                            <i class="fas fa-book"></i>
                                            <asp:Label ID="Label3" runat="server" Text="Subject Activity"></asp:Label>
                                        </header>
                                    </div>
                                    <div class="fRight mt-27">
                                        <asp:Button ID="AddNewButtonID" runat="server" OnClick="AddNewButton_Click" SkinID="0" CssClass="btn btn-add fas" Text="&#xf067; Add" />
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="SearchPanel" runat="Server">
                                <div class="contentHolder">
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchClassLabel" Text="Class" runat="server"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="SearchClassDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="SearchClassDropDownList_SelectedIndexChanged"
                                                onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="SearchSubjectLabel" Text="Subject" runat="server"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="SearchSubjectDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="controlLabelWidth"></div>
                                    <div class="alignCenter col-md-12 ptop5">
                                        <asp:Button ID="SearchButton" runat="server" Text="&#xf002; Search" OnClick="SearchButton_Click"
                                            SkinID="0" CssClass="btn-search btn fas" />
                                        <asp:Button ID="ResetButton" runat="server" Text="&#xf0e2; Reset" OnClick="ResetButton_Click"
                                            SkinID="0" CssClass="btn-reset btn fas" />
                                    </div>

                                    <div id="Div2" class="himssuHeader1WireBox col-md-12 ptop5" runat="server">
                                        <div id="GradeSetMasterListDetailDiv" runat="server" visible="false">

                                            <div id="GradeSetMasterListDiv" visible="false" runat="server">
                                                <div class="leftdiv">
                                                </div>
                                                <div class="himsBoxTitle">

                                                    <div class="fRight">
                                                        <uc1:GridViewPager ID="CSGroupMasterGridViewPager" runat="server" ParentGridView="CSGroupMasterGridView"
                                                            OnFirstRecordClick="CSGroupMasterGridViewPager_FirstRecordClick" OnLastRecordClick="CSGroupMasterGridViewPager_LastRecordClick"
                                                            OnNextRecordClick="CSGroupMasterGridViewPager_NextRecordClick" OnPrevRecordClick="CSGroupMasterGridViewPager_PrevRecordClick"
                                                            OnTextBoxValueChange="CSGroupMasterGridViewPager_TextBoxValueChange" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="himsBoxContent">
                                                <div id="Div5" runat="server" visible="false" class="table-responsive pTop15">
                                                    <asp:GridView ID="CSGroupMasterGridView" runat="server" AutoGenerateColumns="False"
                                                        AllowPaging="true" PageSize="20" SkinID="" PagerSettings-Visible="false" EmptyDataText="No Records Found !!"
                                                        DataKeyNames="Id,ClassSubjectId,ClassID" OnRowDataBound="CSGroupMasterGridView_RowDataBound" OnPageIndexChanging="CSGroupMasterGridView_PageIndexChanging"
                                                        CssClass="table table-striped table-bordered table-hover">
                                                        <Columns>

                                                            <asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true"
                                                                HeaderText="">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="SelectLinkButton" runat="server" CommandName="Select" Text="Select"
                                                                        CausesValidation="false" OnClick="SelectLinkButton_Click"></asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Id" HeaderText="Id" ItemStyle-Width="7%" Visible="false" />
                                                            <asp:BoundField DataField="ClassName" HeaderText="Class" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="SubjectName" HeaderText="Subject" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="Code" HeaderText="Code" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="Number" HeaderText="Number" ItemStyle-Width="15%" HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:BoundField DataField="Title" HeaderText="Name" ItemStyle-Width="30%" HeaderStyle-HorizontalAlign="Left" />

                                                            <asp:BoundField DataField="OrderIndex" HeaderText="OrderIndex" ItemStyle-Width="20%" HeaderStyle-HorizontalAlign="Left" />
                                                            <asp:TemplateField HeaderText="InActive" ItemStyle-Width="10%" SortExpression="IsObsolete"
                                                                HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="ObsoleteLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsObsolete").ToString().ToUpper()=="TRUE"?"Y":"N" %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                        </Columns>
                                                    </asp:GridView>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>

                    <div class="himssuHeader1WireBox card card-box" id="DetailDiv" runat="server" visible="false">
                        <div class="himsBoxHeader card-head ">
                            <div class="leftdiv">
                            </div>
                            <div class="himsBoxTitle">
                                <div class="headerText">
                                    <header>
                                        <i class="fas fa-tasks"></i>
                                        <asp:Label ID="Label1" runat="server" Text="Subject Activity Master"></asp:Label>
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27 pagination display-flex ">
                                
                                            <div id="NumberOfRecordDiv" class="display-flex"  runat="server" visible="true">
                                                <asp:LinkButton AlternateText="First page" ToolTip="First page" ID="FirstRecordImageButton"
                                                    runat="server" CommandName="Page" CommandArgument="First"
                                                    OnClick="FirstRecordImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-fast-backward"></i>
                                                </asp:LinkButton>
                                                <asp:LinkButton AlternateText="Previous page" ToolTip="Previous page" ID="PreviousImageButton"
                                                    runat="server" CommandName="Page" CommandArgument="Prev"
                                                    OnClick="PreviousImageButton_Click" CssClass="btn btn-default gridviewpagerbuttonpadding">
                                                    <i class="fa fa-play fa-rotate-180"></i>

                                                </asp:LinkButton>
                                               
                                                <asp:Label ID="LabelPage" runat="server" Text="Record " AssociatedControlID="ReCordNumber" />
                                                &nbsp; <asp:Label ID="ReCordNumber" Font-Bold="true" SkinID="Dummy" runat="server"></asp:Label>
                                                &nbsp; <asp:Label ID="ofLabel" Text="of" runat="server" />
                                                &nbsp; <asp:Label ID="TotalRecord" runat="server" />
                                                &nbsp;
                                                <asp:LinkButton AlternateText="Next page" ToolTip="Next page" ID="NextImageButtom"
                                                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Next"
                                                    OnClick="NextImageButton_Click">
                                                     <i class="fa fa-play"></i>
                                                </asp:LinkButton>

                                                <asp:LinkButton AlternateText="Last page" ToolTip="Last page" ID="LastRecordImageButton"
                                                    runat="server" CssClass="btn btn-default gridviewpagerbuttonpadding" CommandName="Page" CommandArgument="Last"
                                                    OnClick="LastRecordImageButton_Click">
                                                      <i class="fa fa-fast-forward"></i>
                                                </asp:LinkButton>
                                                &nbsp;  &nbsp; &nbsp;
                                            </div>
                                        
                                            <asp:Button ID="BackButton" runat="Server" OnClick="BackButton_Click" SkinID="0" CssClass="btn btn-back fas" Text="&#xf30a;  back" />
                                       
                            </div>
                        </div>


                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ClassLabel" Text="Class" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="ClassDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" AutoPostBack="true" OnSelectedIndexChanged="ClassDropDownList_SelectedIndexChanged"
                                                onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="ClassSubjectLabel" Text="Subject" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="ClassSubjectDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()"
                                                onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>


                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="CSGroupCodeLabel" Text="Code" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="CSGroupCodeTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="CustomWidthTextBox"
                                                onmouseenter="showHideTooltip()" MaxLength="20" Width="150px"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="NumberLabel" Text="Number" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="NumberTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="CustomWidthTextBox"
                                                Onkeydown="return isNumberKey(event)" onmouseenter="showHideTooltip()" MaxLength="20" Width="150px"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="CSGroupTitleLabel" Text="Name" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="CSGroupTitleTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="CustomWidthTextBox"
                                                onmouseenter="showHideTooltip()" MaxLength="200"></asp:TextBox>
                                        </div>
                                    </div>


                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="OrderIndexLabel" Text="OrderIndex" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:TextBox ID="OrderIndexTextBox" runat="server" onmouseleave="showHideTooltip()" SkinID="CustomWidthTextBox"
                                                Onkeydown="return isNumberKey(event)" onmouseenter="showHideTooltip()" MaxLength="5" Width="150px"></asp:TextBox>
                                        </div>
                                    </div>

                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="GradeSetLabel" Text="Grade Set" runat="server" SkinID="MandatoryLabel"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5">
                                            <asp:DropDownList runat="server" ID="GradeSetDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="controlLabelWidth">
                                            <asp:Label ID="CopyFromLabel" Text="Copy From" runat="server"></asp:Label>
                                        </div>
                                        <div class="fLeft pRight5  display-flex ">
                                            <asp:DropDownList runat="server" ID="CopyFromDropDownList" SkinID="CustomWidthDropDownList"
                                                CssClass="form-control" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()">
                                            </asp:DropDownList>&nbsp;&nbsp;
                                            <asp:Button ID="CopyButton" runat="server" Text="&#xf24d; Copy" OnClick="CopyButton_Click" SkinID="0" CssClass="btn btn-assign fas" />
                                        </div>
                                    </div>
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="fLeft pRight5">
                                            <asp:CheckBox ID="ObsoleteCheckBox" runat="server" />
                                            <asp:Label ID="ObsoleteLabel" runat="server" Text="InActive" AssociatedControlID="ObsoleteCheckBox"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="outerBox11 pTop5 col-md-3">
                                    <div class="controlLabelWidth">
                                        <asp:Label ID="RemarkLabel" runat="server" Text="Remark"></asp:Label>
                                    </div>
                                    <div class="fLeft pRight5">
                                        <asp:TextBox ID="RemarkTextBox" onmouseleave="showHideTooltip()" onmouseenter="showHideTooltip()"
                                            SkinID="MultiLineTextBox" runat="server" TextMode="MultiLine"> </asp:TextBox>
                                    </div>
                                </div> 
                                    <div class="outerBox pTop5 col-md-3">
                                        <div class="fLeft pRight5">
                                            <asp:HiddenField ID="DetailHiddenField" runat="server" />
                                        </div>
                                    </div>
                                    <asp:HiddenField ID="DeleteHiddenField" runat="server" />
                                    <asp:HiddenField ID="SubActivityIdHiddenField" runat="server" />

                                    <div id="Div1" class="himssuHeader6WireBox col-md-12 pTop5" runat="server" visible="true">
                                        <div class="himsBoxHeader card-head inner" id="GridViewPagerDiv" runat="server" visible="True">
                                            <div class="leftdiv">
                                            </div>

                                            <div class="himsBoxTitle">
                                                <%--<div class="headerText">
                                                    <header>
                                                        <asp:Label ID="GridViewLabel" Text="Subject Sub Activity"
                                                            runat="server" />
                                                    </header>
                                                </div>--%>
                                                <div class="pull-right display-flex">
                                                    <asp:DropDownList ID="AddRowsToGridDropDownList" runat="server" CssClass="form-control" Width="100px" AutoPostBack="false">
                                                        <asp:ListItem Text="1" Value="0" Selected="True"></asp:ListItem>
                                                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                        <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                                        <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                                    </asp:DropDownList>&nbsp;&nbsp;
                                                    <asp:Button ID="AddButton" SkinID="0" runat="server" CssClass="btn btn-add mt-10 fas" OnClick="AddButton_Click"
                                                        Text="&#xf067; Add" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="himsBoxContent table-responsive">
                                            <asp:GridView ID="CSMasterGridView" runat="server" AutoGenerateColumns="False"
                                                EmptyDataText="No Records Found !!" OnRowDataBound="CSMasterGridView_OnRowDataBound"
                                                AllowPaging="false" ShowHeader="True"
                                                DataKeyNames="SubActivityId,Index,SubjectActivityId"
                                                CssClass="table table-striped table-bordered table-hover">
                                                <Columns>
                                                    <asp:BoundField DataField="SubActivityId" HeaderText="Sub Activity Id" Visible="false"></asp:BoundField>
                                                    <asp:BoundField DataField="Index" HeaderText="Index" Visible="false"></asp:BoundField>
                                                    <asp:BoundField DataField="SubjectActivityId" HeaderText="Subject Activity Id" Visible="false"></asp:BoundField>
                                                    <asp:TemplateField HeaderText="Number" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="CSNumberTextBox" runat="server" SkinID="CustomWidthTextBox" MaxLength="20"
                                                                onblur="javascript:return fnValidateDecimal(this,10,2)" onKeypress="javascript:return MaskDecimal(event,10,2)"
                                                                Text='<%# DataBinder.Eval(Container.DataItem,"SubActivityNumber").ToString()=="0"? "":Eval("SubActivityNumber") %>'> 
                                                            </asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Code" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="10%">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="CSCodeTextBox" runat="server" SkinID="CustomWidthTextBox"  MaxLength="100" Text='<%#Eval("SubActivityCode") %>'></asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Name" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left"  ItemStyle-Width="70%">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="CSTitleTextBox" runat="server" SkinID="CustomWidthTextBox" MaxLength="200" Text='<%# Bind("SubActivityTitle") %>'></asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="OrderIndex" ItemStyle-Wrap="true" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="CSOrderIndexTextBox" runat="server" 
                                                                MaxLength="13" onblur="javascript:return fnValidateDecimal(this,10,2)" onKeypress="javascript:return MaskDecimal(event,10,2)"
                                                                Text='<%# DataBinder.Eval(Container.DataItem,"SubActivityOrderIndex").ToString()=="0"? "":Eval("SubActivityOrderIndex") %>'></asp:TextBox>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ShowHeader="true" HeaderText="Delete" HeaderStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <asp:ImageButton SkinID="DeleteImage" ID="DeleteImageButton" runat="server" OnClick="DeleteImageButton_Click" 
                                                                ToolTip="Delete" ImageUrl="../../../Images/icons/icon_delete.gif" />
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                    </asp:TemplateField>

                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                            <%--  </div>--%>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <%--HEDP History Ends Here--%>
                </div>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
 <%--   <script data-main="../../../JavaScript/rjs/encrypt/ccesubject-activity-encrypt" src="../../../JavaScript/rjs/require.js"></script>--%>
      <script data-main='<%=ResolveUrl("~/JavaScript/rjs/ccesubject-activity")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>
    <script type="text/javascript">
        //add for mantis : 0040910
        function RedirectToMigration(MigrationUrl) {
            var newTab = window.open(MigrationUrl, '_blank');
            window.location.href = '../../../Pages/BaseFramework/MyDashBoard.aspx';
        }
    </script>
</asp:Content>
