提交代码
This commit is contained in:
parent
4e3d979993
commit
61a2d7c518
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="hdId" Hidden="true"></f:TextBox>
|
||||
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnitWork_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<%--<f:Button ID="btnShow" Icon="ChartPie" runat="server" ToolTip="统计" Text="统计"
|
||||
OnClick="btnShow_Click">
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
{
|
||||
errorInfos = string.Empty;
|
||||
string Id = Request.Params["Id"];
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
|
@ -143,7 +144,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
|
||||
private void BindGrid()
|
||||
{
|
||||
DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, string.Empty, null, null, "0");
|
||||
DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, string.Empty, null, null, "0", this.drpUnitWork.SelectedValue);
|
||||
Grid1.RecordCount = table.Rows.Count;
|
||||
var table2 = this.GetPagedDataTable(Grid1, table);
|
||||
Grid1.DataSource = table2;
|
||||
|
|
@ -368,6 +369,12 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
protected void drpUnitWork_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,6 +66,15 @@ namespace FineUIPro.Web.JDGL.Check {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdId;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@
|
|||
<f:RadioItem Value="1" Text="已完成" />
|
||||
<f:RadioItem Value="2" Text="未完成" />
|
||||
</f:RadioButtonList>
|
||||
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server" >
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +29,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
|
||||
private void BindGrid()
|
||||
{
|
||||
var table = BLL.WorkPackageService.GetAllTreeDataTable2(this.CurrUser.LoginProjectId, string.Empty,this.txtStartTime.Text.Trim(),this.txtEndTime.Text.Trim(),this.rblIsOK.SelectedValue);
|
||||
var table = BLL.WorkPackageService.GetAllTreeDataTable2(this.CurrUser.LoginProjectId, string.Empty, this.txtStartTime.Text.Trim(), this.txtEndTime.Text.Trim(), this.rblIsOK.SelectedValue, this.drpUnitWork.SelectedValue);
|
||||
Grid1.RecordCount = table.Count;
|
||||
var table2 = this.GetPagedDataTable(Grid1, table);
|
||||
Grid1.DataSource = table2;
|
||||
|
|
@ -132,7 +133,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
workPackage.JDWeights = Funs.GetNewDecimal(weights);
|
||||
workPackage.Unit = unit;
|
||||
workPackage.PlanProjectQuantity = Funs.GetNewDecimal(planProjectQuantity);
|
||||
workPackage.DrawProjectQuantity= Funs.GetNewDecimal(drawProjectQuantity);
|
||||
workPackage.DrawProjectQuantity = Funs.GetNewDecimal(drawProjectQuantity);
|
||||
workPackage.RealProjectQuantity = Funs.GetNewDecimal(realProjectQuantity);
|
||||
workPackage.PlanStartDate = Funs.GetNewDateTime(planStartDate);
|
||||
workPackage.PlanEndDate = Funs.GetNewDateTime(planEndDate);
|
||||
|
|
@ -202,7 +203,7 @@ namespace FineUIPro.Web.JDGL.Check
|
|||
{
|
||||
try
|
||||
{
|
||||
DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, "Out",this.txtStartTime.Text.Trim(),this.txtEndTime.Text.Trim(), this.rblIsOK.SelectedValue);
|
||||
DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, "Out", this.txtStartTime.Text.Trim(), this.txtEndTime.Text.Trim(), this.rblIsOK.SelectedValue, BLL.Const._Null);
|
||||
string projectNmae = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (!string.IsNullOrEmpty(projectNmae))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,6 +93,15 @@ namespace FineUIPro.Web.JDGL.Check {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rblIsOK;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue