In the following code, I'm trying to retrieve the ID of the manager which then has to be passed as the second parameter to the SQL Stored procedure as shown in the code below:
Currently the code uses only one parameter (EmpID).
void EmpProfileLists(string EmpId,string EmpName)
{
if (EmpId == "0")
{
Label2.Text = "There is no Emp associated with your account";
Label2.Visible = true;
}
else Label2.Visible = false;
try
{
Session["EmpId"] = EmpId;
Label1.Text = EmpId;
if (Session["MgrName"] != null) Session.Remove("MgrName");
var claimsIdentity = Context.Emp.Identity as ClaimsIdentity;
foreach (var claim in claimsIdentity.Claims)
{
{
Session.Add("MgrName", "micro\\"+Session["MgrName"].Substring(Session["MgrName"].LastIndexOf("/")));
}
}
string MgrName = Session["MgrName"].ToString();
LoadProfiles(EmpId);
}
catch (Exception)
{
}
}
private void LoadProfiles(string EmpId)
{
try
{
SqlDataAdapter da = new SqlDataAdapter("Exec EmpReports " + EmpId);
DataTable dt = new DataTable();
da.Fill(dt);
RadGrid1.DataBind();
}
catch (Exception)
{
}
}
The code works fine with just the employee id when passed, but I'm trying to add Manager ID as well.
Can someone please help?