示例#1
0
 protected void HidPanelFilterGrid(string Authority)
 {
     CurrentPage = (ContentPlaceHolder)Page.Master.FindControl("ContentPlaceHolder1");
     System.Web.UI.HtmlControls.HtmlIframe CurrentIframe = (System.Web.UI.HtmlControls.HtmlIframe)CurrentPage.FindControl("Iframe" + Authority);
     if (CurrentIframe.InnerHtml.Contains("aSelect"))
     {
     }
     else
     {
         //CurrentPage.FindControl("Panel" + Authority).Visible = false;
     }
 }
示例#2
0
        private void LoadData()
        {
            foreach (string CurrentAuthority in CurrentUserInfo.Authority)
            {
                if (CurrentAuthority != "copy" && CurrentAuthority != "PlanManage" && CurrentAuthority != "manage")
                {
                    if (CurrentAuthority == "recond")
                    {
                        Panelrecond.Visible = true;
                        if (ModeRange == "now")
                        {
                            Iframerecond.Visible           = true;
                            Iframerecond.Attributes["src"] = "~/pages/ProjectPlanListEmbed.aspx?mode=recond";
                            //HidPanel(CurrentAuthority);
                        }
                        else if (ModeRange == "all")
                        {
                            ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                    }
                    else if (CurrentAuthority == "OpenClassReceive")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeOpenClassReceive.Visible           = true;
                            IframeOpenClassReceive.Attributes["src"] = "~/pages/CustomProjectListEmbed.aspx?type=00000000-0000-0000-0000-000000000202&mode=receive";
                        }
                        else if (ModeRange == "all")
                        {
                            ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "OpenClassOperation")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeOpenClassOperation.Visible           = true;
                            IframeOpenClassOperation.Attributes["src"] = "~/pages/CustomProjectListEmbed.aspx?type=00000000-0000-0000-0000-000000000202&mode=operation";
                        }
                        else if (ModeRange == "all")
                        {
                            ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "OpenClassPublish")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeOpenClassPublish.Visible           = true;
                            IframeOpenClassPublish.Attributes["src"] = "~/pages/CustomProjectListEmbed.aspx?type=00000000-0000-0000-0000-000000000202&mode=publish";
                        }
                        else if (ModeRange == "all")
                        {
                            ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "OpenClassCheck")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeOpenClassCheck.Visible           = true;
                            IframeOpenClassCheck.Attributes["src"] = "~/pages/CustomProjectListEmbed.aspx?type=00000000-0000-0000-0000-000000000202&mode=check";
                        }
                        else if (ModeRange == "all")
                        {
                            ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "CustomCheck")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeCustomCheck.Visible           = true;
                            IframeCustomCheck.Attributes["src"] = "~/pages/CustomTaskList.aspx?mode=check";
                        }
                        else if (ModeRange == "all")
                        {
                            //ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "CustomExecute")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeCustomExecute.Visible           = true;
                            IframeCustomExecute.Attributes["src"] = "~/pages/CustomTaskList.aspx?mode=execute";
                        }
                        else if (ModeRange == "all")
                        {
                            //ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "CustomHelpExecute")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeCustomHelpExecute.Visible           = true;
                            IframeCustomHelpExecute.Attributes["src"] = "~/pages/CustomTaskList.aspx?mode=helpexecute";
                        }
                        else if (ModeRange == "all")
                        {
                            //ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "CustomMcHelpExecute")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeCustomMcHelpExecute.Visible           = true;
                            IframeCustomMcHelpExecute.Attributes["src"] = "~/pages/CustomTaskList.aspx?mode=mchelpexecute";
                        }
                        else if (ModeRange == "all")
                        {
                            //ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "CustomPic")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeCustomPic.Visible           = true;
                            IframeCustomPic.Attributes["src"] = "~/pages/CustomTaskList.aspx?mode=pic";
                        }
                        else if (ModeRange == "all")
                        {
                            //ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "CustomTemplate")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeCustomTemplate.Visible           = true;
                            IframeCustomTemplate.Attributes["src"] = "~/pages/CustomTaskList.aspx?mode=template";
                        }
                        else if (ModeRange == "all")
                        {
                            //ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "CustomAttachment")
                    {
                        CurrentPage.FindControl("Panel" + CurrentAuthority).Visible = true;
                        if (ModeRange == "now")
                        {
                            IframeCustomAttachment.Visible           = true;
                            IframeCustomAttachment.Attributes["src"] = "~/pages/CustomTaskList.aspx?mode=attachment";
                        }
                        else if (ModeRange == "all")
                        {
                            //ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }
                        //HidPanelFilterGrid(CurrentAuthority);
                    }
                    else if (CurrentAuthority == "cross" || CurrentAuthority == "CreateProject")
                    {
                    }
                    else
                    {
                        Panel CurrentPanel = (Panel)CurrentPage.FindControl("Panel" + CurrentAuthority);
                        CurrentPanel.Visible = true;
                        System.Web.UI.HtmlControls.HtmlIframe CurrentIframe = (System.Web.UI.HtmlControls.HtmlIframe)CurrentPage.FindControl("Iframe" + CurrentAuthority);
                        if (ModeRange == "now")
                        {
                            CurrentIframe.Visible           = true;
                            CurrentIframe.Attributes["src"] = "~/pages/ProjectListEmbed.aspx?mode=" + CurrentAuthority + "&userid=" + CurrentUserInfo.Identity;
                        }
                        else if (ModeRange == "all")
                        {
                            CurrentIframe.Visible = false;
                            ShowAmountData(CurrentAuthority);
                        }
                        else
                        {
                        }

                        //HidPanel(CurrentAuthority);
                    }
                }
                else
                {
                }
            }
            if (CurrentUserInfo.Identity.ToString() == "00000000-0000-0000-0000-000000000131")
            {
                Panel CurrentPanel = (Panel)CurrentPage.FindControl("Panel" + "shorthand");
                CurrentPanel.Visible = true;
                System.Web.UI.HtmlControls.HtmlIframe CurrentIframe = (System.Web.UI.HtmlControls.HtmlIframe)CurrentPage.FindControl("Iframe" + "shorthand");
                if (ModeRange == "now")
                {
                    CurrentIframe.Visible           = true;
                    CurrentIframe.Attributes["src"] = "~/pages/ProjectListEmbed.aspx?mode=" + "shorthand" + "&userid=" + CurrentUserInfo.Identity;
                }
                else if (ModeRange == "all")
                {
                    CurrentIframe.Visible = false;
                    ShowAmountData("shorthand");
                }
                else
                {
                }
            }
        }