Exemplo n.º 1
0
    public void Fresh()
    {
        PnlTreeList.Attributes["display"] = "none";
        txtProducCateID.Text = nSelectProductCategoryID.ToString();
        if (ProductList != null && ProductList.Rows.Count > 0)
        {
            BLL.TreeViewFromTableBLL tvftbll = new BLL.TreeViewFromTableBLL();

            tvftbll.nRootParentID       = 0;
            tvftbll.NodeValueColumnName = "nProductCategoryID";
            tvftbll.NodeTextColumnName  = "sProductCategoryNameCN";
            tvftbll.FatherIDColumnName  = "nParentCategoryID";
            TreeNode[] nodes = tvftbll.GetTreeNodes(ProductList);
            TreeView1.Nodes.Clear();
            if (bHaveRoot == 1)
            {
                TreeNode noderoot = new TreeNode();
                noderoot.Text  = "没有上级产品类";
                noderoot.Value = "0";
                for (int i = 0; i < nodes.Length; i++)
                {
                    noderoot.ChildNodes.Add(nodes[i]);
                }
                TreeView1.Nodes.Add(noderoot);
            }
            else
            {
                for (int i = 0; i < nodes.Length; i++)
                {
                    TreeView1.Nodes.Add(nodes[i]);
                }
            }
            TreeView1.ExpandAll();
        }
    }
Exemplo n.º 2
0
    public void Button_Command(Object sender, CommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Expand":
            if (panel_sample.Visible == true)
            {
                TreeView1.ExpandAll();
            }
            else
            {
                TreeView2.ExpandAll();
            }

            break;

        case "Collapse":
            if (panel_sample.Visible == true)
            {
                TreeView1.CollapseAll();
            }
            else
            {
                TreeView2.CollapseAll();
            }
            break;

        default:
            // Do nothing.
            break;
        }
    }
Exemplo n.º 3
0
        public void reloadTreeView()
        {
            string maloai = Session["loaiphieu"].ToString();
            string phieu  = Session["maphieu"].ToString();

            ctxds.Clear();
            TreeView1.Nodes.Clear();
            lvb      = AbconBUS.LayDSLoaiVanBan_CapDuyet(maloai, true);
            dschucvu = abill1BUS.ListAbill1();
            TreeNode parentNode = new TreeNode(str13);

            parentNode.Text = "parentNode";
            TreeView1.Nodes.Add(parentNode);
            foreach (Abcon loaivb in lvb)
            {
                TreeNode childNode = new TreeNode(loaivb.abde.ToString() + "-" + loaivb.Auditor.ToString());
                childNode.Value = loaivb.abde.ToString();
                childNode.Text  = "Cấp" + ":" + (TreeView1.Nodes[0].ChildNodes.Count + 1);
                parentNode.ChildNodes.Add(childNode);
                Abcon vbcd = new Abcon();
                vbcd.abde    = loaivb.abde;
                vbcd.pdno    = phieu;
                vbcd.cothutu = loaivb.cothutu;
                ctxds.Add(childNode.Text, vbcd);
            }
            TreeView1.ExpandAll();
        }
Exemplo n.º 4
0
        private void Arbol()
        {
            TreeView1.ExpandAll();
            TreeNode nodo = new TreeNode();

            TreeView1.Nodes.Clear();
            nodo.Value = "0";
            nodo.Text  = "Antecedentes Familiares";
            TreeView1.Nodes.Add(nodo);
            //   entonces para para cargar el renglon de abajo, dspues de ? de pregunta agregar una variable=valor&otravariable=otrovalor
            int vParentesco = int.Parse(ddlParentesco.SelectedValue.ToString());
            int vCIE10      = DiagnosticoPrincipal.getDiagnostico();
            int vPaciente   = int.Parse(Request["idPaciente"]);

            //nodo.NavigateUrl = "AntecedentesFamiliares.aspx?Parentesco=" + vParentesco.ToString() + "&CIE10=" + vCIE10.ToString() + "&Paciente= " + vPaciente.ToString();
            //nodo.NavigateUrl = "Catastro.aspx?tipo=Habitacion&idHabitacion=" + nodo.Value;
            //nodo.NavigateUrl = "AntecedentesFamiliares.aspx?Parentesco=" + vParentesco.ToString() + "&CIE10=" + vCIE10.ToString() + "&Paciente= " + vPaciente.ToString();
            mostrarNodos(nodo);



            //DataTable dtFamiliarT = new DataTable();
            //dtFamiliarT = SPs.SysParentescoT().GetDataSet().Tables[0];

            //TreeView1.DataSource = dtFamiliarT;
            //TreeView1.DataBind();

            //DataView dataViewHijos = new DataView(dataSetArbol.Tables["SysParentescoT"]);
            //dataViewHijos.RowFilter = dataSetArbol.Tables["TablaArbol"].Columns["IdentificadorPadre"].ColumnName + " = " + indicePadre;
        }
Exemplo n.º 5
0
    protected void btnIn_Click(object sender, ImageClickEventArgs e)
    {
        if (ltrEstDeptPath.Text.Equals(String.Empty))
        {
            Literal1.Text = JSHelper.GetAlertScript("평가 부서를 선택해 주세요.", false);
            return;
        }

        if (ltrDeptPath.Text.Equals(String.Empty))
        {
            Literal1.Text = JSHelper.GetAlertScript("인사 부서를 선택해 주세요.", false);
            return;
        }

        if (ddlDeptGroup.SelectedValue.Equals("0"))
        {
            Literal1.Text = JSHelper.GetAlertScript("부분을 선택해주세요.", false);
            return;
        }

        MicroBSC.Estimation.Dac.DeptInfos dept = new MicroBSC.Estimation.Dac.DeptInfos();
        dept.MappingEstDept_Dept_ID(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), int.Parse(ltrEstDeptID.Text), int.Parse(ltrDeptID.Text), int.Parse(ddlDeptGroup.SelectedValue));
        TreeView1.Nodes.Clear();
        WebCommon.FillEstMappingTree(TreeView1, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));
        TreeView1.ExpandAll();
    }
Exemplo n.º 6
0
        private void BindTree()
        {
            TreeView1.MultipleSelectEnabled       = false;
            TreeView1.DragAndDropEnabled          = false;
            TreeView1.KeyboardEnabled             = true;
            TreeView1.NodeEditingEnabled          = false;
            TreeView1.KeyboardCutCopyPasteEnabled = false;
            TreeView1.ShowLines     = true;
            TreeView1.DisplayMargin = false;

            TreeViewNode rootNode = new TreeViewNode();

            rootNode.Text          = "Projects";
            rootNode.Selectable    = false;
            rootNode.CssClass      = "TreeNodeGray";
            rootNode.HoverCssClass = "TreeNodeGray";

            DataTable dt = Project.GetListActiveProjectsByUserDataTable();            // ActiveProjectsByUserOnlyDataTable();

            foreach (DataRow dr in dt.Rows)
            {
                string ContainerKey = Mediachase.IBN.Business.UserRoleHelper.CreateProjectContainerKey((int)dr["ProjectId"]);
                bic = BaseIbnContainer.Create("FileLibrary", ContainerKey);
                fs  = (FileStorage)bic.LoadControl("FileStorage");
                ProcessFolderNode(rootNode, ContainerKey, fs.Root.Id, dr["Title"].ToString(), true);
            }

            TreeView1.Nodes.Add(rootNode);
            TreeView1.ExpandAll();
        }
