示例#1
0
 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");
     }
 }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.lblIP.Text = Pub.GetRealIP();

                SystemVersionBLL objVersionBll = new SystemVersionBLL();
                this.lblVersion.Text = objVersionBll.GetVersion().ToString("0.0");

                int employeeID = PrjPub.CurrentStudent.EmployeeID;
                if (employeeID > 0)
                {
                    Grid1DataBind(employeeID);
                    Grid2DataBind(employeeID);
                    Grid3DataBind(employeeID);
                    Grid4DataBind(employeeID);
                }
            }
        }
示例#3
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");
                    }
                }
            }
        }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("EmployeeDesktop.aspx");
                    return;
                }

                if (PrjPub.CurrentLoginUser.IsDangan)
                {
                    Response.Redirect("DanganDesktop.aspx");
                    return;
                }

                if (PrjPub.HasEditRight("成绩查询"))
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
                if (PrjPub.HasEditRight("考试监控"))
                {
                    HfUpdateRightControl.Value = "True";
                }
                else
                {
                    HfUpdateRightControl.Value = "False";
                }

                if (PrjPub.HasEditRight("培训计划"))
                {
                    HfUpdateRightPlan.Value = "True";
                }
                else
                {
                    HfUpdateRightPlan.Value = "False";
                }


                if (PrjPub.IsServerCenter)
                {
                    hfNowOrgID.Value = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                    if (PrjPub.CurrentLoginUser.IsAdmin && PrjPub.CurrentLoginUser.UseType == 0)
                    {
                        hfIsAdminControl.Value = "True";
                    }
                    else
                    {
                        hfIsAdminControl.Value = "False";
                    }
                    hfIsAdmin.Value = "True";
                }
                else
                {
                    hfNowOrgID.Value = ConfigurationManager.AppSettings["StationID"].ToString();
                    if ((PrjPub.CurrentLoginUser.IsAdmin && PrjPub.CurrentLoginUser.UseType == 0) || (PrjPub.CurrentLoginUser.IsAdmin && PrjPub.CurrentLoginUser.UseType == 1 && PrjPub.CurrentLoginUser.StationOrgID.ToString() == hfNowOrgID.Value))
                    {
                        hfIsAdminControl.Value = "True";
                    }
                    else
                    {
                        hfIsAdminControl.Value = "False";
                    }
                    if ((PrjPub.CurrentLoginUser.StationOrgID.ToString() == hfNowOrgID.Value) || PrjPub.CurrentLoginUser.UseType == 0)
                    {
                        hfIsAdmin.Value = "True";
                    }
                    else
                    {
                        hfIsAdmin.Value = "False";
                    }
                }

                lblIP.Text = Pub.GetRealIP();

                SystemVersionBLL objVersionBll = new SystemVersionBLL();
                if (PrjPub.IsServerCenter)
                {
                    this.lblVersion.Text = objVersionBll.GetVersion().ToString("0.0");
                    EmployeeTransferBLL      objTrasferBll = new EmployeeTransferBLL();
                    IList <EmployeeTransfer> objList       = objTrasferBll.GetEmployeeTransferToByOrgID(PrjPub.CurrentLoginUser.StationOrgID);
                    lblVersion.Text = lblVersion.Text + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + "当前有" + objList.Count + "位员工需要调入";

                    int orgID = PrjPub.CurrentLoginUser.StationOrgID;
                    grdEntity2Bind(orgID);
                    BindGridEmp();
                    BindGrdPlan();
                }
                else
                {
                    this.lblVersion.Text = "<a href=# onclick='showVersion()' >" + objVersionBll.GetVersion().ToString("0.0") + "</a>";
                }
            }

            string strRefresh = Request.Form.Get("Refresh");

            if (strRefresh != null && strRefresh != "")
            {
                examsGrid.DataBind();
                Grid1.DataBind();
            }


            if (Request.Form.Get("RefreshComp") != null && Request.Form.Get("RefreshComp") == "true")
            {
                int orgID = PrjPub.CurrentLoginUser.StationOrgID;
                grdEntity2Bind(orgID);
            }
            if (Request.Form.Get("RefreshEmp") != null && Request.Form.Get("RefreshEmp") == "true")
            {
                BindGridEmp();
            }
            BindGrdPlan();
            BindGridUpdate();
        }