Ejemplo n.º 1
0
    protected void bindType()
    {
        DataTable dt = B_GradeOption.GetGradeList(2, 0);

        Repeater1.DataSource = dt;
        Repeater1.DataBind();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         if (!B_ARoleAuth.Check(ZLEnum.Auth.model, "AddPageModel"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         if (string.IsNullOrEmpty(base.Request.QueryString["ModelID"]))
         {
             function.WriteErrMsg("没有指定要添加字段的模型ID!");
         }
         int ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);
         this.HdfModelID.Value = ModelID.ToString();
         M_ModelInfo model = this.bModel.GetModelById(ModelID);
         this.HdfTableName.Value = model.TableName;
         this.GradeOptionType_Cate.DataSource     = B_GradeOption.GetCateList();
         this.GradeOptionType_Cate.DataTextField  = "CateName";
         this.GradeOptionType_Cate.DataValueField = "CateID";
         this.GradeOptionType_Cate.DataBind();
         this.GradeOptionType_Cate.Items.Insert(0, new ListItem("选择多级选项分类", "0"));
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='PageManage.aspx'>企业黄页</a></li><li><a href='UserModelManage.aspx'>黄页申请设置</a></li><li><a href='UserModelField.aspx?ModelID=" + Request.QueryString["ModelID"] + "'>样式字段列表</a></li><li class='active'>添加[" + model.ModelName + "]字段</li>");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Skey_T.Text = Request.QueryString["Skey"];
         if (NodeID > 0)
         {
             NodeName_L.Text = nodeBll.GetSelect(NodeID).C_ClassName;
         }
         else if (Grade > 0)
         {
             NodeName_L.Text = B_GradeOption.GetGradeOption(Grade).GradeName;
         }
         else
         {
             NodeName_L.Text = "全部试题";
         }
         if (NodeID < 1)
         {
             add_sp.Visible = false;
         }
         MyBind();
         Call.HideBread(Master);
     }
 }
Ejemplo n.º 4
0
        public ActionResult QuestGrade()
        {
            int    CateID   = DataConverter.CLng(Request.QueryString["cate"]);
            string cateName = "题型";
            string paraName = "Grade";

            switch (CateID)
            {
            case 4: cateName = "题型"; break;

            case 5: cateName = "难度"; paraName = "diff"; break;

            case 6: cateName = "年级"; paraName = "Grade"; break;

            case 7: cateName = "教材版本"; paraName = "Version"; break;
            }
            ViewBag.cateName = cateName;
            ViewBag.paraName = paraName;
            PageSetting setting = B_GradeOption.GetGradeList_SPage(CPage, PSize, CateID, 0);

            if (Request.IsAjaxRequest())
            {
                return(PartialView("QuestGrade_List", setting));
            }
            return(View(setting));
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                if (!B_ARoleAuth.Check(ZLEnum.Auth.model, "ModelEdit"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                if (string.IsNullOrEmpty(base.Request.QueryString["FieldID"]))
                {
                    function.WriteErrMsg("没有指定要修改字段的字段ID!");
                }
                int FieldID = DataConverter.CLng(base.Request.QueryString["FieldID"]);
                int ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);

                this.HdfFieldID.Value = FieldID.ToString();
                M_ModelField field = this.bll.GetModelByID(ModelID.ToString(), FieldID);
                //int ModelID = field.ModelID;
                this.m_mdid = ModelID.ToString();
                M_ModelInfo model = this.bModel.GetModelById(ModelID);
                this.Literal1.Text    = model.ModelName;
                Label1.Text           = "当前表:" + model.TableName;
                this.HdfModelID.Value = ModelID.ToString();
                this.GradeOptionType_Cate.DataSource     = B_GradeOption.GetCateList();
                this.GradeOptionType_Cate.DataTextField  = "CateName";
                this.GradeOptionType_Cate.DataValueField = "CateID";
                this.GradeOptionType_Cate.DataBind();
                this.GradeOptionType_Cate.Items.Insert(0, new ListItem("选择多级选项分类", "0"));
                this.GetShow(field);
                Call.SetBreadCrumb(Master, "<li>后台管理</li><li>企业黄页</li><li><a href='/manage/Page/PageModelManage.aspx'>模型管理</a></li><li>修改[" + model.ModelName + "模型]字段</li>");
            }
        }
