ProjectReportCategory.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:2k
- using System;
- using System.Configuration;
- using System.Data;
- using qminoa.DA;
- namespace qminoa.BLL.PM
- {
- public class ProjectReportCategory
- {
- private decimal _actualHours;
- private int _categoryID;
- private string _categoryName;
- private string _categoryShortName;
- private decimal _estDuration;
- public ProjectReportCategory()
- {
- _categoryID = 0;
- _categoryName = string.Empty;
- _categoryShortName = string.Empty;
- _estDuration = 0M;
- _actualHours = 0M;
- }
- public decimal ActualHours
- {
- get { return _actualHours; }
- set { _actualHours = value; }
- }
-
- public int CategoryID
- {
- get { return _categoryID; }
- set { _categoryID = value; }
- }
- public string CategoryName
- {
- get { return _categoryName; }
- set { _categoryName = value; }
- }
- public string CategoryShortName
- {
- get { return _categoryShortName; }
- set { _categoryShortName = value; }
- }
- public decimal EstDuration
- {
- get { return _estDuration; }
- set { _estDuration = value; }
- }
- public static ProjectReportCategoryCollection GetCategorySummary(int projectID)
- {
- DataSet dsCats = SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings["ConnectionString"],
- "PM_ListCategoriesByProject", projectID);
- ProjectReportCategoryCollection categoryList = new ProjectReportCategoryCollection();
- foreach(DataRow row in dsCats.Tables[0].Rows)
- {
- ProjectReportCategory cat = new ProjectReportCategory();
- cat.CategoryID = Convert.ToInt32(row["CategoryID"]);
- cat.CategoryName = row["Name"].ToString();
- cat.CategoryShortName = row["CategoryShortName"].ToString();
- cat.EstDuration = Convert.ToDecimal(row["EstDuration"]);
- cat.ActualHours = Convert.ToDecimal(row["ActualHours"]);
- categoryList.Add(cat);
- }
-
- return categoryList;
- }
- }
- }