public static DataTable GetEmployeeListWithPaging(string PostHeld, int startIndex, int pageSize , out int totalCount)
{
SqlParameter parTotalCount = new SqlParameter("TotalCount", SqlDbType.Int);
parTotalCount.Direction = ParameterDirection.Output;
SqlParameter[] param = { new SqlParameter("postheld", PostHeld),
new SqlParameter("StartIndex", startIndex),
new SqlParameter("PageSize",pageSize) ,
parTotalCount };
//new DataAccess().Read("read_cadre_info_paging", param);
//totalCount = Convert.ToInt32(parTotalCount.Value);
DataTable dt = new DataAccess().Read("read_cadre_info_paging", param).Tables[0];
totalCount = Convert.ToInt32(parTotalCount.Value);
return dt;
}
// calling of above function
int totalRowCount = 0;
int startRowNumber = ((currentPage) * pageSize) + 1;
DataTable dt = Repository.GetEmployeeListWithPaging(PostHeld,startRowNumber, pageSize,out totalRowCount);
https://www.codeproject.com/Questions/539269/outputplusparameterplusinplusstoredplusprocedurepl
No comments:
Post a Comment