public void GetHtmlTime(HttpContext context)
        {
            DateTime dt = PublicMethod.ServerTime();

            context.Response.Write(dt.ToString());//返回给前台页面
            context.Response.End();
        }
        private void SetViewTime()
        {
            dtpBeginDate = PublicMethod.ServerTime().Date.AddSeconds(1);
            dtpEndDate   = PublicMethod.ServerTime().Date.AddHours(23).AddMinutes(59).AddSeconds(59);

            //dtpBeginDate = Convert.ToDateTime("2018-01-16 00:00:01");
            //dtpEndDate = Convert.ToDateTime("2018-01-16 23:59:59");
        }
示例#3
0
        /// <summary>
        ///     插入表头
        /// </summary>
        private void insertTitle()
        {
            if (countPage == 0)
            {
                currentPage = 0;
            }
            string titleStr = "";

            titleStr += "<tr style='background:black;color:white;margin-bottom:6px;font-size:40px;font-weight:bold;font-family:\"" + fontFamily + "\";'>";
            titleStr += "<td colspan='9' align='center' valign='middle' height='10%' style='padding:6px;'>";
            titleStr += "<DIV style='left:10px; top: 22px; position: absolute;color:" + titleBgColor + ";font-size:" + fontSize + ";'>" + WebConfigurationManager.AppSettings["BigScreenHospitalName"].ToString();
            titleStr += "</DIV>今日手术<DIV style='right: 10px; top: 22px; position: absolute;color:" + titleBgColor + ";font-size:" + fontSize + ";'>" + PublicMethod.ServerTime().ToString("yyyy-MM-dd HH:mm") + "\n(第" + currentPage + "屏/共" + countPage + "屏)  </DIV></TD></tr>";
            body      = body.Replace("{title}", titleStr);
        }
示例#4
0
 private void SetViewTime()
 {
     _beginDate = PublicMethod.ServerTime().Date.AddSeconds(1);
     _endDate   = PublicMethod.ServerTime().Date.AddHours(23).AddMinutes(59).AddSeconds(59);
 }