Ejemplo n.º 6
0
        //分类大全
        public ActionResult Classification()
        {
            AskAuth();
            //string type = "0";
            //if (!string.IsNullOrEmpty(Request.QueryString["type"]))
            //{
            //    type = Server.HtmlEncode(Request.QueryString["type"]);
            //}
            //if (!string.IsNullOrEmpty(Request.QueryString["ParentID"]))  //点击的是小类
            //{
            //    cateid = Server.HtmlEncode(Request.QueryString["ParentID"]);
            //    M_Grade grademod = B_GradeOption.GetGradeOption(DataConvert.CLng(Request.QueryString["ParentID"]));
            //    catename = grademod.GradeName;
            //    DataTable dt2 = B_GradeOption.GetGradeList(2, DataConvert.CLng(Request.QueryString["ParentID"]));
            //    Repeater1.DataSource = dt2;
            //    Repeater1.DataBind();
            //    if (!string.IsNullOrEmpty(Request.QueryString["GradeID"]))
            //    {
            //        gradeid = Server.HtmlEncode(Request.QueryString["GradeID"]);
            //    }

            //    SqlParameter[] sp = new SqlParameter[]
            //    {
            //    new SqlParameter("@gradeid",gradeid)
            //    };
            //    //dt3 = b_Ask.SelPage(type, pageSize, pageIndex, out itemCount, QueType: gradeid);
            //}
            //else if (!string.IsNullOrEmpty(Request.QueryString["GradeID"]))   //点击的是大类
            //{
            //    cateid = Server.HtmlEncode(Request.QueryString["GradeID"]);
            //    M_Grade grademod = B_GradeOption.GetGradeOption(DataConvert.CLng(Request.QueryString["GradeID"]));
            //    catename = grademod.GradeName;
            //    DataTable dt2 = B_GradeOption.GetGradeList(2, DataConvert.CLng(Request.QueryString["GradeID"]));
            //    Repeater1.DataSource = dt2;
            //    Repeater1.DataBind();
            //    DataTable dtChild = B_GradeOption.GetGradeList(2, DataConvert.CLng(cateid));
            //    List<int> cateids = new List<int>();
            //    cateids.Add(DataConvert.CLng(cateid));
            //    foreach (DataRow dr in dtChild.Rows)
            //    {
            //        cateids.Add(DataConvert.CLng(dr["GradeID"]));
            //    }
            //    //dt3 = b_Ask.Sel(strWhere + " and " + str, " AddTime desc", sp);//str与strwhere未污染
            //    //dt3 = b_Ask.SelPage(type, pageSize, pageIndex, out itemCount,Cateids:cateids);
            //}
            //else
            //{
            //    catename = "全部分类";
            //    DataTable dt = B_GradeOption.GetGradeList(2, 0);
            //    Repeater1.DataSource = dt;
            //    Repeater1.DataBind();
            //    //dt3 = b_Ask.Sel(str, " AddTime desc", null);
            //    //dt3 = b_Ask.SelPage(type, pageSize, pageIndex, out itemCount);
            //}
            ViewBag.askDt = B_GradeOption.GetGradeList(2, DataConverter.CLng(Request.QueryString["ParentID"]));
            return(View(new PageSetting()
            {
                itemCount = 0
            }));
        }
Ejemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         B_ARoleAuth.CheckEx(ZLEnum.Auth.content, "AskManage");
         if (CateID <= 0)
         {
             function.WriteErrMsg("没有指定多级数据字典分类ID", "GradeCateManage.aspx");
         }
         //this.lblCateName.Text = Cate.CateName;
         M_GradeCate Cate = gradeBll.GetCate(CateID);
         this.LblCate.Text = Cate.CateName;
         //分级选项别名
         string[] GradeAlias = Cate.GradeAlias.Split(new char[] { '|' });
         //当前选项级别
         int level = 0;
         if (ParentID == 0)
         {
             level = 1;
             this.LblPreGrade.Text = "";
         }
         else
         {
             M_Grade GradeOption = B_GradeOption.GetGradeOption(ParentID);
             level = GradeOption.Grade + 1;
             this.LblPreGrade.Text = GradeOption.GradeName;
         }
         if (level <= GradeAlias.Length)
         {
             if (level == GradeAlias.Length)
             {
                 this.HdnLastLevel.Value = "1";
             }
             else
             {
                 this.HdnLastLevel.Value = "0";
             }
         }
         else
         {
             function.WriteErrMsg("当前选项已无下级选项!");
         }
         this.LblLevel.Text     = level.ToString();
         this.HdnCateID.Value   = CateID.ToString();
         this.HdnParentID.Value = ParentID.ToString();
         dBind();
         string bread = "<li><a href='DictionaryManage.aspx'>数据字典</a></li><li><a href='GradeCateManage.aspx'>多级数据字典管理</a></li>";
         if (ParentID > 0)
         {
             M_Grade parentMod = B_GradeOption.GetGradeOption(ParentID);
             bread += "<li><a href='GradeOption.aspx?CateID=" + CateID + "'>" + parentMod.GradeName + "</a></li>";
         }
         else
         {
             bread += "<li><a href='GradeCateManage.aspx'>" + Cate.CateName + "</a></li>";
         }
         bread += "<li class='active'>添加选项</li>";
         Call.SetBreadCrumb(Master, bread);
     }
 }
Ejemplo n.º 8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string GradeName = this.txtGradeName.Text.Trim();

            if (string.IsNullOrEmpty(GradeName))
            {
                function.WriteErrMsg("选项值不能为空!");
            }
            else
            {
                int GradeID = DataConverter.CLng(this.HdnGradeID.Value);
                if (GradeID > 0)
                {
                    M_Grade info = B_GradeOption.GetGradeOption(GradeID);
                    info.GradeName = GradeName;
                    B_GradeOption.UpdateDic(info);
                }
                else
                {
                    M_Grade info = new M_Grade();
                    info.GradeID   = 0;
                    info.GradeName = GradeName;
                    info.ParentID  = DataConverter.CLng(this.HdnParentID.Value);
                    info.Cate      = CateID;
                    info.Grade     = DataConverter.CLng(this.LblLevel.Text);
                    B_GradeOption.AddGradeOption(info);
                }
                this.txtGradeName.Text = "";
                this.HdnGradeID.Value  = "0";
                this.btnSave.Text      = "添加";
                dBind();
            }
        }
Ejemplo n.º 9
0
        private void MyBind()
        {
            M_AdminInfo adminMod = B_Admin.GetLogin();

            Grade_Radio.DataSource = B_GradeOption.GetGradeList(6, 0);
            Grade_Radio.DataBind();
            if (Grade_Radio.Items.Count > 0)
            {
                Grade_Radio.SelectedIndex = 0;
            }
            NodeTree.DataSource = nodeBll.Select_All();
            NodeTree.MyBind();
            if (Mid > 0)
            {
                verMod                    = verBll.SelReturnModel(Mid);
                VName_T.Text              = verMod.VersionName;
                Inputer_T.Text            = verMod.Inputer;
                VTime_T.Text              = verMod.VersionTime;
                Grade_Radio.SelectedValue = verMod.Grade.ToString();
                Node_Hid.Value            = verMod.NodeID.ToString();
                Volume_T.Text             = verMod.Volume;
                SectionName_T.Text        = verMod.SectionName;
                CourseName_T.Text         = verMod.CourseName;
                Price_T.Text              = verMod.Price.ToString("f2");
                if (!string.IsNullOrEmpty(verMod.Knows))
                {
                    TagKey_T.Value = knowBll.GetNamesByIDS(verMod.Knows);
                }
            }
            else
            {
                Inputer_T.Text = adminMod.AdminName;
            }
        }
        protected void BindClass()
        {
            DataTable dt = B_GradeOption.GetCateList();

            classification_D.DataSource = dt;
            classification_D.DataBind();
            classification_D.Items.Insert(0, new ListItem("请选择分类", ""));
        }
