提交代码
This commit is contained in:
@@ -438,7 +438,7 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.View_WBS> GetAllTreeDataTable2(string projectId, string IsOut, string startTime, string endTime, string isOK)
|
||||
public static List<Model.View_WBS> GetAllTreeDataTable2(string projectId, string IsOut, string startTime, string endTime, string isOK, string unitWorkId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -446,22 +446,43 @@ namespace BLL
|
||||
List<Model.View_WBS> newList = new List<Model.View_WBS>();
|
||||
if (getWBSs.Count() > 0)
|
||||
{
|
||||
|
||||
var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0");
|
||||
int a = 1;
|
||||
foreach (var item in projectTypes)
|
||||
if (unitWorkId == BLL.Const._Null)
|
||||
{
|
||||
item.Code = a.ToString();
|
||||
newList.Add(item);
|
||||
if (string.IsNullOrEmpty(IsOut))
|
||||
var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0");
|
||||
int a = 1;
|
||||
foreach (var item in projectTypes)
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime, isOK);
|
||||
item.Code = a.ToString();
|
||||
newList.Add(item);
|
||||
if (string.IsNullOrEmpty(IsOut))
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime, isOK);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime, isOK);
|
||||
}
|
||||
a++;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
var unitWork = getWBSs.Where(x => x.Id == unitWorkId);
|
||||
int a = 1;
|
||||
foreach (var item in unitWork)
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime, isOK);
|
||||
item.Code = a.ToString();
|
||||
newList.Add(item);
|
||||
if (string.IsNullOrEmpty(IsOut))
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime, isOK);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime, isOK);
|
||||
}
|
||||
a++;
|
||||
}
|
||||
a++;
|
||||
}
|
||||
}
|
||||
return newList;
|
||||
@@ -472,7 +493,7 @@ namespace BLL
|
||||
/// 获取模拟树表格
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DataTable GetAllTreeDataTable(string projectId, string IsOut, string startTime, string endTime, string isOK)
|
||||
public static DataTable GetAllTreeDataTable(string projectId, string IsOut, string startTime, string endTime, string isOK, string unitWorkId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -525,21 +546,43 @@ namespace BLL
|
||||
if (getWBSs.Count() > 0)
|
||||
{
|
||||
List<Model.View_WBS> newList = new List<Model.View_WBS>();
|
||||
var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0");
|
||||
int a = 1;
|
||||
foreach (var item in projectTypes)
|
||||
if (unitWorkId == BLL.Const._Null)
|
||||
{
|
||||
item.Code = a.ToString();
|
||||
newList.Add(item);
|
||||
if (string.IsNullOrEmpty(IsOut))
|
||||
var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0");
|
||||
int a = 1;
|
||||
foreach (var item in projectTypes)
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime, isOK);
|
||||
item.Code = a.ToString();
|
||||
newList.Add(item);
|
||||
if (string.IsNullOrEmpty(IsOut))
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime, isOK);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime, isOK);
|
||||
}
|
||||
a++;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
var unitWork = getWBSs.Where(x => x.Id == unitWorkId);
|
||||
int a = 1;
|
||||
foreach (var item in unitWork)
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime, isOK);
|
||||
item.Code = a.ToString();
|
||||
newList.Add(item);
|
||||
if (string.IsNullOrEmpty(IsOut))
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime, isOK);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime, isOK);
|
||||
}
|
||||
a++;
|
||||
}
|
||||
a++;
|
||||
}
|
||||
DataRow row;
|
||||
foreach (Model.View_WBS item in newList)
|
||||
|
||||
Reference in New Issue
Block a user