Example #1
0
    /// <summary>
    /// 一周安排new两天
    /// </summary>
    public string PageBind()
    {
        string htmlSource = string.Empty;

        Tunnel.BLL.Tunnel_Index          tbll   = new Tunnel.BLL.Tunnel_Index();
        Tunnel.Model.Tunnel_index        model  = new Tunnel.Model.Tunnel_index();
        List <Tunnel.Model.Tunnel_index> txList = tbll.GetModelList("id=(select max(id) from tunnel_index where typeid=30 and del=0)");

        if (txList.Count > 0)
        {
            model = txList[0];
            if (Math.Abs(Convert.ToDateTime(model.SetDate).Subtract(DateTime.Now).Days) < 2)
            {
                htmlSource = "<font color='red'>new !</font>";
            }
        }
        else
        {
            htmlSource = "";
        }
        return(htmlSource);
    }