private void BindExamCategoryTree()
        {
            ExamCategoryBLL examCategoryBLL = new ExamCategoryBLL();

            IList <RailExam.Model.ExamCategory> examCategoryList = examCategoryBLL.GetExamCategories();

            Pub.BuildComponentArtTreeView(tvExamCategory, (IList)examCategoryList, "ExamCategoryId",
                                          "ParentId", "CategoryName", "CategoryName", "IdPath", null, null, null);
        }
예제 #2
0
        private void BindExamCategoryTree()
        {
            ExamCategoryBLL examCategoryBLL = new ExamCategoryBLL();

            //IList<RailExam.Model.ExamCategory> examCategoryList = examCategoryBLL.GetExamCategories(
            //                                    0, 0, "", 0, 0, "", "", "", false, 0, 200, "ExamCategoryId ASC");

            IList <RailExam.Model.ExamCategory> examCategoryList = examCategoryBLL.GetExamCategories();

            Pub.BuildComponentArtTreeView(tvExamCategory, (IList)examCategoryList, "ExamCategoryId",
                                          "ParentId", "CategoryName", "CategoryName", "ExamCategoryId", null, null, null);

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

                ViewState["mode"] = Request.QueryString.Get("mode");
                hfMode.Value      = ViewState["mode"].ToString();

                dateBeginTime.DateValue = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                dateEndTime.DateValue   = DateTime.Now.AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss");

                string ExamCategoryID = Request.QueryString.Get("ExamCategoryIDPath");

                if (ExamCategoryID == "0")
                {
                    ExamCategoryID = "/1";
                }

                if (!string.IsNullOrEmpty(ExamCategoryID))
                {
                    string[] str1 = ExamCategoryID.Split(new char[] { '/' });

                    int nID = int.Parse(str1[str1.LongLength - 1].ToString());

                    hfCategoryId.Value = nID.ToString();
                    ExamCategoryBLL pcl = new ExamCategoryBLL();

                    RailExam.Model.ExamCategory pc = pcl.GetExamCategory(nID);

                    txtCategoryName.Text = pc.CategoryName;
                }


                string strExamID = Request.QueryString.Get("id");
                if (!string.IsNullOrEmpty(strExamID))
                {
                    FillPage(int.Parse(strExamID));
                }
            }
        }