Ejemplo n.º 11
0
 protected void RPT_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.Equals("Del"))
     {
         B_GradeOption.DelGradeOption(DataConverter.CLng(e.CommandArgument));
     }
     MyBind();
 }
        private void BindClass3(int gid, int pid)
        {
            classification3_D.Items.Clear();
            DataTable dt = B_GradeOption.GetGradeList(gid, pid);

            classification3_D.DataSource = dt;
            classification3_D.DataBind();
            classification3_D.Items.Insert(0, new ListItem("请选择分类", ""));
        }
Ejemplo n.º 13
0
 //在线提问
 public ActionResult Add()
 {
     AskAuth();
     ViewBag.title     = Server.HtmlEncode(Request["strWhere"]);
     ViewBag.typeDt    = B_GradeOption.GetGradeList(2, 0);
     ViewBag.islogin   = buser.CheckLogin();
     ViewBag.needlogin = GuestConfig.GuestOption.WDOption.IsLogin;
     return(View());
 }
Ejemplo n.º 14
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string CateName   = this.txtCateName.Text.Trim();
            string GradeAlias = this.txtGradeField.Text.Trim();

            if (string.IsNullOrEmpty(CateName))
            {
                function.WriteErrMsg("分类名称不能为空!");
            }
            else
            {
                if (string.IsNullOrEmpty(GradeAlias))
                {
                    function.WriteErrMsg("分级选项别名不能为空!");
                }
                else
                {
                    GradeAlias = GradeAlias.Replace("\r\n", "|");
                    string[] AliasArr = GradeAlias.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
                    if (AliasArr.Length < 2)
                    {
                        function.WriteErrMsg("分级选项别名不能少于2个!");
                    }
                    else
                    {
                        int CateID = DataConverter.CLng(this.HdnCateID.Value);
                        if (CateID > 0)
                        {
                            M_GradeCate info = gradeBll.GetCate(CateID);
                            info.CateID     = CateID;
                            info.CateName   = CateName;
                            info.Remark     = this.txtRemark.Text.Trim();
                            info.GradeAlias = GradeAlias;
                            B_GradeOption.UpdateCate(info);
                        }
                        else
                        {
                            M_GradeCate info = new M_GradeCate();
                            info.CateID     = 0;
                            info.CateName   = CateName;
                            info.Remark     = this.txtRemark.Text.Trim();
                            info.GradeAlias = GradeAlias;
                            B_GradeOption.AddCate(info);
                        }
                        this.txtCateName.Text   = "";
                        this.txtRemark.Text     = "";
                        this.txtGradeField.Text = "";
                        this.HdnCateID.Value    = "0";
                        this.btnSave.Text       = "添加";
                        dBind();
                    }
                }
            }
        }
Ejemplo n.º 15
0
 protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) //指触发的类型为DadaList中的基本行或内容行
     {
         Repeater    rep  = e.Item.FindControl("Repeater2") as Repeater;                          //找到里层的repeater对象
         DataRowView rowv = (DataRowView)e.Item.DataItem;                                         //找到分类Repeater关联的数据项
         int         Gid  = DataConvert.CLng(rowv["GradeID"]);
         DataTable   dt   = B_GradeOption.GetGradeList(2, Gid);
         rep.DataSource = dt;
         rep.DataBind();
     }
 }
Ejemplo n.º 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.GradeOptionType_Cate.DataSource     = B_GradeOption.GetCateList();
         this.GradeOptionType_Cate.DataTextField  = "CateName";
         this.GradeOptionType_Cate.DataValueField = "CateID";
         this.GradeOptionType_Cate.DataBind();
         this.GradeOptionType_Cate.Items.Insert(0, new ListItem("选择多级选项分类", "0"));
     }
     Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='ProductManage.aspx'>商城管理</a></li><li><a href='SystemOrderModel.aspx?Type=" + Request.QueryString["Type"] + "'>订单模型管理</a></li><li class='active'>添加系统订单字段</li>");
 }
