Ejemplo n.º 1
0
        /// <summary>
        /// 格式化长日期
        /// </summary>
        /// <param name="t">日期对象</param>
        /// <returns>返回字符串日期 格式:yyyy-MM-dd HH:mm:ss</returns>
        public static string FormatDateTime(object obj)
        {
            DateTime?t = ALConvert.ToDateTime(obj);

            if (t.HasValue && t.Value != minDate)
            {
                return(t.Value.ToString("yyyy-MM-dd HH:mm:ss"));
            }
            else
            {
                return("");
            }
        }
Ejemplo n.º 2
0
        public ALMail()
        {
            var dict = ALConfig.DllConfigs["BIUtils.Web"]["MailConfig"]
                       .ToDictionary(d => d.Attribute("key").Value, d => d.Attribute("value").Value);

            account           = new ALMailAccount();
            account.Username  = dict["Username"];
            account.Sysemail  = dict["Sysemail"];
            account.Signature = dict["Signature"];

            account.Pop          = dict["Pop"];
            account.PopPort      = ALConvert.ToInt(dict["PopPort"]) ?? 110;
            account.PopAccount   = dict["PopAccount"];
            account.PopPassword  = dict["PopPassword"];
            account.PopEnableSsl = (ALConvert.ToInt0(dict["PopEnableSsl"]) == 1);

            account.Smtp          = dict["Smtp"];
            account.SmtpPort      = ALConvert.ToInt(dict["SmtpPort"]) ?? 25;
            account.SmtpAccount   = dict["SmtpAccount"];
            account.SmtpPassword  = dict["SmtpPassword"];
            account.SmtpEnableSsl = (ALConvert.ToInt0(dict["SmtpEnableSsl"]) == 1);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 报表格式:(#,###,##0.00*100)+%
        /// </summary>
        public static string FormatPercents(object obj)
        {
            decimal?t = ALConvert.ToDecimal(obj);

            return(FormatPercents(t));
        }