Exemplo n.º 7
0
    public void BindWithSubcategory(string subCat)
    {
        con = new SqlConnection(ConfigurationManager.ConnectionStrings["Free"].ToString());
        SqlDataAdapter da = new SqlDataAdapter("select distinct MCategoryName_V  from Mst_Category C inner join Mst_SubCategory S on C.CategoryID_N=S.CategoryID_N where CategoryName_V='" + subCat + "'", con);
        DataTable      dt = new DataTable();

        da.Fill(dt);
        if (dt.Rows.Count > 0)
        {
            TreeView1.Nodes.Clear();
            TreeNode rootNode1 = new TreeNode(dt.Rows[0]["MCategoryName_V"].ToString(), dt.Rows[0]["MCategoryName_V"].ToString());
            TreeView1.Nodes.Add(rootNode1);
            TreeNode rootNode2 = new TreeNode(subCat);
            rootNode1.ChildNodes.Add(rootNode2);

            SqlDataAdapter da1 = new SqlDataAdapter("select SubCategoryName_V, (SubCategoryName_V + '('+(select cast(count(*) as varchar(50)) from Adv_Product_Common where ProductCategoryName=S.SubCategoryName_V)+')') as SubCategoryName   from Mst_Category C inner join Mst_SubCategory S on C.CategoryID_N=S.CategoryID_N where CategoryName_V='" + subCat + "'", con);
            DataTable      dt1 = new DataTable();
            da1.Fill(dt1);
            if (dt1.Rows.Count > 0)
            {
                for (int i = 0; i < dt1.Rows.Count; i++)
                {
                    TreeNode child = new TreeNode(dt1.Rows[i]["SubCategoryName"].ToString(), dt1.Rows[i]["SubCategoryName_V"].ToString());
                    rootNode2.ChildNodes.Add(child);
                }
            }
        }

        TreeView1.ExpandAll();
    }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            TreeView1.Nodes.Clear();
            WebCommon.SetEstTermDropDownList(ddlEstTermInfo);
            WebCommon.SetEstDeptGroupDropDownList(ddlDeptGroup, ":: 선택 ::", "0", true);

            TreeView1.Nodes.Clear();
            WebCommon.FillEstMappingTree(TreeView1, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));
            //WebCommon.FillEstTree(TreeView1, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));
            TreeView1.ExpandAll();

            if (ddlEstTermInfo.Items.Count > 0)
            {
                WebCommon.FillComDeptTree(TreeView2);
            }

            WebCommon.SetEstTermDropDownList(ddlEstTermInfo2);
            DoSetPossibleCopay();
        }

        ESTTERM_REF_ID = PageUtility.GetByValueDropDownList(ddlEstTermInfo);
        Literal1.Text  = "";

        // //체크인-체크아웃 활성화
        //MenuControl1.IsCheckInOutVisible = true;
        //MenuControl1.SetCheckInOutBuuton(tbSetup
        //                                        , btnIn
        //                                        , btnOut
        //                                        );
    }
Exemplo n.º 9
0
        protected void initTeacherTreeView()
        {
            CourseManager CourseMan  = new CourseManager();
            List <Course> CourseList = new List <Course>();

            CourseList = CourseMan.GetCourseForTeacher(tea.username);

            TreeView1.Nodes.Clear();
            TreeNode mycourse = new TreeNode();

            mycourse.Text        = "我的课程";
            mycourse.NavigateUrl = "AddCourse.aspx";

            //设置TreeView的节点,未截止的课程
            foreach (Course course in CourseList)
            {
                if (DateTime.Now < course.end_time)
                {
                    TreeNode node = new TreeNode();
                    node.Text        = course.name;
                    node.NavigateUrl = "AllAssignment.aspx?Coursenum=" + course.num;
                    mycourse.ChildNodes.Add(node);
                }
            }
            TreeView1.Nodes.Add(mycourse);
            TreeView1.ExpandAll();
        }
Exemplo n.º 10
0
    private void InsertUpdateDeptInfo()
    {
        if (hdfDeptRefId.Value.Trim() == "" || txtDeptName.Text.Trim() == "")
        {
            ltrScript.Text = JSHelper.GetAlertScript("부서를 선택해주십시오.", false);
            return;
        }

        this.SetParameter();

        Biz_ComDeptInfo objDept = new Biz_ComDeptInfo();
        int             intRtn  = objDept.UpdateData(_idept_ref_id
                                                     , _iup_dept_id
                                                     , 0
                                                     , _idept_name
                                                     , _idept_code //_idept_ref_id.ToString(),
                                                     , 1
                                                     , _idept_type
                                                     , _isort_order
                                                     , _idept_desc
                                                     , gUserInfo.Emp_Ref_ID);

        WebCommon.FillComDeptTree(TreeView1);
        TreeView1.ExpandAll();
        SetButtons();
    }
