⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 insidestaticlabel.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
📖 第 1 页 / 共 5 页
字号:
                        case "0":
                            str = str + "零";
                            break;

                        case "1":
                            str = str + "一";
                            break;

                        case "2":
                            str = str + "二";
                            break;

                        case "3":
                            str = str + "三";
                            break;

                        case "4":
                            str = str + "四";
                            break;

                        case "5":
                            str = str + "五";
                            break;

                        case "6":
                            str = str + "六";
                            break;

                        case "7":
                            str = str + "七";
                            break;

                        case "8":
                            str = str + "八";
                            break;

                        case "9":
                            str = str + "九";
                            break;

                        case ".":
                            str = str + "点";
                            break;

                        default:
                            str = str + a1[i].ToString();
                            break;
                    }
                }
            }
            return str;
        }

        public string Int2CMoney(string numstr)
        {
            decimal num = 0M;
            try
            {
                num = Convert.ToDecimal(numstr);
            }
            catch (InvalidCastException)
            {
                return "参数应该为数字";
            }
            StringBuilder builder = new StringBuilder();
            if (num == 0M)
            {
                builder = new StringBuilder("零元整");
            }
            else
            {
                string str = "零壹贰叁肆伍陆柒捌玖";
                string str2 = "万仟佰拾亿仟佰拾万仟佰拾元角分";
                string str3 = string.Empty;
                string str4 = string.Empty;
                string str5 = string.Empty;
                string str6 = string.Empty;
                int num4 = 0;
                str4 = ((long) (Math.Round(Math.Abs(num), 2) * 100M)).ToString();
                int length = str4.Length;
                if (length > 15)
                {
                    return "溢出";
                }
                str2 = str2.Substring(15 - length);
                for (int i = 0; i < length; i++)
                {
                    str3 = str4.Substring(i, 1);
                    int startIndex = Convert.ToInt32(str3);
                    if (((i != (length - 3)) && (i != (length - 7))) && ((i != (length - 11)) && (i != (length - 15))))
                    {
                        if (str3 == "0")
                        {
                            str5 = string.Empty;
                            str6 = string.Empty;
                            num4++;
                        }
                        else if ((str3 != "0") && (num4 != 0))
                        {
                            str5 = "零" + str.Substring(startIndex, 1);
                            str6 = str2.Substring(i, 1);
                            num4 = 0;
                        }
                        else
                        {
                            str5 = str.Substring(startIndex, 1);
                            str6 = str2.Substring(i, 1);
                            num4 = 0;
                        }
                    }
                    else if ((str3 != "0") && (num4 != 0))
                    {
                        str5 = "零" + str.Substring(startIndex, 1);
                        str6 = str2.Substring(i, 1);
                        num4 = 0;
                    }
                    else if ((str3 != "0") && (num4 == 0))
                    {
                        str5 = str.Substring(startIndex, 1);
                        str6 = str2.Substring(i, 1);
                        num4 = 0;
                    }
                    else if ((str3 == "0") && (num4 >= 3))
                    {
                        str5 = string.Empty;
                        str6 = string.Empty;
                        num4++;
                    }
                    else if (length >= 11)
                    {
                        str5 = string.Empty;
                        num4++;
                    }
                    else
                    {
                        str5 = string.Empty;
                        str6 = str2.Substring(i, 1);
                        num4++;
                    }
                    if ((i == (length - 11)) || (i == (length - 3)))
                    {
                        str6 = str2.Substring(i, 1);
                    }
                    builder.Append(str5 + str6);
                    if ((i == (length - 1)) && (str3 == "0"))
                    {
                        builder.Append("整");
                    }
                }
            }
            return builder.ToString();
        }

        public string IsAdminLogined()
        {
            string str = "false";
            if ((HttpContext.Current != null) && PEContext.Current.Admin.Identity.IsAuthenticated)
            {
                str = "true";
            }
            return str;
        }

        public string IsLogined()
        {
            string str = "false";
            if ((HttpContext.Current != null) && PEContext.Current.User.Identity.IsAuthenticated)
            {
                str = "true";
            }
            return str;
        }

        public string IsShop(string tableName)
        {
            string str = "false";
            if (ModelManager.GetCacheModelByTableName(tableName).IsEshop)
            {
                str = "true";
            }
            return str;
        }

        public string IsStartWithhttp(string urlvalue)
        {
            if (string.IsNullOrEmpty(urlvalue))
            {
                return "false";
            }
            if (urlvalue.Contains("://") || urlvalue.StartsWith("/", StringComparison.InvariantCultureIgnoreCase))
            {
                return "true";
            }
            return "false";
        }

        public string JSSlidePic()
        {
            StringBuilder builder = new StringBuilder("");
            builder.Append("<script language=\"JavaScript\">\n");
            builder.Append("<!--\n");
            builder.Append("function objSP_Info() {this.ImgUrl=\"\"; this.LinkUrl=\"\"; this.Title=\"\";}\n");
            builder.Append("function SlidePic_Info(_id) {this.ID=_id; this.Width=0;this.Height=0; this.TimeOut=5000; this.Effect=23; this.TitleLen=0; this.PicNum=-1; this.Img=null; this.Url=null; this.Title=null; this.AllPic=new Array(); this.Add=SlidePic_Info_Add; this.Show=SlidePic_Info_Show; this.LoopShow=SlidePic_Info_LoopShow;}\n");
            builder.Append("function SlidePic_Info_Add(_SP) {this.AllPic[this.AllPic.length] = _SP;}\n");
            builder.Append("function SlidePic_Info_Show() {\n");
            builder.Append("  if(this.AllPic[0] == null) return false;\n");
            builder.Append("  document.write(\"<div align='center'><a id='Url_\" + this.ID + \"' href=''><img id='Img_\" + this.ID + \"' style='width:\" + this.Width + \"px; height:\" + this.Height + \"px; filter: revealTrans(duration=2,transition=23);' src='javascript:null' border='0'></a>\");\n");
            builder.Append("  if(this.TitleLen != 0) {document.write(\"<br><span id='Title_\" + this.ID + \"'></span></div>\");}\n");
            builder.Append("  else{document.write(\"</div>\");}\n");
            builder.Append("  this.Img = document.getElementById(\"Img_\" + this.ID);\n");
            builder.Append("  this.Url = document.getElementById(\"Url_\" + this.ID);\n");
            builder.Append("  this.Title = document.getElementById(\"Title_\" + this.ID);\n");
            builder.Append("  this.LoopShow();\n");
            builder.Append("}\n");
            builder.Append("function SlidePic_Info_LoopShow() {\n");
            builder.Append("  if(this.PicNum<this.AllPic.length-1) this.PicNum++ ; \n");
            builder.Append("  else this.PicNum=0; \n");
            builder.Append("  this.Img.filters.revealTrans.Transition=this.Effect; \n");
            builder.Append("  this.Img.filters.revealTrans.apply(); \n");
            builder.Append("  this.Img.src=this.AllPic[this.PicNum].ImgUrl;\n");
            builder.Append("  this.Img.filters.revealTrans.play();\n");
            builder.Append("  this.Url.href=this.AllPic[this.PicNum].LinkUrl;\n");
            builder.Append("  if(this.Title) this.Title.innerHTML=\"<a href=\"+this.AllPic[this.PicNum].LinkUrl+\" target=_blank>\"+this.AllPic[this.PicNum].Title+\"</a>\";\n");
            builder.Append("  this.Img.timer=setTimeout(this.ID+\".LoopShow()\",this.TimeOut);\n");
            builder.Append("}\n");
            builder.Append("//-->\n");
            builder.Append("</script>\n");
            return builder.ToString();
        }

        public string LoginedUserEmail()
        {
            string email = "";
            if ((HttpContext.Current != null) && !string.IsNullOrEmpty(PEContext.Current.User.UserInfo.Email))
            {
                email = PEContext.Current.User.UserInfo.Email;
            }
            return email;
        }

        public string LoginedUserExp(string qstar)
        {
            string userTrueName = "";
            if (HttpContext.Current != null)
            {
                switch (qstar.ToLower())
                {
                    case "balane":
                        return PEContext.Current.User.UserInfo.Balance.ToString();

                    case "consumeexp":
                        return PEContext.Current.User.UserInfo.ConsumeExp.ToString();

                    case "consumemoney":
                        return PEContext.Current.User.UserInfo.ConsumeMoney.ToString();

                    case "consumepoint":
                        return PEContext.Current.User.UserInfo.ConsumePoint.ToString();

                    case "endtime":
                        return PEContext.Current.User.UserInfo.EndTime.ToString();

                    case "passeditems":
                        return PEContext.Current.User.UserInfo.PassedItems.ToString();

                    case "postitems":
                        return PEContext.Current.User.UserInfo.PostItems.ToString();

                    case "userexp":
                        return PEContext.Current.User.UserInfo.UserExp.ToString();

                    case "userpoint":
                        return PEContext.Current.User.UserInfo.UserPoint.ToString();

                    case "usertruename":
                        if (!string.IsNullOrEmpty(PEContext.Current.User.UserInfo.UserTrueName))
                        {
                            userTrueName = PEContext.Current.User.UserInfo.UserTrueName;
                        }
                        return userTrueName;

                    case "usertype":
                        return PEContext.Current.User.UserInfo.UserType.ToString();
                }
            }
            return userTrueName;
        }

        public string LoginedUserName()
        {
            string userName = "";
            if ((HttpContext.Current != null) && !string.IsNullOrEmpty(PEContext.Current.User.UserName))
            {
                userName = PEContext.Current.User.UserName;
            }
            return userName;
        }

        public string LoginedUserSet(string qstar)
        {
            string groupName = "";
            if (HttpContext.Current != null)
            {
                switch (qstar.ToLower())
                {
                    case "delitems":
                        return PEContext.Current.User.UserInfo.DelItems.ToString();

                    case "faceheight":
                        return PEContext.Current.User.UserInfo.FaceHeight.ToString();

                    case "facewidth":
                        return PEContext.Current.User.UserInfo.FaceWidth.ToString();

                    case "groupid":
                        return PEContext.Current.User.UserInfo.GroupId.ToString();

                    case "groupname":
                        if (!string.IsNullOrEmpty(PEContext.Current.User.UserInfo.GroupName))
                        {
                            groupName = PEContext.Current.User.UserInfo.GroupName;
                        }
                        return groupName;

                    case "lastloginip":
                        if (!string.IsNullOrEmpty(PEContext.Current.User.UserInfo.LastLoginIP))
                        {
                            groupName = PEContext.Current.User.UserInfo.LastLoginIP;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -