Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("考场规则"))
                {
                    btnSave.Enabled = true;
                }
                else
                {
                    btnSave.Enabled = false;
                }

                string       strSql = "select * from System_Exam where System_Exam_ID=1";
                OracleAccess db     = new OracleAccess();
                DataTable    dt     = db.RunSqlDataSet(strSql).Tables[0];

                if (dt.Rows.Count == 0)
                {
                    txtMesage.Text = string.Empty;
                    txtTime.Text   = string.Empty;
                    txtNumber.Text = string.Empty;
                }
                else
                {
                    txtMesage.Text = dt.Rows[0]["Exam_Message"].ToString();
                    txtTime.Text   = dt.Rows[0]["Exam_Time"].ToString();
                    txtNumber.Text = dt.Rows[0]["Exam_Number"].ToString();
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                if (PrjPub.HasEditRight("培训类别") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
                if (PrjPub.HasDeleteRight("培训类别") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }

                BindTrainTypeTree();
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("站段服务器信息") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                if (PrjPub.HasDeleteRight("站段服务器信息") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }

                string orgID = Request.QueryString.Get("OrgID");
                if (!String.IsNullOrEmpty(orgID))
                {
                    this.hfSelectOrg.Value = orgID;
                    BindGrid();
                }
            }
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("职员管理") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
                if (PrjPub.HasDeleteRight("职员管理") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }

                string       strSql = @"select b.Employee_ID as EmployeeID,b.Employee_Name as EmployeeName,b.Work_No as WorkNo,
                                    GetOrgName(b.Org_ID) as OrgName,d.Post_Name as PostName,c.Role_Name as RoleName
                                    from system_user a 
                                    inner join employee b on a.employee_id=b.employee_id 
                                    inner join system_role c on a.Role_ID=c.Role_ID 
                                    inner join Post d on b.Post_ID=d.Post_ID
                                    where GetStationOrgID(b.Org_ID)=" + Request.QueryString.Get("id") + " and a.Role_ID>0 order by a.Role_ID";
                OracleAccess oa     = new OracleAccess();
                DataSet      ds     = oa.RunSqlDataSet(strSql);

                Grid1.DataSource = ds;
                Grid1.DataBind();
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                tvInformation.Nodes.Clear();
                GenerateInformationTree(null);

                if (PrjPub.HasEditRight("资料领域") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
                if (PrjPub.HasDeleteRight("资料领域") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                if (PrjPub.HasEditRight("职员管理") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                hfRole.Value = PrjPub.CurrentLoginUser.RoleID.ToString();

                BindOrganizationTree();
            }

            if (hfRefresh.Value != "")
            {
                DownloadExcel(hfRefresh.Value);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("¸¨µ¼½Ì²Ä") && PrjPub.IsServerCenter && PrjPub.CurrentLoginUser.SuitRange == 1)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                BindDdl();

                DateTime                 start   = new DateTime(2000, 1, 1);
                DateTime                 end     = new DateTime(2100, 12, 31);
                AssistBookUpdateBLL      objBll  = new AssistBookUpdateBLL();
                IList <AssistBookUpdate> objList = objBll.GetAssistBookUpdateBySelect(0, "", "", start, end, "");
                dgUpdate.DataSource = objList;
                dgUpdate.DataBind();
            }

            string strRefreshGrid = Request.Form.Get("RefreshGrid");

            if (strRefreshGrid != null & strRefreshGrid != "")
            {
                BindGrid();
            }
        }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }
                BindKnowledgeTree();
                BindTrainTypeTree();
                BindPost();
                if (PrjPub.HasEditRight("教材管理") && PrjPub.IsServerCenter)                 //&& PrjPub.CurrentLoginUser.SuitRange == 1
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
            }

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

            if (!string.IsNullOrEmpty(strRefresh))
            {
                BindKnowledgeTree();
                BindTrainTypeTree();
                BindPost();
            }
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //if (PrjPub.IsServerCenter && PrjPub.CurrentLoginUser.SuitRange != 1)
                //{
                //    HfUpdateRight.Value = "False";
                //}
                //else
                //{
                //    HfUpdateRight.Value = PrjPub.HasEditRight("考试设计").ToString();
                //}

                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统");
                    return;
                }

                if (PrjPub.HasEditRight("新增考试") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                BindExamCategoryTree();
            }
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                BindInformationSystem();
                BindInformationLevel();
                if (PrjPub.HasEditRight("资料查阅") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
            }

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

            if (!string.IsNullOrEmpty(strRefresh))
            {
                BindInformationSystem();
                BindInformationLevel();
            }
        }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("课件管理") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
                if (PrjPub.HasDeleteRight("课件管理") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }
            }

            BindCoursewareTypeTree();
            BindTrainTypeTree();
        }
Ejemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("微机教室信息") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                if (PrjPub.HasDeleteRight("微机教室信息") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }

                //string orgid  =  Request.QueryString["id"];
                //initComputerRoomInfo(orgid);
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("../Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                string strQuery = Request.QueryString.Get("strQuery");
                if (string.IsNullOrEmpty(strQuery))
                {
                    GetSql();
                }
                else
                {
                    string[] str = strQuery.Split('|');

                    if (!string.IsNullOrEmpty(str[0]))
                    {
                        hfSelectOrg.Value = str[0];
                        OrganizationBLL orgbll = new OrganizationBLL();
                        txtOrg.Text = orgbll.GetOrganization(Convert.ToInt32(str[0])).ShortName;
                    }

                    txtCOMPUTER_ROOM.Text = str[1];
                    txtAddress.Text       = str[2];
                    ddl.SelectedValue     = str[3];
                    btnQuery_Click(null, null);
                }

                hfOrgID.Value  = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                hfRoleID.Value = PrjPub.CurrentLoginUser.RoleID.ToString();
            }
        }
Ejemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("考试监控"))
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

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

                hfServerNo.Value = PrjPub.ServerNo.ToString();
            }

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

            if (strRefresh != null && strRefresh != "")
            {
                //RandomExamBLL objBll = new RandomExamBLL();
                //IList<RailExam.Model.RandomExam> objList = objBll.GetControlRandomExamsInfo(SessionSet.OrganizationID);
                //examsGrid.DataSource = objList;
                examsGrid.DataBind();
            }

            if (Request.Form.Get("StudentInfo") != null && Request.Form.Get("StudentInfo") != "")
            {
                DownloadStudentInfoExcel(Request.Form.Get("StudentInfo"));
            }
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindGrid();

                hfDelete.Value = PrjPub.HasDeleteRight("培训类别").ToString();
                hfUpdate.Value = PrjPub.HasEditRight("培训类别").ToString();
            }
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }
                if (PrjPub.HasEditRight("试卷信息") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
                if (PrjPub.HasDeleteRight("试卷信息") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }
                hfOrgID.Value           = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                HfPaperCategoryId.Value = Request.QueryString.Get("id");
            }

            if (IsPostBack)
            {
                string strDeleteID = Request.Form.Get("DeleteID");
                if (!string.IsNullOrEmpty(strDeleteID))
                {
                    DeleteData(int.Parse(strDeleteID));
                    Grid1.DataBind();
                }

                if (Request.Form.Get("Refresh") == "true")
                {
                    Grid1.DataBind();
                }

                if (Request.Form.Get("OutPut") != null && Request.Form.Get("OutPut") != "")
                {
                    OutputData(Request.Form.Get("OutPut"));
                }

                if (Request.Form.Get("strategyID") != null && Request.Form.Get("strategyID") != "")
                {
                    DeleteStrategyData(Request.Form.Get("strategyID"));
                    Grid1.DataBind();
                }
            }
        }
Ejemplo n.º 16
0
        protected void grdEntity_RowDataBoundDataRow(object sender, GridViewRowEventArgs e)
        {
            HiddenField OrgIDs       = (HiddenField)e.Row.FindControl("hidOrgID");
            HiddenField UnitID       = (HiddenField)e.Row.FindControl("hidUnitID");
            HiddenField hidMaiUnitID = (HiddenField)e.Row.FindControl("hidMaiUnitID");

            System.Web.UI.HtmlControls.HtmlGenericControl spanUp   = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Row.FindControl("spanUp");   //上报
            System.Web.UI.HtmlControls.HtmlGenericControl addPlan  = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Row.FindControl("add");      //修改
            System.Web.UI.HtmlControls.HtmlGenericControl spanView = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Row.FindControl("spanView"); //查看

            LinkButton delete = (LinkButton)e.Row.FindControl("btnDelete");

            if (UnitID.Value.Equals(PrjPub.CurrentLoginUser.StationOrgID.ToString()))
            {
                spanView.Visible = true;
                addPlan.Visible  = false;
                delete.Visible   = false;
            }

            if (hidMaiUnitID.Value.Equals(PrjPub.CurrentLoginUser.StationOrgID.ToString()))
            {
                spanView.Visible = true;
                addPlan.Visible  = true;
                delete.Visible   = true;
            }
            else
            {
                addPlan.Visible = false;
                delete.Visible  = false;
            }

            string[] arrOrgs = OrgIDs.Value.Split(',');
            foreach (string str in arrOrgs)
            {
                if (str.Equals(PrjPub.CurrentLoginUser.StationOrgID.ToString()))
                {
                    spanUp.Visible = true;
                    break;
                }
                else
                {
                    spanUp.Visible = false;
                }
            }

            if (!(PrjPub.HasEditRight("培训计划") && PrjPub.IsServerCenter))
            {
                addPlan.Visible = false;
            }
            if (!(PrjPub.HasDeleteRight("培训计划") && PrjPub.IsServerCenter))
            {
                delete.Visible = false;
            }
        }
Ejemplo n.º 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (PrjPub.IsServerCenter && SessionSet.OrganizationID != 1)
         {
             HfUpdateRight.Value = "False";
         }
         else
         {
             HfUpdateRight.Value = PrjPub.HasEditRight("考试成绩").ToString();
         }
     }
 }
Ejemplo n.º 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                string employeeId = PrjPub.CurrentLoginUser.EmployeeID.ToString();
                string orgId = PrjPub.CurrentLoginUser.OrgID.ToString();
                string stationId = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                string hasEdit = string.Empty, deleteEdit = string.Empty;
                string employeeName = PrjPub.CurrentLoginUser.EmployeeName;
                string orgName      = PrjPub.CurrentLoginUser.OrgName;
                string suitRange    = PrjPub.CurrentLoginUser.SuitRange.ToString();
                string strSession;

                string page    = string.Empty;
                string strtype = Request.QueryString.Get("type");
                if (strtype == "1")
                {
                    hasEdit    = PrjPub.HasEditRight("资料体系").ToString();
                    deleteEdit = PrjPub.HasDeleteRight("资料体系").ToString();

                    page = "knowledge/knowledge.aspx";
                }
                else if (strtype == "2")
                {
                    hasEdit    = PrjPub.HasEditRight("资料类别").ToString();
                    deleteEdit = PrjPub.HasDeleteRight("资料类别").ToString();

                    page = "Train/TrainTypes.aspx";
                }
                else if (strtype == "3")
                {
                    hasEdit    = PrjPub.HasEditRight("资料管理").ToString();
                    deleteEdit = PrjPub.HasDeleteRight("资料管理").ToString();

                    page = "Book/Book.aspx";
                }

                strSession = employeeId + "|" + orgId + "|" + stationId + "|" + hasEdit + "|" + deleteEdit + "|" +
                             employeeName + "|" + orgName + "|" + suitRange;

                Response.Redirect("/RailExam/" + page + "?type=1&strSession=" + strSession);
            }
        }
Ejemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }
                HfUpdateRight.Value = PrjPub.HasEditRight("信息公告").ToString();
                HfDeleteRight.Value = PrjPub.HasDeleteRight("信息公告").ToString();


                ListItem Li = new ListItem();
                Li.Value = "0";
                Li.Text  = "请选择!";
                ddlImportanceName.Items.Add(Li);

                ImportanceBLL importanceBLL = new ImportanceBLL();

                IList <Importance> importances = importanceBLL.GetImportances();
                if (importances != null)
                {
                    foreach (Importance importance in importances)
                    {
                        Li       = new ListItem();
                        Li.Value = importance.ImportanceID.ToString();
                        Li.Text  = importance.ImportanceName;
                        ddlImportanceName.Items.Add(Li);
                    }
                }

                BindGrid();
            }
            else
            {
                string strDeleteID = Request.Form.Get("DeleteID");
                if (!string.IsNullOrEmpty(strDeleteID))
                {
                    DeleteData(int.Parse(strDeleteID));
                    BindGrid();
                }

                if (Request.Form.Get("Refresh") == "true")
                {
                    BindGrid();
                }
            }
        }
Ejemplo n.º 20
0
        protected void grdEntity_RowDataBoundDataRow(object sender, GridViewRowEventArgs e)
        {
            System.Web.UI.HtmlControls.HtmlGenericControl addPlan  = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Row.FindControl("add");      //修改
            System.Web.UI.HtmlControls.HtmlGenericControl spanView = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Row.FindControl("spanView"); //查看
            LinkButton delete = (LinkButton)e.Row.FindControl("btnDelete");

            if (!(PrjPub.HasEditRight("培训班管理") && PrjPub.IsServerCenter))
            {
                addPlan.Visible = false;
            }
            if (!(PrjPub.HasDeleteRight("培训班管理") && PrjPub.IsServerCenter))
            {
                delete.Visible = false;
            }
        }
Ejemplo n.º 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (PrjPub.HasEditRight("试卷信息") && PrjPub.IsServerCenter)
         {
             HfUpdateRight.Value = "True";
         }
         else
         {
             HfUpdateRight.Value = "False";
         }
         BindPaperCategoryTree();
     }
 }
Ejemplo n.º 22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request.QueryString.Get("id");
                if (!String.IsNullOrEmpty(id))
                {
                    hfTypeID.Value = id;
                    BindGrid(id);
                }

                hfDelete.Value = PrjPub.HasDeleteRight("培训项目").ToString();
                hfUpdate.Value = PrjPub.HasEditRight("培训项目").ToString();
            }
        }
Ejemplo n.º 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                OrgList.SelectedIndex = 0;
                BindGrid(0);
                if (PrjPub.HasDeleteRight("数据字典") && PrjPub.CurrentLoginUser.IsAdmin)                //&& PrjPub.CurrentLoginUser.UseType == 0
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }
                if (PrjPub.HasEditRight("数据字典") && PrjPub.CurrentLoginUser.IsAdmin)                //&& PrjPub.CurrentLoginUser.UseType == 0
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
            }

            //上移
            //string editUpID = Request.Form.Get("UpID");
            //string editDownID = Request.Form.Get("DownID");
            //if(!string.IsNullOrEmpty(editUpID))
            //{
            //    UpData(editUpID);
            //}

            ////下移
            //else if (!string.IsNullOrEmpty(editDownID))
            //{
            //    DownData(editDownID);
            //}

            //新增和修改过后刷新数据
            //if (Request.Form.Get("Refresh") == "true")
            //{
            //    //BindGrid(OrgList.SelectedIndex);
            //    gridCallBack_Callback(null, null);
            //}

            //为orglist添加onchange事件
            OrgList.Attributes.Add("onchange", "OrgList_onChange()");
        }
Ejemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hfIsWuhan.Value = PrjPub.IsWuhan().ToString();
                if (PrjPub.HasEditRight("教材管理") && PrjPub.IsServerCenter)                //&& PrjPub.CurrentLoginUser.SuitRange == 1
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                if (PrjPub.HasDeleteRight("教材管理") && PrjPub.IsServerCenter)
                {
                    HasDeleteRight.Value = "True";
                }
                else
                {
                    HasDeleteRight.Value = "False";
                }

                BindDdl();

                DateTime           start   = new DateTime(2000, 1, 1);
                DateTime           end     = new DateTime(2100, 12, 31);
                BookUpdateBLL      objBll  = new BookUpdateBLL();
                IList <BookUpdate> objList = objBll.GetBookUpdateBySelect(0, "", "", start, end, "");
                dgUpdate.DataSource = objList;
                dgUpdate.DataBind();
            }
            string strRefreshGrid = Request.Form.Get("RefreshGrid");

            if (strRefreshGrid != null & strRefreshGrid != "")
            {
                BindGrid();
            }

            string strID = Request.Form.Get("DeleteID");

            if (strID != null & strID != "")
            {
                BookUpdateBLL objBll = new BookUpdateBLL();
                objBll.DeleteBookUpdate(Convert.ToInt32(strID));
                BindGrid();
            }
        }
Ejemplo n.º 25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (PrjPub.IsServerCenter && SessionSet.OrganizationID != 1)
         {
             HfUpdateRight.Value = "False";
             HfDeleteRight.Value = "False";
         }
         else
         {
             HfUpdateRight.Value = PrjPub.HasEditRight("试卷类别").ToString();
             HfDeleteRight.Value = PrjPub.HasDeleteRight("试卷类别").ToString();
         }
         BindPaperCategoryTree();
     }
 }
