void Role_SelectedIndexChanged(Object sender, EventArgs e)
        {
            DropDownList ddlSelected = (DropDownList)sender;
            //if (ddlSelected.SelectedIndex > 0)
            //{
            clsAuthorizationDetails        objAthen = new clsAuthorizationDetails();
            List <EntAuthorizationDetails> lst;

            lst = objAthen.GetAthenDetails(int.Parse(ddlSelected.SelectedValue));
            for (int iloop = 0; iloop < lst.Count; iloop++)
            {
                if (lst[iloop].ModuleID == clsConstant.NOMIATION_ID)
                {
                    List <EntNomAuthorizationDetails> lstNom;
                    lstNom = objAthen.GetNomAthenDetails(lst[iloop].RoleID);
                    if (lstNom.Count > 0)
                    {
                        ((CheckBox)tblModule.FindControl("chkView" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked      = lst[0].isView;
                        ((CheckBox)tblModule.FindControl("chkUpload" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked    = lstNom[0].isUpload;
                        ((CheckBox)tblModule.FindControl("chkShortList" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked = lstNom[0].isShortList;
                        ((CheckBox)tblModule.FindControl("chkApprove" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked   = lstNom[0].isApprove;
                    }
                    else
                    {
                        ((CheckBox)tblModule.FindControl("chkView" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked      = false;
                        ((CheckBox)tblModule.FindControl("chkUpload" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked    = false;
                        ((CheckBox)tblModule.FindControl("chkShortList" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked = false;
                        ((CheckBox)tblModule.FindControl("chkApprove" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked   = false;
                    }
                }
                else
                {
                    ((CheckBox)tblModule.FindControl("chkView" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked = lst[iloop].isView;
                    ((CheckBox)tblModule.FindControl("chkEdit" + ddlSelected.ID + "_" + lst[iloop].ModuleID)).Checked = lst[iloop].isEdit;
                }
            }
            if (lst.Count == 0)
            {
                List <EntModuleDetails> lstModule = (List <EntModuleDetails>)Session[clsConstant.SESS_MODULE];

                for (int jloop = 0; jloop < lstModule.Count; jloop++)
                {
                    if (lstModule[jloop].ModuleID == clsConstant.NOMIATION_ID)
                    {
                        ((CheckBox)tblModule.FindControl("chkView" + ddlSelected.ID + "_" + lstModule[jloop].ModuleID)).Checked      = false;
                        ((CheckBox)tblModule.FindControl("chkUpload" + ddlSelected.ID + "_" + lstModule[jloop].ModuleID)).Checked    = false;
                        ((CheckBox)tblModule.FindControl("chkShortList" + ddlSelected.ID + "_" + lstModule[jloop].ModuleID)).Checked = false;
                        ((CheckBox)tblModule.FindControl("chkApprove" + ddlSelected.ID + "_" + lstModule[jloop].ModuleID)).Checked   = false;
                    }
                    else
                    {
                        ((CheckBox)tblModule.FindControl("chkView" + ddlSelected.ID + "_" + lstModule[jloop].ModuleID)).Checked = false;
                        ((CheckBox)tblModule.FindControl("chkEdit" + ddlSelected.ID + "_" + lstModule[jloop].ModuleID)).Checked = false;
                    }
                }
            }
            //}
        }
        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;
        }