protected void Page_Load(object sender, EventArgs e)
    {
        BindKechengTreeView();
        string kechengid = Session["kechengid"].ToString();
        string username  = ((FormsIdentity)HttpContext.Current.User.Identity).Ticket.Name;

        if (!KechengInfo.IsTeacherManageKecheng(username, kechengid))
        {
            BtnAddzhishidian.Enabled = false;
            Lbl_fankui.Text          = "您不是本课程的管理员,无权对其知识结构进行编辑修改。";
        }
        else
        {
            BtnAddzhishidian.Enabled = true;
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string kechengid = Session["kechengid"].ToString();
        string tusername = ((FormsIdentity)HttpContext.Current.User.Identity).Ticket.Name;

        if (!KechengInfo.IsTeacherManageKecheng(tusername, kechengid))
        {
            Button1.Enabled = false;
            Label1.Text     = "您不是本课程的管理员,无权更新课程信息。";
        }
        else
        {
            Button1.Enabled = true;
        }
        if (!IsPostBack)
        {
            BindKechengInfo();
        }
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string kechengid = Session["kechengid"].ToString();

        if (!IsPostBack)
        {
            UpdateKechengTreeview(kechengid);
        }
        string username = ((FormsIdentity)HttpContext.Current.User.Identity).Ticket.Name;

        if (!KechengInfo.IsTeacherManageKecheng(username, kechengid))
        {
            Button_shanchu.Enabled = false;
            Label1.Text            = "您不是本课程的管理员,无权对其知识结构进行编辑修改。";
            DetailsView1.Enabled   = false;
        }
        else
        {
            Button_shanchu.Enabled = true;
            DetailsView1.Enabled   = true;
        }
    }
Пример #4
0
    //显示初始课程结构
    protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    {
        string username  = ((FormsIdentity)HttpContext.Current.User.Identity).Ticket.Name;
        string kechengid = Session["kechengid"].ToString();

        Lbl_zhishiname.Text = TreeView1.SelectedNode.Text;
        Lbl_zhishiid.Text   = TreeView1.SelectedNode.Value;
        TreeNode node = TreeView1.SelectedNode;

        if (node.ChildNodes.Count > 0 || node.Depth <= 0)
        {
            Button_shanchu.Enabled = false;
        }
        else
        {
            if (KechengInfo.IsTeacherManageKecheng(username, kechengid))
            {
                Button_shanchu.Enabled = true;
            }
            else
            {
                Button_shanchu.Enabled = false;
            }
        }
        int nodedepth = node.Depth;//求结点深度

        //回溯该知识点的上位知识点
        Lbl_dangqianweizhi.Text = "";
        StringBuilder sb = new StringBuilder();

        sb.Append(TreeView1.SelectedNode.Text);
        while (node.Parent != null)
        {
            node = node.Parent;
            sb.Insert(0, node.Text + "&gt;");
        }
        Lbl_dangqianweizhi.Text = sb.ToString();
    }