Ejemplo n.º 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!IsPostBack)
                {
                    if (PrjPub.CurrentLoginUser == null)
                    {
                        Response.Redirect("../Common/Error.aspx?error=Session过期请重新登录本系统!");
                        return;
                    }
                    else
                    {
                        int orgID = PrjPub.CurrentLoginUser.StationOrgID;
                        grdEntity2Bind(orgID);

                        if (PrjPub.HasEditRight("微机教室预订") && PrjPub.IsServerCenter)
                        {
                            HfUpdateRight.Value = "True";
                        }
                        else
                        {
                            HfUpdateRight.Value = "False";
                        }

                        if (PrjPub.HasDeleteRight("微机教室预订") && PrjPub.IsServerCenter)
                        {
                            HfDeleteRight.Value = "True";
                        }
                        else
                        {
                            HfDeleteRight.Value = "False";
                        }
                    }
                }
            }

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

            if (!string.IsNullOrEmpty(strRefresh))
            {
                int orgID = PrjPub.CurrentLoginUser.StationOrgID;
                grdEntity2Bind(orgID);
            }
        }
Ejemplo n.º 27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                if (PrjPub.IsServerCenter && SessionSet.OrganizationID != 1)
                {
                    HfUpdateRight.Value = "False";
                }
                else
                {
                    HfUpdateRight.Value = PrjPub.HasEditRight("手工评卷").ToString();
                }

                hfJudgeId.Value = PrjPub.CurrentLoginUser.EmployeeID.ToString();

                string strId = Request.QueryString.Get("eid");
                hfExamID.Value = strId;
                RailExam.Model.Exam exam = new RailExam.Model.Exam();
                ExamBLL             eBll = new ExamBLL();
                exam = eBll.GetExam(int.Parse(strId));
                TextBoxExamCategory.Text = exam.CategoryName;
                TextBoxExamName.Text     = exam.ExamName;
                TextBoxExamTime.Text     = exam.BeginTime.ToString() + "/" + exam.EndTime.ToString();
            }
            else
            {
                papersGrid.DataBind();
            }


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

            if (strRefresh != null && strRefresh != "")
            {
                papersGrid.DataBind();
            }
        }
Ejemplo n.º 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }
                if (PrjPub.HasEditRight("登记成绩"))
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                if (PrjPub.IsServerCenter)
                {
                    hfOrgID.Value = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                    if (PrjPub.CurrentLoginUser.IsAdmin)
                    {
                        hfIsAdmin.Value = "True";
                    }
                    else
                    {
                        hfIsAdmin.Value = "False";
                    }
                }
                else
                {
                    hfIsAdmin.Value = "False";
                }
            }

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

            if (strRefresh != null && strRefresh != "")
            {
                examsGrid.DataBind();
            }
        }
Ejemplo n.º 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }

                if (PrjPub.HasEditRight("职员调出") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }

                if (PrjPub.HasDeleteRight("职员调出") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }

                BindGrid();
            }

            if (Request.Form.Get("Refresh") != null && Request.Form.Get("Refresh") == "true")
            {
                BindGrid();
            }

            if (Request.Form.Get("DeleteID") != null && Request.Form.Get("DeleteID") != "")
            {
                EmployeeTransferBLL objBll = new EmployeeTransferBLL();
                objBll.DeleteEmployeeTransfer(Convert.ToInt32(Request.Form.Get("DeleteID")));
                BindGrid();
            }
        }
Ejemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.HasEditRight("政策法规") && PrjPub.IsServerCenter)
                {
                    HfUpdateRight.Value = "True";
                }
                else
                {
                    HfUpdateRight.Value = "False";
                }
                if (PrjPub.HasDeleteRight("政策法规") && PrjPub.IsServerCenter)
                {
                    HfDeleteRight.Value = "True";
                }
                else
                {
                    HfDeleteRight.Value = "False";
                }
                BindTree();
            }
            else
            {
                string strDeleteID = Request.Form.Get("DeleteID");

                if (!string.IsNullOrEmpty(strDeleteID))
                {
                    RegulationCategoryBLL regulationCategoryBll = new RegulationCategoryBLL();

                    regulationCategoryBll.DeleteRegulationCategory(int.Parse(strDeleteID));

                    BindTree();
                }

                if (Request.Form.Get("Refresh") == "true")
                {
                    BindTree();
                }
            }
        }