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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ 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="AssignTaskListSearchUpdatePanel" runat="server">
        <ContentTemplate>
            <div id="divContentPage" class="divcontentpagemargin">

                <div class="dashBoardLeftCont" runat="server" id="ScreenGroupTableId">
                    <div class="himssuHeader3WireBox">
                        <table>
                            <tr>
                                <td>
                                    <div class="himsBoxContent">
                                        <div class="leftUlMenu">
                                            <ScreenGroup:ScreenGroupControl EnableViewState="true" ID="ScreenGroupControl1" ScreenGroupId="114"
                                                Visible="true" runat="server" />
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="whiteboxpaddingleft row">
                    <div class="himssuHeader1WireBox card card-box ">
                        <div class="himsBoxHeader card-head" id="Div4" runat="server" visible="True">

                            <div class="himsBoxTitle">
                                <div class="headerText fLeft">
                                    <header>
                                        <i class="fas fa-list-ul"></i>
                                        <asp:Label ID="Label4" Text="View Task" runat="server" />
                                    </header>
                                </div>
                            </div>
                            <div class="fRight mt-27">
                                <div class="fRight">
                                    <asp:Button ID="AssignTaskButton" runat="server" CssClass="btn btn-assign" OnClick="AssignTaskButton_Click" Text="AssignTask" SkinID="0" />
                                </div>
                                <div class="outerBox pTop5 fRight" style="margin-top: -3px">

                                    <asp:DropDownList ID="SearchStatusDropDownList" Width="150px" runat="server"
                                        SkinID="CustomWidthDropDownList" CssClass="form-control" AutoPostBack="true" OnSelectedIndexChanged="SearchStatusDropDownList_OnSelectedIndexChanged">
                                        <asp:ListItem Text="Pending" Value="0"></asp:ListItem>
                                        <asp:ListItem Text="Completed" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="Closed" Value="2"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>

                            </div>
                        </div>
                        <div class="himsBoxContent card-body">
                            <asp:Panel ID="DetailPanel" runat="Server">
                                <div class="contentHolder">
                                    <div class="himssuHeader6WireBox col-md-12">
                                        <div class="himsBoxHeader card-head inner" id="AssignTaskToMeGridViewPagerDiv" runat="server" visible="true" style="height: 60px">
                                            <div class="himsBoxTitle">
                                                <div class="gridHeaderText">
                                                    <header>
                                                        <asp:Label ID="Label1" Text="Task Assigned To Me" runat="server" />
                                                    </header>
                                                </div>
                                                <div class="fRight">
                                                    <uc1:GridViewPager ID="AssignTaskToMeGridViewPager" ParentGridView="AssignTaskToMeGridView"
                                                        runat="server" OnFirstRecordClick="AssignTaskToMeGridViewPager_FirstRecordClick"
                                                        OnLastRecordClick="AssignTaskToMeGridViewPager_LastRecordClick" OnNextRecordClick="AssignTaskToMeGridViewPager_NextRecordClick"
                                                        OnPrevRecordClick="AssignTaskToMeGridViewPager_PrevRecordClick" OnTextBoxValueChange="AssignTaskToMeGridViewPager_TextBoxValueChange" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="himsBoxContent card-body table-responsive">
                                            <asp:GridView runat="server" ID="AssignTaskToMeGridView" AutoGenerateColumns="False"
                                                EmptyDataText="No records available for the seacrh criteria!" OnRowDataBound="AssignTaskToMeGridView_RowDataBound" CssClass="table table-striped table-bordered table-hover"
                                                AllowPaging="True" PageSize="10" DataKeyNames="Id,IsClosed" ShowHeader="true" meta:resourcekey="AssignTaskToMeGridViewResource1">
                                                <Columns>
                                                    <asp:BoundField DataField="SourceCode" HeaderText="ID No / Code" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="SourceName" HeaderText="Assigned By" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="AssignedDate" HeaderText="Start Date" DataFormatString="{0:MMMM dd,yyyy}" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="DueDate" HeaderText="Due Date" DataFormatString="{0:MMMM dd,yyyy}" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:TemplateField HeaderText="Status" HeaderStyle-HorizontalAlign="Center"
                                                        ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                        <ItemTemplate>
                                                            <asp:Label ID="IsCompletedLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsCompleted").ToString().ToUpper()=="TRUE"?"Completed":"Pending" %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="ViewLinkButton" runat="server" CommandName="Select" OnClick="ViewLinkButton_Click"
                                                                Text="View" CausesValidation="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>

                                    <div class="himssuHeader6WireBox col-md-12">
                                        <div class="himsBoxHeader card-head inner" id="AssignTaskByMeGridViewPagerDiv" runat="server" visible="true" style="height: 60px">
                                            <div class="himsBoxTitle">
                                                <div class="gridHeaderText ">
                                                    <header>
                                                        <asp:Label ID="Label2" Text="Task Assigned By Me" runat="server" />
                                                    </header>
                                                </div>
                                                <div class="leftdiv">
                                                </div>
                                                <div class="fRight">
                                                    <uc1:GridViewPager ID="AssignTaskByMeGridViewPager" ParentGridView="AssignTaskByMeGridView"
                                                        runat="server" OnFirstRecordClick="AssignTaskByMeGridViewPager_FirstRecordClick"
                                                        OnLastRecordClick="AssignTaskByMeGridViewPager_LastRecordClick" OnNextRecordClick="AssignTaskByMeGridViewPager_NextRecordClick"
                                                        OnPrevRecordClick="AssignTaskByMeGridViewPager_PrevRecordClick" OnTextBoxValueChange="AssignTaskByMeGridViewPager_TextBoxValueChange" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="leftdiv">
                                        </div>
                                        <div class="himsBoxContent card-body">
                                            <asp:GridView runat="server" ID="AssignTaskByMeGridView" class="himssuHeader7WireBox col-md-12 table-responsive" AutoGenerateColumns="False"
                                                CssClass="table table-striped table-bordered" EmptyDataText="No records available for the seacrh criteria!" SkinID="" PagerSettings-Visible="false"
                                                OnRowDataBound="AssignTaskByMeGridView_RowDataBound" AllowPaging="True" PageSize="10" DataKeyNames="Id,IsClosed"
                                                ShowHeader="true" meta:resourcekey="AssignTaskByMeGridViewResource1" OnPageIndexChanging="AssignTaskByMeGridView_PageIndexChanging">
                                                <Columns>
                                                    <asp:BoundField DataField="SourceCode" HeaderText="ID No / Code" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="SourceName" HeaderText="Assigned To" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="AssignedDate" HeaderText="Start Date" DataFormatString="{0:MMMM dd,yyyy}" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="DueDate" HeaderText="Due Date" DataFormatString="{0:MMMM dd,yyyy}" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:BoundField DataField="Remark" HeaderText="Remark" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="Left" />
                                                    <asp:TemplateField HeaderText="Status" HeaderStyle-HorizontalAlign="Center"
                                                        ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true">
                                                        <ItemTemplate>
                                                            <asp:Label ID="IsCompletedLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"IsCompleted").ToString().ToUpper()=="TRUE"?"Completed":"Pending" %>'></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-Width="6%" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="true" HeaderStyle-HorizontalAlign="Left">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="Select" OnClick="EditLinkButton_Click"
                                                                Text="Edit" CausesValidation="false"></asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerSettings Visible="False" />
                                            </asp:GridView>
                                        </div>
                                    </div>

                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
                </tr>
                    </table>
            </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <%--   <script data-main="../../JavaScript/rjs/encrypt/assign-organization-encrypt" src="../../JavaScript/rjs/require.js"></script>--%>
    <script data-main='<%=ResolveUrl("~/JavaScript/rjs/assign-organization")%>' src='<%=ResolveUrl("~/JavaScript/rjs/require.js")%>'></script>

    <%--mantis: 40910--%>
    <script type="text/javascript">
        function RedirectToMigration(OnlinePaymentUrl) {
            var newTab = window.open(OnlinePaymentUrl, '_blank');
            window.location.href = '../../../Pages/BaseFramework/MyDashBoard.aspx';
        }
    </script>
</asp:Content>
