private DataTable f_getIndust() { try { string sql = @"select distinct a.JLSchedule_ID,a.place,a.stype, c.JobCategory,d.CompanyLogo from JL_JobLandingSchedule as a join JL_TimeLine as b on b.JLSchedule_ID = a.JLSchedule_ID join JL_PositionOffer as c on c.PositionOffer_ID = b.PositionOffer_ID join JL_Company as d on d.Company_ID = c.Company_ID where a.IndustryCategory_ID=@IndustryCategory_ID and b.PositionOffer_ID is not null and a.IsActive = '1' and b.IsActive = '1' and c.IsActive='1' and d.IsActive = '1' order by a.JLSchedule_ID"; SqlParameter sp1 = new SqlParameter("@IndustryCategory_ID", this.industid); SqlParameter[] sps = new SqlParameter[1] { sp1 }; DataControlDB dcdb = new DataControlDB(); dcdb.OpenConnection(); schTable = dcdb.ExecuteQueryReturnTable(sql, sps); dcdb.CloseConnection(); return schTable; } catch { return null; } }
private DataTable f_getIndust() { try { string sql = @"select top 7 a.IndustryCategory_ID,a.IndustryCategory,COUNT(a.IndustryCategory_ID) as industSchCount from Sys_IndustryCategory as a left join JL_JobLandingSchedule as b on b.IndustryCategory_ID = a.IndustryCategory_ID where a.IsActive='1' and b.IsActive='1' and a.IndustryCategory <> ' ---' group by a.IndustryCategory_ID,a.IndustryCategory order by industSchCount desc"; SqlParameter[] sps = new SqlParameter[] { }; DataControlDB dcdb = new DataControlDB(); dcdb.OpenConnection(); industTable = dcdb.ExecuteQueryReturnTable(sql, sps); dcdb.CloseConnection(); return industTable; } catch { return null; } }