ProjectReportCategoryCollection categoryList

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;
  }
 }
}




using System;
using System.Collections;

namespace qminoa.BLL.PM
{
 public class ProjectReportCategoryCollection : ArrayList
 { 
  public enum ProjectReportCategoryFields
  {
  }
  
  public void Sort(ProjectReportCategoryFields sortField, bool isAscending)
  {
  }
 }
}

發佈了31 篇原創文章 · 獲贊 3 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章