using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using TopWinCMS.BLL;

using System.IO;

namespace TopWinCMS.WebUI.Admin.Common
{
    public partial class WorkStat : System.Web.UI.Page
    {
        protected string _ContentName;
        int ModelID;
        protected void Page_Load(object sender, EventArgs e)
        {
            ModelID = int.Parse(Request["ModelID"]);
            _ContentName = ModelManage.GetContentName(ModelID);
            if (!IsPostBack)
            {
                RightsCheck.CheckWorkRight("OP", true);
                BindList(DateTime.Now);
            }

           

        }


        private void BindList(DateTime dt)
        {
            new WorkStatDiaryManage().Total(Repeater1, ModelID, dt);

            if (this.Repeater1.Items.Count == 0)
            {
                Nodata.InnerText = dt.ToShortDateString() + " 没有统计数据";
            }
            else
            {
                Nodata.InnerText = "";
            }
        }
        protected void Calendar1_SelectionChanged(object sender, EventArgs e)
        {
            BindList(Calendar1.SelectedDate);

        }
    }
}