Ejemplo n.º 17
0
        private void dBind()
        {
            int ParentID = DataConverter.CLng(this.HdnParentID.Value);

            this.Gdv.DataSource = B_GradeOption.GetGradeList(CateID, ParentID);
            if (CateID == 3)
            {
                Gdv.Columns[2].HeaderText = "分类";
            }                                                     //百科分类
            this.Gdv.DataKeyNames = new string[] { "GradeID" };
            this.Gdv.DataBind();
        }
 private void BindClass2(int gid)
 {
     classification2_D.Items.Clear();
     classification3_D.Items.Clear();
     if (!string.IsNullOrEmpty(classification_D.SelectedValue))
     {
         DataTable dt = B_GradeOption.GetGradeList(gid, 0);
         classification2_D.DataSource = dt;
         classification2_D.DataBind();
         classification2_D.Items.Insert(0, new ListItem("请选择分类", ""));
     }
 }
Ejemplo n.º 19
0
 public VM_Question(M_UserInfo mu)
 {
     gradeDT = B_GradeOption.GetGradeList(6, 0);
     verDT   = verBll.Sel();
     if (Mid > 0)
     {
         questMod = questBll.GetSelect(Mid);
         if (questMod.UserID != mu.UserID)
         {
             function.WriteErrMsg("你无权修改该试题");
         }
     }
 }
Ejemplo n.º 20
0
 private void BindGradeDrop(int CateID, int ParentID, ListItem item, int type)
 {
     if (type == 1)
     {
         this.DDLGrade1.DataSource     = B_GradeOption.GetGradeList(CateID, ParentID);
         this.DDLGrade1.DataTextField  = "GradeName";
         this.DDLGrade1.DataValueField = "GradeID";
         this.DDLGrade1.DataBind();
         this.DDLGrade1.Items.Insert(0, item);
     }
     else if (type == 2)
     {
         this.DDLGrade2.DataSource     = B_GradeOption.GetGradeList(CateID, ParentID);
         this.DDLGrade2.DataTextField  = "GradeName";
         this.DDLGrade2.DataValueField = "GradeID";
         this.DDLGrade2.DataBind();
         this.DDLGrade2.Items.Insert(0, item);
     }
     else if (type == 3)
     {
         this.DDLGrade3.DataSource     = B_GradeOption.GetGradeList(CateID, ParentID);
         this.DDLGrade3.DataTextField  = "GradeName";
         this.DDLGrade3.DataValueField = "GradeID";
         this.DDLGrade3.DataBind();
         this.DDLGrade3.Items.Insert(0, item);
     }
     else if (type == 4)
     {
         this.DDLGrade4.DataSource     = B_GradeOption.GetGradeList(CateID, ParentID);
         this.DDLGrade4.DataTextField  = "GradeName";
         this.DDLGrade4.DataValueField = "GradeID";
         this.DDLGrade4.DataBind();
         this.DDLGrade4.Items.Insert(0, item);
     }
     else if (type == 5)
     {
         this.DDLGrade5.DataSource     = B_GradeOption.GetGradeList(CateID, ParentID);
         this.DDLGrade5.DataTextField  = "GradeName";
         this.DDLGrade5.DataValueField = "GradeID";
         this.DDLGrade5.DataBind();
         this.DDLGrade5.Items.Insert(0, item);
     }
     else
     {
         this.DDLGrade6.DataSource     = B_GradeOption.GetGradeList(CateID, ParentID);
         this.DDLGrade6.DataTextField  = "GradeName";
         this.DDLGrade6.DataValueField = "GradeID";
         this.DDLGrade6.DataBind();
         this.DDLGrade6.Items.Insert(0, item);
     }
 }
Ejemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //根据不同的类型,传入不同的参数
            string    hasChild = "<a href='" + path + "QuestList.aspx?grade={0}' target='main_right' id='a{0}' class='list1' >{2}<span class='list_span'>{1}</span></a>";
            string    noChild  = "<a href='" + path + "QuestList.aspx?grade={0}' target='main_right'>{2}{1}</a>";
            DataTable nodeDT   = B_GradeOption.GetGradeList(6, 0);

            nodeDT.Columns["GradeID"].ColumnName   = "ID";
            nodeDT.Columns["GradeName"].ColumnName = "Name";
            string head = "<ul class='tvNav'><li class='menu_tit'><span class='fa fa-chevron-down'></span>试题管理</li>";

            head         += "<li><a class='list1' id='a0' href='" + path + "QuestList.aspx' target='main_right' ><span class='list_span'>全部试题</span><span class='fa fa-list'></span></a>";
            nodeHtml.Text = head + B_Node.GetLI(nodeDT, hasChild, noChild) + "</li></ul>";
        }
