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

namespace HySoft.BaseCallCenter.Web.telmanage
{
    public partial class callblacklist : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 计算屏蔽时间（单位：分钟）
        /// </summary>
        /// <param name="endTime">解除时间</param>
        /// <param name="startTime">开始时间</param>
        /// <returns></returns>
        public string CountMinutes(object endTime, object startTime)
        {
            if (endTime is DBNull && startTime is DBNull)
            {
                return "0";
            }
            else
            {
                TimeSpan ts = Convert.ToDateTime(endTime) - Convert.ToDateTime(startTime);
                string d = ts.TotalMinutes.ToString();
                return d;
            }

        }
    }
}