public void drawProjects(List <VIva2DataAccess.Projects> projects, List <VIva2DataAccess.uvw_ProjectDetails> projectsDetails) { int i = 0; foreach (VIva2DataAccess.Projects item in projects) { i++; item.ImagePath = "../Images/image" + i + ".jpg"; var itemDetails = projectsDetails.Where(x => x.Project_ID == item.Project_ID).SingleOrDefault(); Project_Generator pr = new Project_Generator(item, itemDetails); ShowProjects.Controls.Add(pr.RenderProjectPreview()); } }
public void drawProject(VIva2DataAccess.Projects project, VIva2DataAccess.uvw_ProjectDetails projectsDetail , List <VIva2DataAccess.Backers> projectsBacker, List <VIva2DataAccess.Rewards> projectsRewards , Panel categorization, List <VIva2DataAccess.Images> projectsImages) { project.ImagePath = "../Images/image" + project_id + ".jpg"; Project_Generator pr = new Project_Generator(); pr._project = project; pr._projectDetails = projectsDetail; pr._projectBackers = projectsBacker; pr._projectRewards = projectsRewards; pr._projectImages = projectsImages; pr._categorization = categorization; pr.editMode = editMode; ShowProject.Controls.Add(pr.RenderProject()); }