using MESClassLibrary.BLL.Keep;
using MESClassLibrary.BLL.Log;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MESWebSite.Manage
{
    public partial class KeepRecord : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Cookies["LoginUserInfo"] == null)
            {
                Response.Write("<script language=javascript>alert('您的登录信息已过期,请重新登录!');top.location.href='../Login.aspx';</script>");
            }
        }

        [WebMethod]
        public static string GetDate(string VersionID, string KeepTime, string DeviceID, string KeepLevelID)
        {
            try
            {

                KeepRecordBLL bll = new KeepRecordBLL();
                return bll.GetDate(VersionID, KeepTime, DeviceID, KeepLevelID);
            }
            catch (Exception ex)
            {
                LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
                return "";
            }
        }

        [WebMethod]
        public static string GetRecordDate(string PlanID)
        {
            try
            {
                KeepRecordBLL bll = new KeepRecordBLL();
                return bll.GetReportDate(PlanID);
            }
            catch (Exception ex)
            {
                LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
                return "";
            }
        }


        


    }
}