I have to show these details in a gridview as Tempname as unique and associated datetime in drodown and the last run by name in a label. Unable to upload the Table picture as i dont have enough reputation.
private void GridLoading()
{
DataSet ds = new DataSet();
ds = Common.LoadingGrid();
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataSet ds = new DataSet();
Label lblName = e.Row.FindControl("Label1") as Label;
ds = Common.RunByDate(lblName.Text);
DropDownList ddl = e.Row.FindControl("DropDownList1") as DropDownList;
ddl.DataTextField = "RunDate";
ddl.DataValueField = "RunDate";
ddl.DataSource = ds;
ddl.DataBind();
var items = ddl.Items;
}
}
But i am unable to get the Runby name in the label.How can i display it?Below are my stored procedures
Select distinct TempName from SV_JobHistoryTable
SELECT TempName,RunDate
FROM SV_JobHistoryTable where TempName=@tempname