Libs/MojoCube.Office/String.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using System.Web;

namespace MojoCube.Office
{
    public class String
    {
        #region  提示警告

        /// <summary>
        /// 提示警告
        /// </summary>
        /// <param name="type">danger/info/warning/success</param>
        /// <param name="content"></param>
        /// <returns></returns>
        public static string ShowAlert(string type, string content)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<div class=\"alert alert-" + type + " alert-dismissable\">");
            sb.Append("<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>");
            sb.Append(content);
            sb.Append("</div>");
            return sb.ToString();
        }

        #endregion

        #region  删除警告

        public static void ShowDel(GridViewRowEventArgs e)
        {
            string text = "删除该记录将不能恢复,确定删除吗?";
            if (HttpContext.Current != null && HttpContext.Current.Session["Language"] != null)
            {
                switch (HttpContext.Current.Session["Language"].ToString())
                {
                    case "EN":
                        text = "Are you sure?";
                        break;
                    case "CHT":
                        text = "刪除該記錄將不能恢複,確定刪除嗎?";
                        break;
                }
            }
            ((LinkButton)e.Row.FindControl("gvDelete")).OnClientClick = "{return confirm('" + text + "');}";
        }

        #endregion

        #region  字符串转换

        public static int ToInt(string value)
        {
            try
            {
                return int.Parse(value);
后面还有 183 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。