Ejemplo n.º 22
0
        protected void DDLGrade6_SelectedIndexChanged(object sender, EventArgs e)
        {
            string[] GradeCate = GradeBll.GetCate(CateID).GradeAlias.Split(new char[] { '|' });
            int      Gid       = DataConverter.CLng(this.DDLGrade1.SelectedValue);
            int      Gid1      = DataConverter.CLng(this.DDLGrade2.SelectedValue);
            int      Gid2      = DataConverter.CLng(this.DDLGrade3.SelectedValue);
            int      Gid3      = DataConverter.CLng(this.DDLGrade4.SelectedValue);
            int      Gid4      = DataConverter.CLng(this.DDLGrade5.SelectedValue);
            int      Gid5      = DataConverter.CLng(this.DDLGrade6.SelectedValue);


            string GName  = B_GradeOption.GetGradeOption(Gid).GradeName;
            string GName1 = B_GradeOption.GetGradeOption(Gid1).GradeName;
            string GName2 = B_GradeOption.GetGradeOption(Gid2).GradeName;
            string GName3 = B_GradeOption.GetGradeOption(Gid3).GradeName;
            string GName4 = B_GradeOption.GetGradeOption(Gid4).GradeName;
            string GName5 = "";

            if (Gid5 > 0)
            {
                GName5 = B_GradeOption.GetGradeOption(Gid5).GradeName;
            }
            if (!string.IsNullOrEmpty(GName1))
            {
                GName = GName + "|" + GName1;
            }
            if (!string.IsNullOrEmpty(GName2))
            {
                GName = GName + "|" + GName2;
            }
            if (!string.IsNullOrEmpty(GName3))
            {
                GName = GName + "|" + GName3;
            }
            if (!string.IsNullOrEmpty(GName4))
            {
                GName = GName + "|" + GName4;
            }
            if (!string.IsNullOrEmpty(GName5))
            {
                GName = GName + "|" + GName5;
            }

            StringBuilder builder = new StringBuilder();

            builder.Append("<script type=\"text/javascript\">");
            builder.Append("parent.UpdateMultiDrop(\"" + GName + "\",\"txt_" + FieldName + "\");");
            builder.Append("</script>");
            this.Page.ClientScript.RegisterStartupScript(base.GetType(), "UpdateParent", builder.ToString());
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 更新分级选项分类
        /// </summary>
        /// <param name="Cate">分类实例</param>
        /// <returns>成功状态</returns>
        public bool UpdateCate(M_GradeCate model)
        {
            B_GradeOption bll = new B_GradeOption();

            if (model.CateID > 0)
            {
                UpdateByID(model);
            }
            else
            {
                insert(model);
            }
            return(true);
        }
        public VM_QuestManage(HttpRequestBase Request)
        {
            this.mu = tubll.GetLogin();
            M_Temp tempMod = tempBll.SelModelByUid(mu.UserID, 10);

            if (tempMod == null)
            {
                tempMod = new M_Temp();
            }
            gradeDT    = B_GradeOption.GetGradeList(6, 0);
            verDT      = verBll.Sel();
            QListCount = questBll.GetCountByIDS(tempMod.Str1);
            //function.Script(this, "RenderQList(" + list + ");");
            QuestType_Lit = GetTreeStr(FillQuest(nodeBll.SelectQuesClasses()), 0, "quest");
        }
Ejemplo n.º 25
0
        public ActionResult AddClassRoom()
        {
            M_ClassRoom croomMod = croomBll.SelReturnModel(Mid);

            if (croomMod == null)
            {
                croomMod = new M_ClassRoom();
            }
            ViewBag.gradelist = MVCHelper.ToSelectList(B_GradeOption.GetGradeList(6, 0), "GradeName", "GradeID", croomMod.Grade.ToString());
            int      sid    = croomMod.RoomID > 0 ? croomMod.SchoolID : DataConverter.CLng(Request.QueryString["sid"]);
            M_School schMod = schBll.SelReturnModel(sid);

            ViewBag.schName = schMod == null ? "" : schMod.SchoolName;
            ViewBag.teaName = buser.SelReturnModel(croomMod.CreateUser).UserName;
            return(View(croomMod));
        }
Ejemplo n.º 26
0
        public ActionResult AddKnowledge()
        {
            int NodeID = DataConverter.CLng(Request.QueryString["nid"]);

            if (NodeID > 0)
            {
                ViewBag.cname = classBll.GetSelect(NodeID).C_ClassName;
            }
            M_Questions_Knowledge knowMod = knowBll.SelReturnModel(Mid);

            if (knowMod == null)
            {
                knowMod = new M_Questions_Knowledge();
            }
            ViewBag.gradelist = MVCHelper.ToSelectList(B_GradeOption.GetGradeList(6, 0), "GradeName", "GradeID", knowMod.Grade.ToString());
            return(View(knowMod));
        }
        public void MyBind()
        {
            M_ClassRoom classmod = classBll.SelReturnModel(ClassID);

            ClassName_L.Text = classmod.RoomName;
            ClassIcon_L.Text = GetIcon(classmod.Monitor);
            if (classmod.SchoolID > 0)
            {
                SchoolName_L.Text = "<a href='SchoolShow.aspx?id=" + classmod.SchoolID + "'>" + schBll.SelReturnModel(classmod.SchoolID).SchoolName + "</a>";
            }
            Grade_L.Text      = B_GradeOption.GetGradeOption(classmod.Grade).GradeName;
            CreateUser_L.Text = buser.SelReturnModel(classmod.CreateUser).UserName;
            IsDonw_L.Text     = classmod.IsDone == 1 ? "<span class='fa fa-check'></span>" : "<span class='fa fa-remove'></span>";
            CreateTime_L.Text = classmod.Creation.ToString();
            ClassInfo_L.Text  = classmod.Classinfo;
            Star_Li.Text      = GetStar(classmod.ClassStar);
        }
Ejemplo n.º 28
0
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_Grade GradeMod = new M_Grade();

            GradeMod.GradeID   = DataConverter.CLng(GradeID_Hid.Value);
            GradeMod.ParentID  = 0;
            GradeMod.GradeName = GradeName_T.Text;
            GradeMod.Cate      = CateID;
            if (GradeMod.GradeID > 0)
            {
                B_GradeOption.UpdateDic(GradeMod);
                function.WriteSuccessMsg("修改成功!");
            }
            else
            {
                B_GradeOption.AddGradeOption(GradeMod);
                function.WriteSuccessMsg("添加成功!");
            }
            MyBind();
        }
 //从字典获取相关试题类型
 public void InitQuestGrade()
 {
     //难度
     //rblDiff.DataSource = B_GradeOption.GetGradeList(5, 0);
     //rblDiff.DataBind();
     //if (rblDiff.Items.Count > 0) { rblDiff.Items[0].Selected = true; }
     //年级
     Grade_Radio.DataSource = B_GradeOption.GetGradeList(6, 0);
     Grade_Radio.DataBind();
     if (Grade_Radio.Items.Count > 0)
     {
         Grade_Radio.Items[0].Selected = true;
     }
     Version_Rad.DataSource = verBll.Sel();
     Version_Rad.DataBind();
     if (Version_Rad.Items.Count > 0)
     {
         Version_Rad.Items[0].Selected = true;
     }
 }
Ejemplo n.º 30
0
        public void QuestGrade_Add()
        {
            int     CateID   = DataConverter.CLng(Request["cate"]);
            M_Grade GradeMod = new M_Grade();

            GradeMod.GradeID   = DataConverter.CLng(Request.Form["GradeID_Hid"]);
            GradeMod.ParentID  = 0;
            GradeMod.GradeName = Request.Form["GradeName_T"];
            GradeMod.Cate      = CateID;
            if (GradeMod.GradeID > 0)
            {
                B_GradeOption.UpdateDic(GradeMod);
                function.WriteSuccessMsg("修改成功!", "QuestGrade?cate=" + CateID); return;
            }
            else
            {
                B_GradeOption.AddGradeOption(GradeMod);
                function.WriteSuccessMsg("添加成功!", "QuestGrade?cate=" + CateID);
            }
        }