⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 projectreportcategory.cs

📁 asp.net办公自动化实例导航——非常经典的OA源代码
💻 CS
字号:
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;
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -