Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="n"></param>
        /// <param name="halfTime"></param>
        /// <returns></returns>
        public static string GetSubscribeTime(int n, bool halfTime)
        {
            string temp = AdobeUtil.FormatZeroCodeString(n, 2);

            if (halfTime == false)
            {
                temp += ":00 ~ " + temp + ":30";
            }
            else
            {
                string addtemp = AdobeUtil.FormatZeroCodeString(n + 1, 2);
                if (n >= 23)
                {
                    addtemp = "00";
                }
                temp += ":30 ~ " + addtemp + ":00";
            }
            return(temp);
        }
Ejemplo n.º 2
0
        public static string GetHTMLString(System.Data.DataTable dt)
        {
            StringBuilder htmlString = new StringBuilder();

            htmlString.Append("{Items:[");
            int index = 0;

            foreach (DataRow getRow in dt.Rows)
            {
                string getId   = AdobeUtil.IngoreNull(getRow["Id"]);
                string getText = AdobeUtil.IngoreNull(getRow["Text"]);
                if (index++ > 0)
                {
                    htmlString.Append(",");
                }
                htmlString.Append("{'UUID':'" + getId + "','DisplayText':'" + getText + "'}");
            }
            htmlString.Append("]}");
            return(htmlString.ToString());
        }