<%@ page language="C#" autoeventwireup="true" inherits="TaskMaster, App_Web_taskmaster.aspx.aef74d2c" enableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="HTMLEditor" %>
<%@ Register Src="~/UserControls/iERPToolBar.ascx" TagName="iERPToolBar" TagPrefix="dsit" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head id="Head1" runat="server">
    <title>..:: iBMS ::..</title>
    <meta http-equiv="X-UA-Compatible" content="IE=9">
    <link href="../App_Include/StyleSheet/Style.css" rel="stylesheet" type="text/css" />

    <script language="javascript" src="../App_Include/JavaScript/js_functions.js"> </script>
    
    <script language="javascript" src="../App_Include/JavaScript/ScreenSaverStar.js"> </script>

    <script language="javascript">
        function resizeObject()
         {
            var w = getBrowserWindowSize().width;
            var h = getBrowserWindowSize().height - 10;
            //window.resizeTo(w, h);
            var cObj = document.getElementById("divChildBody");
            if (cObj != null)
             {
                //cObj.style.height = parseInt((h*79)/100) +"px";
                cObj.style.height = (parseInt(h) - 10) + "px";
                //cObj.style.width = parseInt(w) +"px";
             }
             var cObjTab = document.getElementById("TabContainerTask");
            if (cObjTab != null) {
                //cObj.style.height = parseInt((h*79)/100) +"px";
                cObjTab.style.height = (parseInt(h) - 175) + "px";
                //cObj.style.width = parseInt(w) +"px";
            }
            hideWait();
        }


        function validateRecord()
         {
            var doc = document.forms[0];

                if (Trim(doc.txtTaskName.value) == "") 
			    {
				    alert("Please Enter Name ...");
				    document.forms[0].txtTaskName.focus();
				    return false;
			    }
             else if(Trim(doc.txtTaskStartDate.value) == "") 
				{
					alert("Please Enter Start Date...");
					document.forms[0].txtTaskStartDate.focus();
					return false;
				}
			else if(Trim(doc.txtTaskEndDate.value) == "") 
				{
					alert("Please Enter To Date...");
					document.forms[0].txtTaskEndDate.focus();
					return false;
				}
			else if (Trim(doc.txtFromHour.value) == "") 
				{
					alert("Please Enter From Hour ...");
					document.forms[0].txtFromHour.focus();
					return false;
				}
			else if (parseInt(doc.txtFromHour.value) >= 24) 
				{
					alert("Please Enter From Hour < 24...");
					document.forms[0].txtFromHour.focus();
					return false;
				}
			else if (Trim(doc.txtFromMinutes.value) == "") 
				{
					alert("Please Enter From Minutes ...");
					document.forms[0].txtFromMinutes.focus();
					return false;
				}
			else if (parseInt(doc.txtFromMinutes.value) >= 60) 
				{
					alert("Please Enter From Minutes < 60...".toUpperCase());
					document.forms[0].txtFromMinutes.focus();
					return false;
				}
			else if(Trim(doc.txtToHour.value) == "") 
				{
					alert("Please Enter To Hour ...");
					document.forms[0].txtToHour.focus();
					return false;
				}
			else if (parseInt(doc.txtToHour.value) >= 24) 
				{
					alert("Please Enter To Hour < 24...".toUpperCase());
					document.forms[0].txtToHour.focus();
					return false;
				}
			else if (Trim(doc.txtToMinutes.value) == "") 
				{
					alert("Please Enter To Minutes ...");
					document.forms[0].txtToMinutes.focus();
					return false;
				}
			else if (parseInt(doc.txtToMinutes.value) >= 60) 
				{
					alert("Please Enter To Minutes < 60...");
					document.forms[0].txtToMinutes.focus();
					return false;
				}
            else {
                return true;
            }
        }			
    </script>