예제 #4
0
        public bool tvExamCategoryNodeMove(int examCategoryId, string direction)
        {
            ExamCategoryBLL examCategoryBLL = new ExamCategoryBLL();

            if (direction.ToUpper() == "UP")
            {
                return(examCategoryBLL.MoveUp(examCategoryId));
            }
            else if (direction.ToUpper() == "DOWN")
            {
                return(examCategoryBLL.MoveDown(examCategoryId));
            }
            else
            {
                SessionSet.PageMessage = "未知移动方向!";
            }

            return(false);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hfOrgID.Value          = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                ViewState["mode"]      = Request.QueryString.Get("mode");
                ViewState["startmode"] = Request.QueryString.Get("startmode");
                hfMode.Value           = ViewState["mode"].ToString();

                _isWuhan     = PrjPub.IsWuhan();
                _isWuhanOnly = PrjPub.IsWuhanOnly();

                dateBeginTime.DateValue = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                dateEndTime.DateValue   = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd HH:mm:ss");

                string ExamCategoryID = Request.QueryString.Get("ExamCategoryIDPath");

                if (ExamCategoryID == "0")
                {
                    ExamCategoryID = "";
                }

                if (!string.IsNullOrEmpty(ExamCategoryID))
                {
                    string[] str1 = ExamCategoryID.Split(new char[] { '/' });

                    int nID = int.Parse(str1[str1.LongLength - 1].ToString());

                    hfCategoryId.Value = nID.ToString();
                    ExamCategoryBLL pcl = new ExamCategoryBLL();

                    RailExam.Model.ExamCategory pc = pcl.GetExamCategory(nID);

                    txtCategoryName.Text = pc.CategoryName;
                }

                OracleAccess db     = new OracleAccess();
                string       strSql = "select * from Random_Exam_Modular_Type order by Level_Num";
                DataSet      ds     = db.RunSqlDataSet(strSql);

                ListItem item = new ListItem();
                item.Text  = "--请选择--";
                item.Value = "0";
                ddlModularType.Items.Add(item);

                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    item       = new ListItem();
                    item.Text  = dr["Random_Exam_Modular_Type_Name"].ToString();
                    item.Value = dr["Random_Exam_Modular_Type_ID"].ToString();
                    ddlModularType.Items.Add(item);
                }


                string strExamID = Request.QueryString.Get("id");
                if (!string.IsNullOrEmpty(strExamID))
                {
                    FillPage(int.Parse(strExamID));
                }
                else
                {
                    rbnStyle2.Checked     = true;
                    saveTd.Visible        = true;
                    ddlDate.SelectedValue = "1";
                    dateSaveDate.Visible  = false;

                    SetTrainClassVisible(false);
                }
            }

            if (hfPostID.Value != "")
            {
                txtPost.Text = hfPostName.Value;
            }

            if (hfCategoryId.Value != "")
            {
                ExamCategoryBLL             pcl = new ExamCategoryBLL();
                RailExam.Model.ExamCategory pc  = pcl.GetExamCategory(Convert.ToInt32(hfCategoryId.Value));
                txtCategoryName.Text = pc.CategoryName;
            }

            chkHasTrainClass.Attributes.Add("onclick", "chkHasTrainClassOnchange();");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }
                ViewState["mode"]      = Request.QueryString.Get("mode");
                ViewState["startmode"] = Request.QueryString.Get("startmode");
                hfMode.Value           = ViewState["mode"].ToString();

                dateBeginTime.DateValue = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                dateEndTime.DateValue   = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd HH:mm:ss");

                string ExamCategoryID = Request.QueryString.Get("ExamCategoryIDPath");

                if (ExamCategoryID == "0")
                {
                    ExamCategoryID = "";
                }

                if (!string.IsNullOrEmpty(ExamCategoryID))
                {
                    string[] str1 = ExamCategoryID.Split(new char[] { '/' });

                    int nID = int.Parse(str1[str1.LongLength - 1].ToString());

                    hfCategoryId.Value = nID.ToString();
                    ExamCategoryBLL pcl = new ExamCategoryBLL();

                    RailExam.Model.ExamCategory pc = pcl.GetExamCategory(nID);

                    txtCategoryName.Text = pc.CategoryName;
                }


                string strExamID = Request.QueryString.Get("id");
                if (!string.IsNullOrEmpty(strExamID))
                {
                    FillPage(int.Parse(strExamID));
                }
                else
                {
                    ViewState["OrgID"] = PrjPub.CurrentLoginUser.StationOrgID.ToString();
                    SetTrainClassVisible(false);
                }

                if (PrjPub.IsServerCenter)
                {
                    hfIsShowTrainClass.Value = ConfigurationManager.AppSettings["IsShowTrainClass"];
                }
                else
                {
                    hfIsShowTrainClass.Value = "1";
                }
            }
            //else
            //{
            //    if(!string.IsNullOrEmpty(hfPostID.Value))
            //    {
            //        PostBLL postBLL = new PostBLL();
            //        string[] str = hfPostID.Value.Split(',');
            //        for(int i=0; i< str.Length; i++)
            //        {
            //            if(i==0)
            //            {
            //                txtPost.Text = postBLL.GetPost(Convert.ToInt32(str[i])).PostName;
            //            }
            //            else
            //            {
            //                txtPost.Text = txtPost.Text + "," + postBLL.GetPost(Convert.ToInt32(str[i])).PostName;
            //            }
            //        }
            //    }
            //}

            if (hfPostID.Value != "")
            {
                txtPost.Text = hfPostName.Value;
            }

            chkHasTrainClass.Attributes.Add("onclick", "chkHasTrainClassOnchange();");
        }