protected void createViewAthenTable()
        {
            clsAuthorizationDetails objAutho = new clsAuthorizationDetails();
            List <EntModuleDetails> lst      = objAutho.getModuleList();

            Session[clsConstant.SESS_MODULE] = lst;
            tblHrModuleView.ColumnSpan       = lst.Count * 2;
            tblAthenRow  = new TableRow();
            tblAthenCell = new TableCell();
            tblAthenRow.Controls.Add(tblAthenCell);
            for (int iloop = 0; iloop < lst.Count; iloop++)
            {
                tblModHrCell = new TableHeaderCell();
                if (lst[iloop].ModuleID == clsConstant.NOMIATION_ID)
                {
                    tblModHrCell.ColumnSpan = 4;
                }
                else
                {
                    tblModHrCell.ColumnSpan = 2;
                }
                lblHeading      = new Label();
                lblHeading.Text = Server.HtmlEncode(lst[iloop].ModuleName);
                lblHeading.ID   = "lblModule" + iloop;
                tblModHrCell.Controls.Add(lblHeading);
                tblAthenRow.Controls.Add(tblModHrCell);
            }
            tblAthenView.Controls.Add(tblAthenRow);
            tblAthenRow  = new TableRow();
            tblAthenCell = new TableCell();
            tblAthenRow.Controls.Add(tblAthenCell);
            for (int iloop = 0; iloop < lst.Count; iloop++)
            {
                tblModHrCell = new TableHeaderCell();
                tblModHrCell.HorizontalAlign = HorizontalAlign.Center;
                lblHeading      = new Label();
                lblHeading.Text = Server.HtmlEncode("VIEW");
                lblHeading.ID   = "lblView" + iloop;
                tblModHrCell.Controls.Add(lblHeading);
                tblAthenRow.Controls.Add(tblModHrCell);
                tblModHrCell.HorizontalAlign = HorizontalAlign.Center;
                if (lst[iloop].ModuleID == clsConstant.NOMIATION_ID)
                {
                    tblModHrCell    = new TableHeaderCell();
                    lblHeading      = new Label();
                    lblHeading.Text = Server.HtmlEncode("UPLOAD");
                    lblHeading.ID   = "lblUpload" + iloop;
                    tblModHrCell.Controls.Add(lblHeading);
                    tblAthenRow.Controls.Add(tblModHrCell);

                    tblModHrCell    = new TableHeaderCell();
                    lblHeading      = new Label();
                    lblHeading.Text = Server.HtmlEncode("SHORT-LIST");
                    lblHeading.ID   = "lblShortList" + iloop;
                    tblModHrCell.Controls.Add(lblHeading);
                    tblAthenRow.Controls.Add(tblModHrCell);

                    tblModHrCell    = new TableHeaderCell();
                    lblHeading      = new Label();
                    lblHeading.Text = Server.HtmlEncode("APPROVE");
                    lblHeading.ID   = "lblApprove" + iloop;
                    tblModHrCell.Controls.Add(lblHeading);
                    tblAthenRow.Controls.Add(tblModHrCell);
                }
                else
                {
                    tblModHrCell    = new TableHeaderCell();
                    lblHeading      = new Label();
                    lblHeading.Text = Server.HtmlEncode("EDIT");
                    lblHeading.ID   = "lblEdit" + iloop;
                    tblModHrCell.Controls.Add(lblHeading);
                    tblAthenRow.Controls.Add(tblModHrCell);
                }
            }
            tblAthenView.Controls.Add(tblAthenRow);
            objAutho = new clsAuthorizationDetails();
            List <entAthen> lstRole = objAutho.getRoleListFromAthen();


            List <entRoleCount> listRoleCount = objAutho.getRoleCountList();
            int iCount = 0;

            for (int iloop = 0; iloop < listRoleCount.Count; iloop++)
            {
                tblAthenRow = new TableRow();
                tblModCell  = new TableCell();
                lblHeading  = new Label();
                tblModCell.HorizontalAlign = HorizontalAlign.Center;
                lblHeading.Text            = Server.HtmlEncode(listRoleCount[iloop].RoleName);
                lblHeading.ID = "lblRole" + iloop;
                tblModCell.Controls.Add(lblHeading);
                tblAthenRow.Controls.Add(tblModCell);
                for (int jloop = 0; jloop < lst.Count; jloop++)
                {
                    if (lst[jloop].ModuleID == clsConstant.NOMIATION_ID)
                    {
                        List <EntNomAuthorizationDetails> lstNom;
                        lstNom = objAutho.GetNomAthenDetails(listRoleCount[iloop].RoleID);
                        bool isView      = false;
                        bool isUpload    = false;
                        bool isShortList = false;
                        bool isApprove   = false;
                        if (lstNom.Count > 0)
                        {
                            isView      = lstNom[0].isView;
                            isUpload    = lstNom[0].isUpload;
                            isShortList = lstNom[0].isShortList;
                            isApprove   = lstNom[0].isApprove;
                        }
                        tblModCell = new TableCell();
                        lblHeading = new Label();
                        tblModCell.HorizontalAlign = HorizontalAlign.Center;
                        lblHeading.Text            = isView.ToString();
                        lblHeading.ID = "lblView_" + iloop + "_" + iCount;
                        tblModCell.Controls.Add(lblHeading);
                        tblAthenRow.Controls.Add(tblModCell);

                        tblModCell = new TableCell();
                        lblHeading = new Label();
                        tblModCell.HorizontalAlign = HorizontalAlign.Center;
                        lblHeading.Text            = isUpload.ToString();
                        lblHeading.ID = "lblUpload_" + iloop + "_" + iCount;
                        tblModCell.Controls.Add(lblHeading);
                        tblAthenRow.Controls.Add(tblModCell);

                        tblModCell = new TableCell();
                        lblHeading = new Label();
                        tblModCell.HorizontalAlign = HorizontalAlign.Center;
                        lblHeading.Text            = isShortList.ToString();
                        lblHeading.ID = "lblShortList_" + iloop + "_" + iCount;
                        tblModCell.Controls.Add(lblHeading);
                        tblAthenRow.Controls.Add(tblModCell);

                        tblModCell = new TableCell();
                        lblHeading = new Label();
                        tblModCell.HorizontalAlign = HorizontalAlign.Center;
                        lblHeading.Text            = isApprove.ToString();
                        lblHeading.ID = "lblApprove_" + iloop + "_" + iCount;
                        tblModCell.Controls.Add(lblHeading);
                        tblAthenRow.Controls.Add(tblModCell);
                    }
                    else if (lstRole.Count > iCount)
                    {
                        if (lst[jloop].ModuleID == lstRole[iCount].ModuleID)
                        {
                            tblModCell = new TableCell();
                            lblHeading = new Label();
                            tblModCell.HorizontalAlign = HorizontalAlign.Center;
                            lblHeading.Text            = lstRole[iCount].isView.ToString();
                            lblHeading.ID = "lblView_" + iloop + "_" + iCount;
                            tblModCell.Controls.Add(lblHeading);
                            tblAthenRow.Controls.Add(tblModCell);

                            tblModCell = new TableCell();
                            lblHeading = new Label();
                            tblModCell.HorizontalAlign = HorizontalAlign.Center;
                            lblHeading.Text            = lstRole[iCount].isEdit.ToString();
                            lblHeading.ID = "lblEdit_" + iloop + "_" + iCount;
                            tblModCell.Controls.Add(lblHeading);
                            tblAthenRow.Controls.Add(tblModCell);
                        }
                        else
                        {
                            tblModCell = new TableCell();
                            lblHeading = new Label();
                            tblModCell.HorizontalAlign = HorizontalAlign.Center;
                            lblHeading.Text            = "False";
                            lblHeading.ID = "lblView_" + iloop + "_" + iCount;
                            tblModCell.Controls.Add(lblHeading);
                            tblAthenRow.Controls.Add(tblModCell);
                            tblModCell = new TableCell();
                            lblHeading = new Label();
                            tblModCell.HorizontalAlign = HorizontalAlign.Center;
                            lblHeading.Text            = "False";
                            lblHeading.ID = "lblEdit_" + iloop + "_" + iCount;
                            tblModCell.Controls.Add(lblHeading);
                            tblAthenRow.Controls.Add(tblModCell);
                        }
                    }
                    else
                    {
                        tblModCell = new TableCell();
                        lblHeading = new Label();
                        tblModCell.HorizontalAlign = HorizontalAlign.Center;
                        lblHeading.Text            = "False";
                        lblHeading.ID = "lblView_" + iloop + "_" + iCount;
                        tblModCell.Controls.Add(lblHeading);
                        tblAthenRow.Controls.Add(tblModCell);

                        tblModCell = new TableCell();
                        lblHeading = new Label();
                        tblModCell.HorizontalAlign = HorizontalAlign.Center;
                        lblHeading.Text            = "False";
                        lblHeading.ID = "lblEdit_" + iloop + "_" + iCount;
                        tblModCell.Controls.Add(lblHeading);
                        tblAthenRow.Controls.Add(tblModCell);
                    }
                    iCount = iCount + 1;
                }
                tblAthenView.Controls.Add(tblAthenRow);
            }

            tblAthenView.Controls.Add(tblAthenRow);
            tblHrModuleView.ColumnSpan = (lst.Count * 2) + 2;
        }
        protected Table createMouleTable(int iRow)
        {
            clsAuthorizationDetails objAutho = new clsAuthorizationDetails();
            List <EntModuleDetails> lst      = objAutho.getModuleList();

            Session[clsConstant.SESS_MODULE] = lst;
            tblModule             = new Table();
            tblModule.CellPadding = 2;
            tblModule.CellSpacing = 2;

            tblModHrRow = new TableHeaderRow();
            tblModRow   = new TableRow();
            for (int iloop = 0; iloop < lst.Count; iloop++)
            {
                tblModHrCell         = new TableHeaderCell();
                lblHeading           = new Label();
                lblHeading.Text      = Server.HtmlEncode(lst[iloop].ModuleName);
                lblHeading.ID        = "lblHeading" + iRow + "_" + iloop;
                lblHeading.Font.Bold = true;

                tblModHrCell.Controls.Add(lblHeading);

                tblModHrRow.Controls.Add(tblModHrCell);


                tblModCell  = new TableCell();
                chkbox      = new CheckBox();
                chkbox.Text = "View";
                chkbox.ID   = "chkView" + iRow + "_" + lst[iloop].ModuleID;

                tblModCell.Controls.Add(chkbox);

                if (lst[iloop].ModuleID == clsConstant.NOMIATION_ID)
                {
                    chkbox      = new CheckBox();
                    chkbox.Text = "Upload";
                    chkbox.ID   = "chkUpload" + iRow + "_" + lst[iloop].ModuleID;

                    tblModCell.Controls.Add(chkbox);

                    chkbox      = new CheckBox();
                    chkbox.Text = "Short List";
                    chkbox.ID   = "chkShortList" + iRow + "_" + lst[iloop].ModuleID;

                    tblModCell.Controls.Add(chkbox);

                    chkbox      = new CheckBox();
                    chkbox.Text = "Approve";
                    chkbox.ID   = "chkApprove" + iRow + "_" + lst[iloop].ModuleID;

                    tblModCell.Controls.Add(chkbox);
                }
                else
                {
                    chkbox      = new CheckBox();
                    chkbox.Text = "Edit";
                    chkbox.ID   = "chkEdit" + iRow + "_" + lst[iloop].ModuleID;

                    tblModCell.Controls.Add(chkbox);
                }


                tblModRow.Controls.Add(tblModCell);
            }
            tblModule.Controls.Add(tblModHrRow);
            tblModule.Controls.Add(tblModRow);
            return(tblModule);
        }