protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SystemVersionBLL objBll = new SystemVersionBLL(); lblVersion.Text = objBll.GetVersion().ToString("0.0"); lblVersionCenter.Text = objBll.GetVersionToServer().ToString("0.0"); } }
protected void Page_Load(object sender, EventArgs e) { Session.Abandon(); //if (!PrjPub.IsServerCenter) //{ // RefreshSnapShotBLL objBll = new RefreshSnapShotBLL(); // if (!objBll.IsExistsRefreshSnapShot("BOOK", "MATERIALIZED VIEW")) // { // Response.Redirect("RefreshDataDefault.aspx?Type=teacher"); // } //} //if(PrjPub.IsEvaluation) //{ // DateTime strEnd = Convert.ToDateTime(PrjPub.EvaluationDate); // if(DateTime.Today > strEnd) // { // Response.Write(ViewState["OverTime"].ToString()); // } //} if (!PrjPub.IsServerCenter) { try { //if (PrjPub.IsWuhan()) //{ // SynchronizeLogBLL objlogbll = new SynchronizeLogBLL(); // IList<SynchronizeLog> objList = // objlogbll.GetSynchronizeLogByOrgIDAndTypeID(Convert.ToInt32(ConfigurationManager.AppSettings["StationID"]), 6); // if (objList.Count == 0) // { // Response.Redirect("/RailExamBao/Common/OtherError.aspx?error=请先使用同步器上传成绩答卷后,再使用本系统"); // } // else // { // foreach (SynchronizeLog log in objList) // { // if (DateTime.Today.Year == log.BeginTime.Year) // { // if (DateTime.Today.Month > log.BeginTime.Month && DateTime.Today.Day > 25) // { // Response.Redirect("/RailExamBao/Common/OtherError.aspx?error=请先使用同步器上传成绩答卷后,再使用本系统"); // } // } // else if (DateTime.Today.Year > log.BeginTime.Year) // { // if (DateTime.Today.Day > 25) // { // Response.Redirect("/RailExamBao/Common/OtherError.aspx?error=请先使用同步器上传成绩答卷后,再使用本系统"); // } // } // } // } //} try { OracleAccess oaCenter = new OracleAccess(ConfigurationManager.ConnectionStrings["OracleCenter"].ConnectionString); string sql = "select * from Org where org_id=1"; DataSet ds = oaCenter.RunSqlDataSet(sql); SystemVersionBLL objSystemBll = new SystemVersionBLL(); if (objSystemBll.GetVersion() != objSystemBll.GetVersionToServer()) { ClientScript.RegisterStartupScript(GetType(), "jsSelectFirstNode", @"ShowInfo();", true); } } catch { if (ConfigurationManager.AppSettings["StationID"].ToString() == "") { Response.Redirect("RefreshDataDefault.aspx?Type=teacher"); } } if (ConfigurationManager.AppSettings["StationID"].ToString() == "") { Response.Redirect("RefreshDataDefault.aspx?Type=teacher"); } } catch { if (ConfigurationManager.AppSettings["StationID"].ToString() == "") { Response.Redirect("RefreshDataDefault.aspx?Type=teacher"); } } } }