Exemplo n.º 11
0
    protected void itnDelete_Click(object sender, ImageClickEventArgs e)
    {
        DeptInfos dept = new DeptInfos();

        if (TreeView1.SelectedValue.Equals(""))
        {
            return;
        }

        bool isOK = dept.RemoveDeptinfo(int.Parse(TreeView1.SelectedValue));

        if (!isOK)
        {
            ltrScript.Text = JSHelper.GetAlertScript("소속되어 있는 부서나 사원이 있습니다. 확인 후 삭제 해주세요.", false);
            return;
        }
        else
        {
            WebCommon.FillComDeptTree(TreeView1);
            TreeView1.ExpandAll();
            SetButtons();

            ltrScript.Text = JSHelper.GetAlertScript("정상적으로 삭제되었습니다.", false);
            return;
        }
    }
Exemplo n.º 12
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         PopulateRootLevel();
         TreeView1.ExpandAll();
     }
 }
Exemplo n.º 13
0
    // 동위레벨 추가
    protected void iBtnAddBrother_Click(object sender, ImageClickEventArgs e)
    {
        this.AddDeptNode("BROTHER");

        WebCommon.FillComDeptTree(TreeView1);
        TreeView1.ExpandAll();
        SetButtons();
    }
Exemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con  = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ToString());
            SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ToString());

            if (Session["Usercode"] == null)
            {
                Response.Redirect("~/Default.aspx");
            }
            else
            {
                if (!IsPostBack)
                {
                    TreeNode root = new TreeNode();
                    root.Text  = Session["UserCode"].ToString();
                    root.Value = Session["UserCode"].ToString();

                    TreeView1.Nodes.Add(root);
                    TreeView1.ExpandAll();
                    return;
                }
            }
            LevelColors[0]  = (Color)System.Drawing.ColorTranslator.FromHtml("#37cf1c");
            LevelColors[1]  = (Color)System.Drawing.ColorTranslator.FromHtml("#f81300");
            LevelColors[2]  = (Color)System.Drawing.ColorTranslator.FromHtml("#90d7f3");
            LevelColors[3]  = (Color)System.Drawing.ColorTranslator.FromHtml("#fabd0a");
            LevelColors[4]  = (Color)System.Drawing.ColorTranslator.FromHtml("#9cb9bf");
            LevelColors[5]  = (Color)System.Drawing.ColorTranslator.FromHtml("#801d5e");
            LevelColors[6]  = (Color)System.Drawing.ColorTranslator.FromHtml("#5d5d5d");
            LevelColors[7]  = (Color)System.Drawing.ColorTranslator.FromHtml("#3f74ff");
            LevelColors[8]  = (Color)System.Drawing.ColorTranslator.FromHtml("#ffea00");
            LevelColors[9]  = (Color)System.Drawing.ColorTranslator.FromHtml("#37cf1c");
            LevelColors[10] = (Color)System.Drawing.ColorTranslator.FromHtml("#37cf1c");
            LevelColors[11] = (Color)System.Drawing.ColorTranslator.FromHtml("#f81300");
            LevelColors[12] = (Color)System.Drawing.ColorTranslator.FromHtml("#90d7f3");
            LevelColors[13] = (Color)System.Drawing.ColorTranslator.FromHtml("#fabd0a");
            LevelColors[14] = (Color)System.Drawing.ColorTranslator.FromHtml("#9cb9bf");
            LevelColors[15] = (Color)System.Drawing.ColorTranslator.FromHtml("#801d5e");
            LevelColors[16] = (Color)System.Drawing.ColorTranslator.FromHtml("#5d5d5d");
            LevelColors[17] = (Color)System.Drawing.ColorTranslator.FromHtml("#3f74ff");
            LevelColors[18] = (Color)System.Drawing.ColorTranslator.FromHtml("#ffea00");
            LevelColors[19] = (Color)System.Drawing.ColorTranslator.FromHtml("#37cf1c");
            LevelColors[20] = (Color)System.Drawing.ColorTranslator.FromHtml("#37cf1c");
            LevelColors[21] = (Color)System.Drawing.ColorTranslator.FromHtml("#f81300");
            LevelColors[22] = (Color)System.Drawing.ColorTranslator.FromHtml("#90d7f3");
            LevelColors[23] = (Color)System.Drawing.ColorTranslator.FromHtml("#fabd0a");
            LevelColors[24] = (Color)System.Drawing.ColorTranslator.FromHtml("#9cb9bf");
            LevelColors[25] = (Color)System.Drawing.ColorTranslator.FromHtml("#801d5e");
            LevelColors[26] = (Color)System.Drawing.ColorTranslator.FromHtml("#5d5d5d");
            LevelColors[27] = (Color)System.Drawing.ColorTranslator.FromHtml("#3f74ff");
            LevelColors[28] = (Color)System.Drawing.ColorTranslator.FromHtml("#ffea00");
            LevelColors[29] = (Color)System.Drawing.ColorTranslator.FromHtml("#37cf1c");
            LevelColors[30] = (Color)System.Drawing.ColorTranslator.FromHtml("#37cf1c");
            LevelColors[31] = (Color)System.Drawing.ColorTranslator.FromHtml("#f81300");
            LevelColors[32] = (Color)System.Drawing.ColorTranslator.FromHtml("#90d7f3");
            LevelColors[33] = (Color)System.Drawing.ColorTranslator.FromHtml("#fabd0a");
            LevelColors[34] = (Color)System.Drawing.ColorTranslator.FromHtml("#9cb9bf");
        }
