Click here to Skip to main content
15,889,859 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
<pre> 
private void   fillLinkGraph_Video()
        {
            try
            {
                #region To Clear the data of Link Graph
                graphControl.Graph.Clear();

                //if ()
                 string _videoID = "1,2,3,4,5,6,7,8,9";
             
                {
                    //To fill datatable to bring video and event  to link chart
                  
                     string _query_case = "Select [Video_Id], [Event] from [Case_InvstVideoMaster]  where [Case_Id]='" + Value.ValueG._caseID + "' and  Video_Id in(" + _videoID + ")";
                
                    DataTable dt_object_info =bfc.fill_datatable(_query_case);

                    string eventIconpath = bfc.fill_sigle_value("Select [Icon_File_Path] from [Icon_List] where [Icon_Name] = 'Event' and [Icon_List_Name] ='Mater_Icon'") + "\\" + bfc.fill_sigle_value("Select [Icon_File_Name] from [Icon_List] where[Icon_Name] = 'Event' and[Icon_List_Name] = 'Mater_Icon'");
                    string videoIconpath = bfc.fill_sigle_value("Select [Icon_File_Path] from [Icon_List] where [Icon_Name] = 'Video' and [Icon_List_Name] ='Mater_Icon'") + "\\" + bfc.fill_sigle_value("Select [Icon_File_Name] from [Icon_List] where[Icon_Name] = 'Video' and[Icon_List_Name] = 'Mater_Icon'");
                    Dictionary<string, INode> discVideoObj = new Dictionary<string, INode>();

                    Dictionary<string, IEdge> discEdgeObj = new Dictionary<string, IEdge>();

                    for (int j = 0; j < dt_object_info.Rows.Count; j++)
                    {
                        string lbl_video = "Video" + dt_object_info.Rows[j]["Video_Id"].ToString();
                        string lbl_Event = "Event" + dt_object_info.Rows[j]["Event"].ToString();

                          
                         string lbl_edge = "edge";


                        INode obj_video = null;
                        INode obj_event = null;

                         IEdge obj_edge = null;
                        string edge_Tag = null;

                        if (discVideoObj.Count > 0)
                        {
                            if (discVideoObj.Keys.Contains(lbl_video))
                            {
                                obj_video = discVideoObj[lbl_video];
                            }
                            else
                            {
                                obj_video = yfunc.addINode_onGraph(lbl_video, videoIconpath, lbl_video, graphControl);
                                discVideoObj.Add(lbl_video, obj_video);
                            }
                            if (discVideoObj.Keys.Contains(lbl_Event))
                            {
                                obj_event = discVideoObj[lbl_Event];
                            }
                            else
                            {
                                obj_event = yfunc.addINode_onGraph(lbl_Event, eventIconpath, lbl_Event, graphControl);
                                discVideoObj.Add(lbl_Event, obj_event);
                            }
                           
                         
                            

                        }
                        else
                        {
                            obj_video = yfunc.addINode_onGraph(lbl_video, videoIconpath, lbl_video, graphControl);
                            discVideoObj.Add(lbl_video, obj_video);

                            obj_event = yfunc.addINode_onGraph(lbl_Event, eventIconpath, lbl_Event, graphControl);
                            discVideoObj.Add(lbl_Event, obj_event);
                        }

                                              
                        {


                            if(obj_video != null && obj_event != null)
                            obj_edge = yfunc.Add_edge_to_graph(graphControl, obj_video, obj_event, lbl_edge, edge_Tag);
                            //discEdgeObj.Add(lbl_edge, obj_edge);

                        }
                    }

                    yfunc.setLayouts(graphControl, "circular");
                   
                    
                }
            }

            catch (System.NullReferenceException)
            {

            }
            catch (Exception ex1)
            {

            }
        }


What I have tried:

i want to get it with the help of valueg.cs.somemone can help me
Posted
Comments
Richard Deeming 11-Jul-23 9:32am    
If you want someone to help you, you need to explain precisely what you are trying to do, what you have tried, and where you are stuck.

Dumping almost 100 lines of unexplained code and expecting us to work out what you want and how to achieve it does not make for a good question.
VINEETH5 JUN2023 12-Jul-23 2:45am    
THIS A A code to make nodes and edges in igraph.in here the value in the videoid are manually inserted by me.i want to get the videoid according to case and event after checking the condition.in here i want to get the videoid from value.cs class dynamically

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900