示例#1
0
        protected string GetTitle(AdviceInfo advice)
        {
            if (advice == null)
            {
                return(String.Empty);
            }

            string url = String.Empty;

            if (Permisstions.Contains("Advice.Handle") && (advice.State == 2 || advice.State == 3 && advice.TypeID == TypeID))
            {
                url = "AdviceProcessEx.aspx";
            }
            else if (Permisstions.Contains("Advice.Accept") && (advice.State == 0))
            {
                url = "AdviceDistribute.aspx";
            }
            else if (Permisstions.Contains("Advice.Transfer") && (advice.State == 0))
            {
                url = "AdviceDistribute.aspx";
            }
            else if (Permisstions.Count > 0)
            {
                url = "AdviceView.aspx";
            }
            return(!String.IsNullOrEmpty(url) ? FormatUrl(url, advice) : advice.Title);
        }
示例#2
0
        private string BuildNavString()
        {
            string strActive = @"<LI class=TabIn id=tab{0} style='display:{2}'><A>{1}</A> </LI>";
            string strLink   = @"<LI class=TabOut id=tab{0}  style='display:{2}'><A  href={3}>{1}</A> </LI>";
            int    tab       = 0;
            bool   hasFirst  = false;
            string tabString = "";
            string dispay    = "";
            string rawurl    = We7Helper.RemoveParamFromUrl(Request.RawUrl, "tab");

            rawurl = We7Helper.RemoveParamFromUrl(Request.RawUrl, "saved");

            if (TabID != null && We7Helper.IsNumber(TabID))
            {
                tab      = int.Parse(TabID);
                hasFirst = true;
            }

            if (Permisstions.Contains("Advice.Read") || Permisstions.Contains("Advice.Admin"))
            {
                if (tab == 1 || !hasFirst)
                {
                    tabString += string.Format(strActive, 1, "全部", dispay);
                    AddControl(10);
                    hasFirst = true;
                }
                else
                {
                    tabString += string.Format(strLink, 1, "全部", dispay, We7Helper.AddParamToUrl(rawurl, "tab", "1"));
                }
            }

            if (Permisstions.Contains("Advice.Read") || Permisstions.Contains("Advice.Admin") || Permisstions.Contains("Advice.Accept"))
            {
                if (tab == 2 || !hasFirst)
                {
                    tabString += string.Format(strActive, 2, "待受理", dispay);
                    AddControl(0);
                    hasFirst = true;
                }
                else
                {
                    tabString += string.Format(strLink, 2, "待受理", dispay, We7Helper.AddParamToUrl(rawurl, "tab", "2"));
                }
            }

            if (Permisstions.Contains("Advice.Read") || Permisstions.Contains("Advice.Admin") || Permisstions.Contains("Advice.Handle"))
            {
                if (tab == 3 || !hasFirst)
                {
                    tabString += string.Format(strActive, 3, "待办中", dispay);
                    AddControl(2);
                    hasFirst = true;
                }
                else
                {
                    tabString += string.Format(strLink, 3, "待办中", dispay, We7Helper.AddParamToUrl(rawurl, "tab", "3"));
                }
            }

            if (Permisstions.Contains("Advice.Read") || Permisstions.Contains("Advice.Admin") || Permisstions.Contains("Advice.Accept") || Permisstions.Contains("Advice.Handle"))
            {
                if (tab == 6 || !hasFirst)
                {
                    tabString += string.Format(strActive, 6, "不受理", dispay);
                    AddControl(1);
                    hasFirst = true;
                }
                else
                {
                    tabString += string.Format(strLink, 6, "不受理", dispay, We7Helper.AddParamToUrl(rawurl, "tab", "6"));
                }
            }

            if (Permisstions.Contains("Advice.Read") || Permisstions.Contains("Advice.Admin") || Permisstions.Contains("Advice.Accept") || Permisstions.Contains("Advice.Handle"))
            {
                if (tab == 5 || !hasFirst)
                {
                    tabString += string.Format(strActive, 5, "已办结", dispay);
                    AddControl(9);
                    hasFirst = true;
                }
                else
                {
                    tabString += string.Format(strLink, 5, "已办结", dispay, We7Helper.AddParamToUrl(rawurl, "tab", "5"));
                }
            }

            if (Permisstions.Contains("Advice.Read") || Permisstions.Contains("Advice.Admin") || Permisstions.Contains("Advice.Accept") || Permisstions.Contains("Advice.Handle"))
            {
                if (tab == 4 || !hasFirst)
                {
                    tabString += string.Format(strActive, 4, "转办记录", dispay);
                    AddControl(3);
                    hasFirst = true;
                }
                else
                {
                    tabString += string.Format(strLink, 4, "转办记录", dispay, We7Helper.AddParamToUrl(rawurl, "tab", "4"));
                }
            }

            return(tabString);
        }