Generate Genealogy view in mvc C# using Google Organizational Chart
C#
//*
[WebMethod]
public List<Google_org_data> getOrgData()
{
List<Google_org_data> g = new List<Google_org_data>();
DataTable myData = getDataTable();
g.Add(new Google_org_data {
Employee = "Rocky Balboa",
Manager = "",
mgrID = "",
empID = "13",
designation = "CEO"
});
foreach (DataRow row in myData.Rows)
{
string empName = row["EmpName"].ToString();
var mgrName = row["MgrName"].ToString();
var mgrID = row["mgrID"].ToString();
var empID = row["empID"].ToString();
var designation = row["designation"].ToString();
g.Add(new Google_org_data{
Employee = empName,
Manager = mgrName,
mgrID = mgrID,
empID = empID,
designation = designation
});
}
return g;
}
public DataTable getDataTable()
{
DataTable dt = new DataTable();
string query = " select a.employee_name as EmpName,a.id_emp as empID,a.designation,b.employee_name as MgrName,b.id_emp as mgrID";
query += " from tb_employee a inner join tb_employee b on a.manager_id=b.id_emp";
SqlDataAdapter dap = new SqlDataAdapter(query, con);
DataSet ds = new DataSet();
dap.Fill(ds);
return ds.Tables[0];
}
//*
Also in C#:
- Title
- c# file exist
- Category
- C#
- Title
- c# quaternion eular calculator
- Category
- C#
- Title
- c# data types
- Category
- C#
- Title
- 5 second timer in c#
- Category
- C#
- Title
- get web config key value in c# razor view
- Category
- C#
- Title
- first person camera controller unity
- Category
- C#
- Title
- choose random gameobject from a gameobject list
- Category
- C#
- Title
- C# move form without border
- Category
- C#
- Title
- how to name GameObject in c#
- Category
- C#
- Title
- Celsius to Fahrenheit c#
- Category
- C#
- Title
- get number of sundays in a month c#
- Category
- C#
- Title
- C# graph api upload file one drive
- Category
- C#
- Title
- Unity C# add slider into editor
- Category
- C#
- Title
- c# MD5.Create returning nul
- Category
- C#
- Title
- c# trim string
- Category
- C#
- Title
- asp net identity include phone number when registering
- Category
- C#
- Title
- c# window instantly close
- Category
- C#
- Title
- c# shuffle string array
- Category
- C#
- Title
- unity connect to firebase
- Category
- C#
- Title
- display none asp.net
- Category
- C#
- Title
- find gameobject with tag
- Category
- C#
- Title
- c# distinct array of objects by values
- Category
- C#
- Title
- unity how to move an object
- Category
- C#
- Title
- s3 upload base64 .net core
- Category
- C#
- Title
- c# string formatting
- Category
- C#
- Title
- unity inspector header attribute
- Category
- C#
- Title
- unity getkey keycode
- Category
- C#
- Title
- downlaod file and use C#
- Category
- C#
- Title
- c# find duplicates in list of strings
- Category
- C#
- Title
- run async method parallel c#
- Category
- C#
- Title
- c# get set
- Category
- C#
- Title
- c# save pdf to folder
- Category
- C#
- Title
- change textbox location C#
- Category
- C#
- Title
- unity draw wire square
- Category
- C#
- Title
- count the number of notes in a given amount c#
- Category
- C#
- Title
- set width of rect transform unity
- Category
- C#
- Title
- unity custom editor save changes
- Category
- C#
- Title
- fahrenheit to celsius c#
- Category
- C#
- Title
- button commandfield commandargument pass textbox
- Category
- C#
- Title
- c# array inst working
- Category
- C#
- Title
- check for collision unity c#
- Category
- C#
- Title
- moq raise event
- Category
- C#
- Title
- vector3.lerp
- Category
- C#
- Title
- c# to binary
- Category
- C#
- Title
- dont destroy on load unity
- Category
- C#
- Title
- cursorlockmode cannot be used as a method C#
- Category
- C#
- Title
- unity rigidbody constraints
- Category
- C#
- Title
- unity to string
- Category
- C#
- Title
- how to pause physics in unity c#
- Category
- C#
- Title
- eager loading vs lazy loading c#
- Category
- C#
- Title
- wpf binding object get value
- Category
- C#
- Title
- unity find object by name
- Category
- C#
- Title
- copy a list in c# unity
- Category
- C#
- Title
- eventos c#
- Category
- C#
- Title
- c# get binary array from int
- Category
- C#
- Title
- double tryparse dot comma
- Category
- C#
- Title
- how to print statement in c#
- Category
- C#
- Title
- unity persistent data
- Category
- C#
- Title
- c# get char from string
- Category
- C#
- Title
- iformfile blobclient
- Category
- C#
- Title
- unity ai wander script
- Category
- C#
- Title
- asp.net textarea disable resize
- Category
- C#
- Title
- rotate to face direction
- Category
- C#
- Title
- clear combobox c#
- Category
- C#
- Title
- unity cycle children
- Category
- C#
- Title
- snippet to create constructor in asp.net c#
- Category
- C#
- Title
- console application in c# ms crm
- Category
- C#
- Title
- c# null conditional operator if statement
- Category
- C#
- Title
- c sharp tryparse
- Category
- C#
- Title
- blazor wasm routable page in separate project
- Category
- C#
- Title
- chase object unity
- Category
- C#
- Title
- or symbol in unity
- Category
- C#
- Title
- c# md5 int
- Category
- C#
- Title
- how to get array of children transform
- Category
- C#
- Title
- unity instantiate
- Category
- C#
- Title
- check if number is even or odd c#
- Category
- C#
- Title
- rotatearound unity
- Category
- C#
- Title
- Movement 2d unity
- Category
- C#
- Title
- firefoxoptions setpreference to trust certificates
- Category
- C#
- Title
- what is type unity
- Category
- C#
- Title
- asp list box
- Category
- C#
- Title
- what does gameobject.find return
- Category
- C#
- Title
- c# list append
- Category
- C#
- Title
- c# select first value from list
- Category
- C#
- Title
- c# implement a superclass in subclass
- Category
- C#
- Title
- how to make rb.addforce 2d
- Category
- C#
- Title
- c# silent execute exe
- Category
- C#
- Title
- see if two string arrays are equal c#
- Category
- C#
- Title
- while loop c#
- Category
- C#
- Title
- create line in unity
- Category
- C#
- Title
- Unity3d GPS code
- Category
- C#
- Title
- c# resize bitmap
- Category
- C#
- Title
- c# else if
- Category
- C#
- Title
- unity cancel invokerepeating
- Category
- C#
- Title
- how to set a transform equal to something unity
- Category
- C#
- Title
- convert array to list Unity C#
- Category
- C#
- Title
- query into complex object using dapper
- Category
- C#
- Title
- const float c#
- Category
- C#
- Title
- unity move character
- Category
- C#
- Title
- how to declare variables in c#
- Category
- C#