private string GetProjectInfo(string projectId) { string projectInfo = ""; if (!string.IsNullOrEmpty(projectId) && PageUtil.IsInteger(projectId)) { Project p = new Project(); p.Get(int.Parse(projectId)); projectInfo = p[Project.ProjectNum].ToString() + " : " + p[Project.Title].ToString(); ProjectManagementDa pmDa = new ProjectManagementDa(); DataTable organizations = pmDa.GetAllOrganizationsSortedByProjectId(int.Parse(projectId)); string orgList = ""; foreach (DataRow dr in organizations.Rows) { orgList += dr[ProjectOrganization.Name].ToString() + "\n"; } string url = Page.ResolveUrl("~/Core/Utilities/ModuleContainer.aspx?mod=/ProjectMgmt/Index.aspx"); string projectPath = "top.window.location = '" + url + "?projectId=" + projectId + "'"; ProjectIdLink.Attributes.Add("onclick", projectPath); ProjectId.ToolTip = orgList; } return(projectInfo); }
public ProjectCommunicationLogDetails() : base() { // set project id this.Load += (a, b) => { projectId = int.Parse(ProjectId); // fill lists AllContacts = da.GetAllContactsWithOrgNameByProjectId(projectId).DefaultView; AllOrganizations = da.GetAllOrganizationsSortedByProjectId(projectId).DefaultView; }; }
/// <summary> /// Binds the various summary info grids /// </summary> /// <param name="projectId"></param> protected void BindGrids(int projectId) { ProjectManagementDa da = new ProjectManagementDa(); OrganizationsGrid.DataSource = da.GetAllOrganizationsSortedByProjectId(projectId); OrganizationsGrid.DataBind(); ContactsGrid.DataSource = da.GetProjectContactsByProjectId(projectId); ContactsGrid.DataBind(); //BusinessObject.ProjectManuscript bizMan = new BusinessObject.ProjectManuscript(); //bizMan.GetByParent(projectId); //ManuscriptGrid.DataSource = bizMan.DataSourceView; ManuscriptGrid.DataSource = BusinessObject.GetByParentAsDataView <BOL.ProjectManuscript>(projectId); ManuscriptGrid.DataBind(); //ProjectFundingSource biz = new ProjectFundingSource(); //biz.GetByParent(projectId); //FundingGrid.DataSource = biz.DataSourceView; FundingGrid.DataSource = BusinessObject.GetByParentAsDataView <ProjectFundingSource>(projectId); FundingGrid.DataBind(); }