var Center_List = string.Format("CenterList_{0}", (int)LoggedInOrganizationID);
var centerList = new List<DBCenterDetailModel>();
if (Session[Center_List] != null)
centerList = Session[Center_List] as List<DBCenterDetailModel>;
else
{
var param = new { OrgId = (int)LoggedInOrganizationID, OfficeId = SessionHelper.LoginUserOfficeID};
var alldata = ultimateReportService.GetDataWithParameter(param, "GetCenterData");
centerList = alldata.Tables[0].AsEnumerable()
.Select(row => new DBCenterDetailModel
{
CenterID = row.Field<int>("CenterID"),
CenterCode = row.Field<string>("CenterCode"),
OfficeID = row.Field<int>("OfficeID"),
OfficeCode = row.Field<string>("OfficeCode"),
OfficeName = row.Field<string>("OfficeName")
}).ToList();
Session[Center_List] = centerList;
}