ProjectReportProject.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:2k
源码类别:

.net编程

开发平台:

Others

  1. using System;
  2. using System.Configuration;
  3. using System.Data;
  4. using qminoa.DA;
  5. namespace qminoa.BLL.PM
  6. {
  7. public class ProjectReportProject
  8. {
  9. private decimal _actualHours;
  10. private DateTime _estCompletionDate;
  11. private decimal _estHours;
  12. private int _projectID;
  13. private string _projectName;
  14. public ProjectReportProject()
  15. {
  16. _projectID = 0;
  17. _projectName = string.Empty;
  18. _estCompletionDate = DateTime.MinValue;
  19. _estHours = 0M;
  20. _actualHours = 0M;
  21. }
  22. public decimal ActualHours
  23. {
  24. get { return _actualHours; }
  25. set { _actualHours = value; }
  26. }
  27. public DateTime EstCompletionDate 
  28. {
  29. get { return _estCompletionDate; }
  30. set { _estCompletionDate = value; }
  31. }
  32. public decimal EstHours
  33. {
  34. get { return _estHours; }
  35. set { _estHours = value; }
  36. }
  37. public int ProjectID 
  38. {
  39. get {return _projectID;}
  40. set { _projectID = value; }
  41. }
  42. public string ProjectName 
  43. {
  44. get { return _projectName; }
  45. set { _projectName = value; }
  46. }
  47. public static ProjectReportProjectCollection GetProjectSummary(string projectIdList, int userID)
  48. {
  49. DataSet dsProjects = SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings["ConnectionString"], 
  50. "PM_ListProjectsByIDs", projectIdList, userID);
  51. ProjectReportProjectCollection projectList = new ProjectReportProjectCollection();
  52. foreach(DataRow row in dsProjects.Tables[0].Rows)
  53. {
  54. ProjectReportProject proj = new ProjectReportProject();
  55. proj.ProjectID = Convert.ToInt32(row["ProjectID"]);
  56. proj.ProjectName = row["ProjectName"].ToString();
  57. proj.EstCompletionDate = Convert.ToDateTime(row["EstCompletionDate"]);
  58. proj.EstHours = Convert.ToDecimal(row["EstHours"]);
  59. proj.ActualHours = Convert.ToDecimal(row["ActualHours"]);
  60. projectList.Add(proj);
  61. }
  62. return projectList;
  63. }
  64. }
  65. }