Exemplo n.º 15
0
    protected void iBtnAddChild_Click(object sender, ImageClickEventArgs e)
    {
        ltrScript.Text = "";
        this.AddDeptNode("CHILD");

        WebCommon.FillComDeptTree(TreeView1);
        TreeView1.ExpandAll();
        SetButtons();
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TreeView1.ShowCheckBoxes = TreeNodeTypes.Leaf;

                ListDirectory(TreeView1, Server.MapPath("~/Resources"));
            }
            TreeView1.ExpandAll();
        }
Exemplo n.º 17
0
    protected void iBtnSearch_Click(object sender, ImageClickEventArgs e)
    {
        TreeView1.Nodes.Clear();
        WebCommon.FillEstOrgStatusTree(TreeView1, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo), TreeNodeSelectAction.Select);
        TreeView1.ExpandAll();

        SetVisibleButton();
        GridBinding();
        CheckDrillDownYN(PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));
    }
Exemplo n.º 18
0
    protected void bindtreeview()
    {
        try
        {
            this.TreeView1.Nodes.Clear();
            HierarchyTree        hierarchy = new HierarchyTree();
            HierarchyTree.HGroup objhtree  = null;

            string selgroup = "select distinct ITGroupPK,GroupName,ParentCode from IT_GroupMaster where CollegeCode='" + ddlcolload.SelectedItem.Value + "'";
            ds.Clear();
            ds = d2.select_method_wo_parameter(selgroup, "Text");
            this.TreeView1.Nodes.Clear();
            hierarchy.Clear();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                objhtree             = new HierarchyTree.HGroup();
                objhtree.group_code  = int.Parse(ds.Tables[0].Rows[i]["ITGroupPK"].ToString());
                objhtree.parent_code = int.Parse(ds.Tables[0].Rows[i]["ParentCode"].ToString());
                objhtree.group_name  = ds.Tables[0].Rows[i]["GroupName"].ToString();
                hierarchy.Add(objhtree);
            }

            foreach (HierarchyTree.HGroup hTree in hierarchy)
            {
                HierarchyTree.HGroup parentNode = hierarchy.Find(delegate(HierarchyTree.HGroup emp) { return(emp.group_code == hTree.parent_code); });
                if (parentNode != null)
                {
                    foreach (TreeNode tn in TreeView1.Nodes)
                    {
                        if (tn.Value == parentNode.group_code.ToString())
                        {
                            tn.ChildNodes.Add(new TreeNode(hTree.group_name.ToString(), hTree.group_code.ToString()));
                        }
                        if (tn.ChildNodes.Count > 0)
                        {
                            foreach (TreeNode ctn in tn.ChildNodes)
                            {
                                RecursiveChild(ctn, parentNode.group_code.ToString(), hTree);
                            }
                        }
                    }
                }
                else
                {
                    TreeView1.Nodes.Add(new TreeNode(hTree.group_name, hTree.group_code.ToString()));
                }
                TreeView1.ExpandAll();
                //TreeView1.ExpandAll();
            }
        }
        catch
        {
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            //super sso

            if (!Page.IsPostBack)
            {
                if (Request["idPaciente"] != null)
                {
                    TreeView1.ExpandAll();
                }
                lbExistenRegistros.Visible = false;

                SysPaciente oPaciente = new SysPaciente(int.Parse(Request["idPaciente"].ToString()));
                lPaciente.Text = oPaciente.Apellido + "  " + oPaciente.Nombre;
                if (oPaciente.IdEstado != 2)
                {
                    ldniPaciente.Text = oPaciente.NumeroDocumento.ToString();
                }
                else
                {
                    ldniPaciente.Text = "Temporal";
                }
                //definir tipo variable
                if (Request["vCie10"] != null)
                {
                    PanelAlta.Visible = true;
                    int vParentesco1 = int.Parse(Request["vParentesco"]);
                    int vCie101      = int.Parse(Request["vCie10"]);
                    ddlParentesco.SelectedValue = int.Parse(Request["vParentesco"]).ToString();
                    DiagnosticoPrincipal.setDiagnosticoPrincipal(vCie101);
                    btnEliminar.Visible = true;

                    //boton eliminar true si
                }


                cargarCombos();
                int vPaciente = int.Parse(Request["idPaciente"]);

                DataTable dtDatosAtecedentes = new DataTable();
                dtDatosAtecedentes = SPs.SysParentescoT(vPaciente).GetDataSet().Tables[0];
                if (dtDatosAtecedentes.Rows.Count != 0) // existe al menos un registro
                {
                    Arbol();
                }
                else
                {
                    lbExistenRegistros.Visible = true;
                }
                Arbol();
                //TablaErrores.Visible = false;
            }
        }
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     if (TreeView1.CheckedNodes.Count > 0)
     {
         mpeDeleteResource.Show();
         TreeView1.ExpandAll();
     }
     else
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "AlertBox", "alert('Please select at least one resource.');", true);
     }
 }
