public static List <BugModel> LoadBugs() { string sql = @"select * from dbo.BugRecords"; return(BugSqlDataAccess.LoadData <BugModel>(sql)); }
public static List <CatalogModel> ViewCatalog(string id) { string sql = "select dbo.BugRecords.Id,Title, Source, Description, DeadlineFinal, Status, dbo.EmpAuth.Username from dbo.BugRecords inner join dbo.EmpAuth " + "on dbo.BugRecords.Source=dbo.EmpAuth.Project "; List <CatalogModel> nq = BugSqlDataAccess.LoadData <CatalogModel>(sql); List <CatalogModel> bq = new List <CatalogModel>(); foreach (var row in nq) { if (row.Username == id) { bq.Add(row); } } return(bq); }