I want to fetch data from the database for that I use SP i.e.
if(@type=7) BEGIN SELECT P.Id as ProjectID ,A.[Id] as ActivityID --,A.[Name] As ActivityName ,CONCAT(A.[Name],(Select top(1) CONCAT(' ( ',Y.Name,' )') from [dbo].[ProjectActivityMasters] x join Sectors y on x.AltSectorId=y.Id where x.Id=A.Id)) As ActivityName ,CASE WHEN A.[Role] is NULL THEN 'Applicant Level' WHEN A.[Role]='fo' then 'Departmental Level' end as ActivityLevel ,(Select Sum(ApplicationsApproved) from [dbo].[Dashboard_ApplicationsStatistics] where ActivityID=A.Id) as ApplicationsApproved ,(Select Sum(ApplicationsRejected) from [dbo].[Dashboard_ApplicationsStatistics] where ActivityID=A.Id) as ApplicationsRejected ,(Select Sum(ApplicationsUnderProcess)+SUM(ApplicationsPending) from [dbo].[Dashboard_ApplicationsStatistics] where ActivityID=A.Id) as ApplicationsUnderProcess FROM [dbo].[ProjectActivityMasters] A RIGHT JOIN [dbo].[Projects] P
on A.ProjectId=P.Id where P.id=@ProjectID and A.IsActive=1 ORDER BY a.Role END
for display records I implement this way
<asp:Repeater runat="server" ID="RepeaterActivitywiseDisplay" OnItemDataBound="RepeaterActivitywiseDisplay_ItemDataBound"> <ItemTemplate> <div class="row"> <div class="col-12 col-lg-12 col-xxl-12 d-flex"> <div class="card flex-fill"> <div class="card-header"> <h5 class="card-title mb-0"><span class="fw-600"><%# Eval("ActivityName") + "-[" + Eval("ActivityLevel") + "]" %></span></h5> </div> </div> </div>
<div class="col-md-3"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col mt-0"> <h5 class="card-title">Applications Approved</h5> </div>
<div class="col-auto"> <div class="stat text-primary"> <i class="align-middle" data-feather="award"></i> </div> </div> </div> <h1 class="mt-1 mb-3 text-success counter"><%# Eval("ApplicationsApproved") %></h1>
</div> </div> </div> <div class="col-md-3"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col mt-0"> <h5 class="card-title">Applications Rejected</h5> </div>
<div class="col-auto"> <div class="stat text-primary"> <i class="align-middle" data-feather="award"></i> </div> </div> </div> <h1 class="mt-1 mb-3 text-success counter"><%# Eval("ApplicationsRejected") %></h1>
</div> </div> </div> <div class="col-md-3"> <div class="card"> <div class="card-body"> <div class="row"> <div class="col mt-0"> <h5 class="card-title">Applications Under Process</h5> </div>
<div class="col-auto"> <div class="stat text-primary"> <i class="align-middle" data-feather="award"></i> </div> </div> </div> <h1 class="mt-1 mb-3 text-success counter"><%# Eval("ApplicationsUnderProcess") %></h1>
</div> </div> </div>
</div> </ItemTemplate> </asp:Repeater>
in the code, I used the method on page load but didn't get any record
private void BindRepeaterActivitywiseDisplay() { if (Session["ProjectID"] != null) { SqlParameter[] sqlParameters = { new SqlParameter("@type", "7"), new SqlParameter("@ProjectID", Session["ProjectID"].ToString()),
};
var ds = DbAccessLogic.GetData("DashboardData", sqlParameters);
if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) {
RepeaterActivitywiseDisplay.DataSource = ds; RepeaterActivitywiseDisplay.DataBind(); } } } I don't get where I am wrong, please suggest to me