Exemplo n.º 21
0
    private void FindMatch(TreeNode currentNode)
    {
        if (currentNode.Text.ToUpper().Contains(TxtSearch.Text.ToUpper()))
        {
            TreeView1.ExpandAll();
            currentNode.Expand();

            currentNode.ShowCheckBox = true;
            currentNode.Checked      = true;
            currentNode.Select();
        }
    }
Exemplo n.º 22
0
 // The delete was confirmed and a call to the server is made to delete the activeProject
 protected void ConfirmDeleteProj_Click(object sender, EventArgs e)
 {
     using (SliceOfPieClient.Service.SliceOfPieServiceClient serv = new SliceOfPieClient.Service.SliceOfPieServiceClient())
     {
         serv.DeleteProject(activeProject.Id, WelcomeForm.active);
         UpdateProjects();
         UpdateTreeView("");
         DynamicPanelInvisible();
         DynamicProjectPanelInvisible();
         TreeView1.ExpandAll();
     }
 }
Exemplo n.º 23
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (Button1.Text == "dell-管理/全展開")
     {
         TreeView1.ExpandAll();
         Button1.Text = "dell-管理/全收合";
     }
     else if (Button1.Text == "dell-管理/全收合")
     {
         TreeView1.CollapseAll();
         Button1.Text = "dell-管理/全展開";
     }
 }
Exemplo n.º 24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if ((Session["userid"].ToString() == ""))
        {
            Server.Transfer("login.aspx");
        }

        if ((this.IsPostBack == false))
        {
            buildtreeview(0, TreeView1.Nodes);
            Hidden_upper.Value = "0";
            upperid.DataBind();
            TreeView1.ExpandAll();
        }
    }
Exemplo n.º 25
0
 //The Delete was accepted
 protected void AcceptDeleteButton_Click(object sender, EventArgs e)
 {
     using (SliceOfPieClient.Service.SliceOfPieServiceClient serv = new SliceOfPieClient.Service.SliceOfPieServiceClient())
     {
         serv.DeleteDocument(activeProject.Id, activeDoc.Id, WelcomeForm.active);
         // Turns the panels invisible
         DynamicPanelInvisible();
         DynamicProjectPanelInvisible();
         // Updates the view
         UpdateProjects();
         UpdateTreeView(activeProject.Id);
         // And expands the tree for the user
         TreeView1.ExpandAll();
     }
 }
