ProjectReportProject.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:2k
- using System;
- using System.Configuration;
- using System.Data;
- using qminoa.DA;
- namespace qminoa.BLL.PM
- {
- public class ProjectReportProject
- {
- private decimal _actualHours;
- private DateTime _estCompletionDate;
- private decimal _estHours;
- private int _projectID;
- private string _projectName;
-
- public ProjectReportProject()
- {
- _projectID = 0;
- _projectName = string.Empty;
- _estCompletionDate = DateTime.MinValue;
- _estHours = 0M;
- _actualHours = 0M;
- }
- public decimal ActualHours
- {
- get { return _actualHours; }
- set { _actualHours = value; }
- }
- public DateTime EstCompletionDate
- {
- get { return _estCompletionDate; }
- set { _estCompletionDate = value; }
- }
- public decimal EstHours
- {
- get { return _estHours; }
- set { _estHours = value; }
- }
- public int ProjectID
- {
- get {return _projectID;}
- set { _projectID = value; }
- }
- public string ProjectName
- {
- get { return _projectName; }
- set { _projectName = value; }
- }
- public static ProjectReportProjectCollection GetProjectSummary(string projectIdList, int userID)
- {
- DataSet dsProjects = SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings["ConnectionString"],
- "PM_ListProjectsByIDs", projectIdList, userID);
- ProjectReportProjectCollection projectList = new ProjectReportProjectCollection();
-
- foreach(DataRow row in dsProjects.Tables[0].Rows)
- {
- ProjectReportProject proj = new ProjectReportProject();
- proj.ProjectID = Convert.ToInt32(row["ProjectID"]);
- proj.ProjectName = row["ProjectName"].ToString();
- proj.EstCompletionDate = Convert.ToDateTime(row["EstCompletionDate"]);
- proj.EstHours = Convert.ToDecimal(row["EstHours"]);
- proj.ActualHours = Convert.ToDecimal(row["ActualHours"]);
- projectList.Add(proj);
- }
-
- return projectList;
- }
- }
- }