<%@ page language="C#" autoeventwireup="true" inherits="UserGroup, App_Web_usergroup.aspx.de3fb1ff" enableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ 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>..:: ICDAS 2.1 ::..</title>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />

    <script type="text/javascript" language="javascript" src="../App_Include/JavaScript/js_functions.js"> </script>
    
    <script type="text/javascript" language="javascript" src="../App_Include/JavaScript/ScreenSaverStar.js"> </script>
    
    <style type="text/css">
       .GVFixedHeader 
        {
            position:relative; 
            top: expression(this.offsetParent.scrollTop);
        }
    </style>

    <script type="text/javascript" language="javascript">
        function resizeObject() {
            var w = getBrowserWindowSize().width;
            var h = getBrowserWindowSize().height - 5;
            //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 cObj = document.getElementById("pnlContainer");
            if (cObj != null) {
                //cObj.style.height = parseInt((h*79)/100) +"px";
                cObj.style.height = (parseInt(h) - 160) + "px";
                //cObj.style.width = parseInt(w) +"px";
            }
            hideWait();
        }


        function validateRecord() {
            var doc = document.forms[0];
            if (Trim(doc.txtGroupName.value.trim()) == "") {
                alert("Please Enter Group Name...");
                document.forms[0].txtGroupName.focus()
                return false;
            }
            else if (Trim(doc.txtDescription.value) != "" && parseInt(doc.txtDescription.value.length) > 255) {
                alert("Please Enter Details With Max 255 Char Only...");
                document.forms[0].txtDescription.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" target="_blank">
    <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="User Group" PageAccess="11111" />
                    </div>
                    <asp:UpdatePanel ID="uplChildBody" runat="server" UpdateMode="Always">
                        <ContentTemplate>
                            <asp:HiddenField ID="hdnRecordKeyId" runat="server" Value="0" />
                            <asp:HiddenField ID="hdnRecordIds" runat="server" />
                            <asp:HiddenField ID="hdnUserId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnDepartmentId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnAccessibleDepartmentId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnBusinessUnitId" runat="server" Value="" />
                            <asp:HiddenField ID="hdnBranchId" runat="server" Value="" />
                            
                            <asp:HiddenField ID="hdnMenuShowRight" runat="server" Value="" />
                            <asp:HiddenField ID="hdnMenuAddRight" runat="server" Value="" />
                            <asp:HiddenField ID="hdnMenuEditRight" runat="server" Value="" />
                            <asp:HiddenField ID="hdnMenuDeleteRight" runat="server" Value="" />
                            <asp:HiddenField ID="hdnMenuShowPrint" runat="server" Value="" />
                            

                            <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="2">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Name*
                                        </td>
                                        <td valign="middle">
                                            <asp:TextBox ID="txtGroupName" runat="server" Width="400px" MaxLength="30"></asp:TextBox>
                                             <%--&nbsp;Level
                                             <asp:DropDownList ID="cmbMasterLevel" runat="server">
                                                <asp:ListItem Text="Company" Value="0" Selected="True" />
                                                <asp:ListItem Text="Business" Value="1" />
                                                <asp:ListItem Text="Branch" Value="2" />
                                            </asp:DropDownList>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Details
                                        </td>
                                        <td valign="middle">
                                            <asp:TextBox ID="txtDescription" runat="server" Width="400px" MaxLength="255"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2" class="frametitle">
                                            <font size="2"><b>Access Rights - Select / Deselect All</b> </font>
                                            <asp:CheckBox ID="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server"    
                                                ToolTip="Select/Deselect All"></asp:CheckBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top" align="center" colspan="2">
                                            <asp:Panel runat="server" ID="pnlContainer" ScrollBars="Auto" Width="99%" BorderStyle="Solid" BorderWidth="1" >
                                                <asp:GridView ID="GVProjectAccess" Width="100%" runat="server" CellPadding="0" CellSpacing="0"
                                                    AllowPaging="false" AllowSorting="false" AutoGenerateColumns="False" AlternatingRowStyle-CssClass="DGR_ALTERNATE"
                                                    RowStyle-CssClass="DGR_ITEM" HeaderStyle-CssClass="DGR_FIXEDHEADER" OnRowDataBound="GVProjectAccessDataBound"
                                                    BorderColor="#E0E4EA" ShowHeader="true" >
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="Menu Name">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblMenuName" runat="server" Text='<%# Eval("MenuName")%>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Left" Width="50%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="View">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkFormRead" runat="server"></asp:CheckBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Add">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkFormWrite" runat="server"></asp:CheckBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Edit">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkFormEdit" runat="server"></asp:CheckBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Delete">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkFormDelete" runat="server"></asp:CheckBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Print">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkFormPrint" runat="server"></asp:CheckBox>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="DGR_HEADER" />
                                                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="MenuCode" HeaderText="MenuCode">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                        <asp:TemplateField HeaderText="Menu Type">
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblMenuType" runat="server" Text='<%# Eval("MenuType")%>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="ProjectAccessId" HeaderText="ProjectAccessId">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="ModuleGroup" HeaderText="ModuleGroup">
                                                            <HeaderStyle CssClass="hiddencol"></HeaderStyle>
                                                            <ItemStyle CssClass="hiddencol"></ItemStyle>
                                                        </asp:BoundField>
                                                    </Columns>
                                                    <HeaderStyle CssClass="DGR_FIXEDHEADER" Height="25px" />
                                                    <PagerSettings Position="TopAndBottom" />
                                                    <PagerStyle CssClass="DGR_PAGER"></PagerStyle>
                                                    <RowStyle CssClass="DGR_ITEM" />
                                                </asp:GridView>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