Exemplo n.º 26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["project_id"] != null)
     {
         val  = Session["project_id"].ToString() + "_Task";
         val1 = Session["project_id"].ToString() + "_contra";
         val2 = Session["project_id"].ToString() + "_journal";
         h4   = val;
         string val3 = Session["project_id"].ToString();
         string op;
         string strquery       = "select proj_status from project_registration where proj_regi_id='" + val3 + "'";
         String strConnString1 = System.Configuration.ConfigurationManager
                                 .ConnectionStrings["conString"].ConnectionString;
         SqlConnection con1 = new SqlConnection(strConnString1);
         con1.Open();
         SqlDataReader dr;
         SqlCommand    cmd = new SqlCommand(strquery, con1);
         dr = cmd.ExecuteReader();
         while (dr.Read())
         {
             op = dr.GetString(0);
             if (op == "Disabled")
             {
                 Response.Redirect("Update_project.aspx?status=false");
             }
         }
         dr.Close();
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
     if (!Page.IsPostBack)
     {
         string stats = Request.QueryString["id"];
         if (stats != null)
         {
             Response.Write("<script>alert('Task Has Successfully Been Deleted');</script>");
         }
         string stats1 = Request.QueryString["id1"];
         if (stats1 != null)
         {
             Response.Write("<script>alert('Task Has Successfully Been Updated');</script>");
         }
         PopulateRootLevel();
         TreeView1.ExpandAll();
     }
 }
Exemplo n.º 27
0
        private void changeExpandCollapseAll()
        {
            //repaintTreeView();

            if (CheckBox_TreeViewExpandAll.Checked)
            {
                TreeView1.ExpandAll();
            }
            else
            {
                TreeView1.CollapseAll();
            }

            //si se colapsan topdos, solo q ueda la raiz, para evitar esto expandemos el nodo raiz
            TreeView1.Nodes[0].Expand();
        }
Exemplo n.º 28
0
        private void button1_Click(object sender, EventArgs e)
        {
            var BytesIn = HexStrToByteArray(RichTextBox1.Text.Replace(" ", ""));

            if (BytesIn != null)
            {
                ProtoBuff.TreeNodeStruct NodeStruct = new ProtoBuff.TreeNodeStruct();
                NodeStruct.NodeList   = new List <TreeNode>();
                NodeStruct.parentNode = new TreeNode("Proto");
                NodeStruct.NodeList.Add(NodeStruct.parentNode);
                TreeView1.Nodes.Clear();
                NodeStruct = ProtoBuff.QuickDecodeProto(BytesIn, "", NodeStruct);
                TreeView1.Nodes.AddRange(NodeStruct.NodeList.ToArray());
                TreeView1.ExpandAll();
            }
        }
Exemplo n.º 29
0
        //  Start of treeview1 code
        private void PopulateTreeView()
        {
            TreeNode rootNode;

            if (directoryInfo.Exists)
            {
                rootNode = new TreeNode(directoryInfo.Name)
                {
                    Tag = directoryInfo
                };

                GetDirectories(directoryInfo.GetDirectories(), rootNode);
                TreeView1.Nodes.Add(rootNode);
                TreeView1.ExpandAll();
            }
        }
Exemplo n.º 30
0
    private void FindMatch(TreeNode currentNode)
    {
        string[] tokens = currentNode.Text.Split(':');
        if (tokens.Length > 1)
        {
            if (tokens[1].Contains(TxtSearch.Text.ToUpper()))
            {
                TreeView1.ExpandAll();
                //currentNode.Expand();

                currentNode.ShowCheckBox = true;
                currentNode.Checked      = true;
                currentNode.Select();
                currentNode.Expand();
            }
            else if (tokens[0].Contains(TxtSearch.Text.ToUpper()))
            {
                //TreeView1.ExpandAll();
                currentNode.Expand();

                currentNode.ShowCheckBox = true;
                currentNode.Checked      = true;
                currentNode.Select();

                currentNode.Expand();
            }
            else
            {
            }
        }
        else if (tokens.Length == 1)
        {
            if (tokens[0].Contains(TxtSearch.Text.ToUpper()))
            {
                //TreeView1.ExpandAll();
                currentNode.Expand();

                currentNode.ShowCheckBox = true;
                currentNode.Checked      = true;
                currentNode.Select();
            }

            else
            {
            }
        }
    }