資源簡介
很簡單,很實用。三層架構,.net 平臺,c#開發。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?Models;
using?DAL;
namespace?BLL
{
????public?class?BugManager
????{
????????static?BugService?service;
????????static?BugManager()
????????{
????????????service?=?new?BugService();
????????}
????????///?
????????///?按項目查看已關閉Bug
????????///?
????????///?
????????///?
????????public?static?IList?GetClosedBugsByProjectId(int?id)
????????{
????????????return?service.GetBugsByCondition(“State=3?AND?ModelsId?IN?(SELECT?Id?FROM?Models?WHERE?ProjectId?=?“?+?id?+?“)“);
????????}
????????///?
????????///?按項目查看已分配Bug
????????///?
????????///?
????????///?
????????public?static?IList?GetAssignedBugsByProjectId(int?id)
????????{
????????????return?service.GetBugsByCondition(“State=1?AND?ModelsId?IN?(SELECT?Id?FROM?Models?WHERE?ProjectId?=?“?+?id?+?“)“);
????????}
????????///?
????????///?按項目查看新建Bug
????????///?
????????///?
????????///?
????????public?static?IList?GetNewBugsByProjectId(int?id)
????????{
????????????return?service.GetBugsByCondition(“State=0?AND?ModelsId?IN?(SELECT?Id?FROM?Models?WHERE?ProjectId?=?“?+?id?+?“)“);
????????}
????????///?
????????///?按項目查看已完成Bug
????????///?
????????///?
????????///?
????????public?static?IList?GetResolvedBugsByProjectId(int?id)
????????{
????????????return?service.GetBugsByCondition(“State=2?AND?ModelsId?IN?(SELECT?Id?FROM?Models?WHERE?ProjectId?=?“?+?id?+?“)“);
????????}
????????///?
????????///?分配Bug
????????///?
????????///?
????????///?
????????public?static?void?AssignBugs(List?list?int?userId)
????????{
????????????foreach?(int?id?in?list)
????????????{
????????????????Bug?bug?=?service.GetBugById(id);
????????????????bug.State?=?1;
????????????????User?user?=?new?User();
????????????????user.Id?=?userId;
????????????????bug.ToUser?=?user;
????????????????service.UpdateBug(bug);
????????????}
????????}
????????///?
????????///?關閉Bug
????????///?
????????///?
????????public?static?void?CloseBugs(List?list)
????????{
????????????foreach?(int?id?in?list)
????????????{
????????????????Bug?bug?=?service.GetBugById(id);
????????????????bug.State?=?3;
????????????????service.UpdateBug(bug);
????????????}
????????}
????????///?
????????///?查詢分配給自己的Bug
????????///?
????????///?
????????///?
????????public?static?IList?GetUserBugsByassigind(int?userId)
????????{
????????????string?sql?=?string.Format(“touser={0}?and?State?=?‘1‘“?userId);
????????????return?service.GetBugsByC
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????16384??2008-10-31?15:23??DALFactory\bin\Debug\DALFactory.dll
?????文件???????7680??2008-10-31?15:23??DALFactory\bin\Debug\DALFactory.pdb
?????文件????????146??2008-10-30?13:10??DALFactory\DALFactory.cs
?????文件???????1961??2008-10-30?13:17??DALFactory\DALFactory.csproj
?????文件????????168??2008-10-30?12:31??DALFactory\DALFactory.csproj.user
?????文件????????146??2008-11-04?10:44??DALFactory\obj\DALFactory.csproj.FileList.txt
?????文件??????16384??2008-10-31?15:23??DALFactory\obj\Debug\DALFactory.dll
?????文件???????7680??2008-10-31?15:23??DALFactory\obj\Debug\DALFactory.pdb
?????文件???????1363??2008-10-30?12:11??DALFactory\Properties\AssemblyInfo.cs
?????文件????3145728??2010-06-07?09:13??DB_51aspx\BugManager.mdf
?????文件????1048576??2010-06-07?09:13??DB_51aspx\BugManager_log.ldf
????..A.SH.??????8192??2008-10-30?16:33??Document\Thumbs.db
?????文件????????283??2008-10-31?08:48??Document\埃保常.txt
?????文件???????1219??2008-10-30?18:56??Document\數據字典.txt
?????文件????????161??2008-10-30?12:07??Document\說明.txt
?????文件??????16384??2009-02-05?11:45??IDAL\bin\Debug\IDAL.dll
?????文件???????7680??2009-02-05?11:45??IDAL\bin\Debug\IDAL.pdb
?????文件??????24576??2009-02-05?11:45??IDAL\bin\Debug\Models.dll
?????文件??????50688??2009-02-05?11:45??IDAL\bin\Debug\Models.pdb
?????文件????????555??2008-10-30?12:31??IDAL\IBugService.cs
?????文件????????627??2008-10-30?12:31??IDAL\IBugWorkService.cs
?????文件???????2335??2008-11-06?21:01??IDAL\IDAL.csproj
?????文件????????168??2008-10-30?12:28??IDAL\IDAL.csproj.user
?????文件????????591??2008-10-30?12:31??IDAL\IModelService.cs
?????文件????????627??2008-10-30?12:31??IDAL\IProjectService.cs
?????文件????????573??2008-10-30?12:31??IDAL\IUserService.cs
?????文件??????16384??2009-02-05?11:45??IDAL\obj\Debug\IDAL.dll
?????文件???????7680??2009-02-05?11:45??IDAL\obj\Debug\IDAL.pdb
?????文件??????16384??2008-11-07?08:21??IDAL\obj\Debug\Refactor\IDAL.dll
?????文件???????2653??2009-02-05?11:45??IDAL\obj\Debug\ResolveAssemblyReference.cache
............此處省略197個文件信息
- 上一篇:倉庫管理系統 源碼程序
- 下一篇:Asp.net中型在線系統開發實踐 源代碼
評論
共有 條評論