Ejemplo n.º 1
0
        private void BindGrid()
        {
            EmployeeTransferBLL      objBll  = new EmployeeTransferBLL();
            IList <EmployeeTransfer> objList = objBll.GetEmployeeTransferToByOrgID(PrjPub.CurrentLoginUser.StationOrgID);

            grdEntity.DataSource = objList;
            grdEntity.DataBind();
        }
Ejemplo n.º 2
0
        private void BindGridEmp()
        {
            EmployeeTransferBLL      objBll  = new EmployeeTransferBLL();
            IList <EmployeeTransfer> objList = objBll.GetEmployeeTransferToByOrgID(PrjPub.CurrentLoginUser.StationOrgID);

            grdEmployee.DataSource = objList;
            grdEmployee.DataBind();

            if (objList.Count != 0)
            {
                TabStrip2.Tabs[2].Text = "职员调入提醒(" + objList.Count + ")";
            }
        }
Ejemplo n.º 3
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();
        }