コード例 #1
0
        protected void RadTreeView1_Nodeclick(object sender, RadTreeNodeEventArgs e)
        {
            var dt = new object();

            if (e.Node.Level.Equals(0))
            {
                dt = _entities.GetCVUngVienByIDTuyendung(Int32.Parse(e.Node.Value));
            }
            else
            {
                dt = _entities.GetCVUngVienByVongTuyendung(Int32.Parse(e.Node.Value));
            }

            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();

            if (RadGrid1.Items.Count > 0)
            {
                RadGrid1.Items[0].Selected = true;
                GridDataItem item       = RadGrid1.Items[0];
                Int32        IDNhanVien = Int32.Parse(item["IDNhanVien"].Text);
                FillCurrentEmployeeDetail(IDNhanVien);
                RadContextMenu1.Items.FindItemByValue("xoa").Enabled = true;
                RadContextMenu1.Items.FindItemByValue("sua").Enabled = true;
                CheckPermis();
            }
            else
            {
                RadContextMenu1.Items.FindItemByValue("xoa").Enabled = false;
                RadContextMenu1.Items.FindItemByValue("sua").Enabled = false;
            }
        }