</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" onload="resizeObject(); resizeHolder(); init(); initScreenSaver('1',<%=Session["AutoLogOutTime"]%>);">
    <form id="Form1" runat="server" class="formbg">
    <asp:ToolkitScriptManager runat="Server" EnablePartialRendering="true" AsyncPostBackTimeout="0" ID="ToolkitScriptManager1" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left" class="formbg">
        <tr>
            <td valign="top" align="left">
                <div id="divMainBody" align="center" runat="server" width="100%" height="100%">
                    <div id="divHeader" runat="server" style="border-style: none; height: 26px; width: 100%; position: absolute; left: 1px; top: 8px;" align="center">
                        <dsit:iERPToolBar ID="iERPToolBar1" runat="server" Caption="Task Master" PageAccess="11111" />
                    </div>
                    <asp:UpdatePanel ID="uplChildBody" runat="server" UpdateMode="Always">
                        <ContentTemplate>
                            <asp:HiddenField ID="hdnRecordKeyId" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnTaskDetailsId" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnTaskUserId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnRecordIds" runat="server" Value="" />
                            <asp:HiddenField ID="hdnUserId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnBusinessUnitId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnBranchId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnUnitBranch" runat="server" Value="" />
                            <%--<asp:Panel ID="divChildBody" ScrollBars="Vertical" runat="server" width="100%">--%>
                            <div id="divChildBody" runat="server" style="overflow: auto; width: 99%;">
                                <table width="100%" align="left" cellpadding="1" cellspacing="0" class="tablefont">
                                    <tr height="62px">
                                        <td colspan="5">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%">
                                            Name*
                                        </td>
                                        <td colspan="3">
                                            <asp:TextBox ID="txtTaskName" MaxLength="100" runat="server" Width="99%"></asp:TextBox>
                                        </td>
                                        <td width="40%">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%">
                                            Start Date*
                                        </td>
                                        <td colspan="3">
                                            <asp:TextBox ID="txtTaskStartDate" runat="server" CssClass="dateInput" MaxLength="20" onBlur="GetDateField(this);" onFocus="SetDateField(this);" ToolTip="Format : [ddmmyyyy], [d] or [dd], [ddm] or [ddmm], [ ]" Width="25%"></asp:TextBox>
                                            <img id="imgCal1" runat="server" align="absmiddle" alt="Click to Show Calendar" border="0" src="../Images/date.gif" style="cursor: pointer;" />
                                            <asp:CalendarExtender ID="CalendarExtender1" runat="server" CssClass="zcCalendar" Enabled="True" Format="dd-MMM-yyyy" PopupButtonID="imgCal1" TargetControlID="txtTaskStartDate">
                                            </asp:CalendarExtender>
                                            &nbsp;<asp:TextBox ID="txtFromHour" runat="server" Width="20px" CssClass="textStyle" MaxLength="2"></asp:TextBox>(HH) :
                                            <asp:TextBox ID="txtFromMinutes" runat="server" Width="20px" CssClass="textStyle" MaxLength="2"></asp:TextBox>(MM) (24 Hour Format)
                                        </td>
                                        <td width="40%">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="10%">
                                            End Date*
                                        </td>
                                        <td colspan="3">
                                            <asp:TextBox ID="txtTaskEndDate" runat="server" CssClass="dateInput" MaxLength="20" onBlur="GetDateField(this,false);" onFocus="SetDateField(this);" ToolTip="Format : [ddmmyyyy], [d] or [dd], [ddm] or [ddmm], [ ]" Width="25%"></asp:TextBox>
                                            <img id="imgCal2" runat="server" align="absmiddle" alt="Click to Show Calendar" border="0" src="../Images/date.gif" style="cursor: pointer;" />
                                            <asp:CalendarExtender ID="CalendarExtender2" runat="server" CssClass="zcCalendar" Enabled="True" Format="dd-MMM-yyyy" PopupButtonID="imgCal2" TargetControlID="txtTaskEndDate">
                                            </asp:CalendarExtender>
                                            &nbsp;<asp:TextBox ID="txtToHour" runat="server" Width="20px" CssClass="textStyle" MaxLength="2"></asp:TextBox>(HH) :
                                            <asp:TextBox ID="txtToMinutes" runat="server" Width="20px" CssClass="textStyle" MaxLength="2"></asp:TextBox>(MM) (24 Hour Format)
                                        </td>
                                        <td width="40%">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="5">
                                            <table id="Table1" width="100%" align="left" cellpadding="1" cellspacing="0" runat="server">
                                                <tr>
                                                    <td>
                                                        <asp:TabContainer ID="TabContainerTask" runat="server" ActiveTabIndex="0" Width="100%" ScrollBars="Auto" CssClass="tabCont">
                                                            <asp:TabPanel ID="TabTaskFor" runat="server" TabIndex="0">
                                                                <HeaderTemplate>
                                                                    User
                                                                </HeaderTemplate>
                                                                <ContentTemplate>
                                                                    <table id="Table2" cellspacing="0" cellpadding="1" width="100%" align="center" border="0" class="tablefont" runat="server">
                                                                        <tr>
                                                                           
                                                                            <td>
                                                                                <asp:Panel ID="PanelUser" runat="server" ScrollBars="Auto" Width="99%" CssClass="panelgrid">
                                                                                    <asp:GridView ID="GVUser" Width="100%" runat="server" CellPadding="0" CellSpacing="0" AllowPaging="true" OnRowDataBound="GVUserDataBound" AllowSorting="True" AutoGenerateColumns="False" AlternatingRowStyle-CssClass="DGR_ALTERNATE" RowStyle-CssClass="DGR_ITEM" HeaderStyle-CssClass="DGR_FIXEDHEADER" HeaderStyle-Height="25px" OnPageIndexChanging="ChangePage" OnSorting="SortRecords" BorderColor="#E0E4EA">
                                                                                        <Columns>
                                                                                            <asp:TemplateField HeaderStyle-CssClass="DGR_HEADER">
                                                                                                <HeaderTemplate>
                                                                                                    <asp:CheckBox ID="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server" AutoPostBack="false" ToolTip="Select/Deselect All"></asp:CheckBox>
                                                                                                </HeaderTemplate>
                                                                                                <ItemTemplate>
                                                                                                    <asp:CheckBox ID="chkUserId" runat="server"></asp:CheckBox>
                                                                                                </ItemTemplate>
                                                                                                <ItemStyle HorizontalAlign="Center" Width="10px" />
                                                                                                <HeaderStyle HorizontalAlign="Center" Width="10px" />
                                                                                            </asp:TemplateField>
                                                                                            <asp:BoundField DataField="UserId" SortExpression="UserId" ItemStyle-Width="0%">
                                                                                                <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                                                                <HeaderStyle CssClass="hiddencol" />
                                                                                            </asp:BoundField>
                                                                                            <asp:BoundField DataField="UserName" SortExpression="UserName" HeaderText="User Name" ItemStyle-Width="30%"></asp:BoundField>
                                                                                            <asp:BoundField DataField="LoginName" SortExpression="LoginName" HeaderText="Login Name" ItemStyle-Width="30%"></asp:BoundField>
                                                                                                <asp:BoundField DataField="BranchName" SortExpression="BranchName" HeaderText="Branch Name" ItemStyle-Width="40%"></asp:BoundField>
                                                                                        </Columns>
                                                                                        <RowStyle CssClass="DGR_ITEM" />
                                                                                        <HeaderStyle CssClass="DGR_FIXEDHEADER" />
                                                                                        <AlternatingRowStyle CssClass="DGR_ALTERNATE" />
                                                                                        <%--  <PagerStyle CssClass="DGR_PAGER"></PagerStyle>--%>
                                                                                        <PagerSettings Position="TopAndBottom" />
                                                                                    </asp:GridView>
                                                                                </asp:Panel>
                                                                                
                                                                            </td>
                                                                            <td width="40%">
                                                                               
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ContentTemplate>
                                                            </asp:TabPanel>
                                                            <asp:TabPanel ID="TabTaskDetails" runat="server" TabIndex="1">
                                                                <HeaderTemplate>
                                                                    Details
                                                                </HeaderTemplate>
                                                                <ContentTemplate>
                                                                    <HTMLEditor:Editor runat="server" ID="txtTaskDetails" AutoFocus="true" Width="100%" Height="100%" />
                                                                </ContentTemplate>
                                                            </asp:TabPanel>
                                                        </asp:TabContainer>
                                                    </td>
                                                </tr>
                                            </table>
                            </div>
                            <%--</asp:Panel>--%>
                        </ContentTemplate>
                        <Triggers>
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
