修改进度报表

This commit is contained in:
高飞 2023-06-06 09:54:46 +08:00
parent 6b1271387c
commit 3cf225ea86
31 changed files with 1582 additions and 123 deletions

View File

@ -0,0 +1,19 @@
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('F2BC1293-8639-4BD6-8759-648BCF6346E9','设备材料大类','JDGL/WBS/EquipmentMaterialBigType.aspx',4,'0','Menu_JDGL',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A6A7CDD7-B223-4A80-9A0E-8E0F4B4E422A','F2BC1293-8639-4BD6-8759-648BCF6346E9','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('0D343597-D1FD-4CD5-9F23-43E6A68FE26B','F2BC1293-8639-4BD6-8759-648BCF6346E9','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('D003035F-CE86-4A71-AD3A-33CD4E260A00','F2BC1293-8639-4BD6-8759-648BCF6346E9','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('6210DDB2-9196-4315-9308-009BD3A85E78','F2BC1293-8639-4BD6-8759-648BCF6346E9','保存',4)
GO
alter table WBS_EquipmentMaterialType add EquipmentMaterialBigTypeId nvarchar(50) null
GO
alter table WBS_EquipmentMaterialType add constraint FK_WBS_EquipmentMaterialType_WBS_EquipmentMaterialBigType
foreign key (EquipmentMaterialBigTypeId) references WBS_EquipmentMaterialBigType (EquipmentMaterialBigTypeId)
GO

View File

@ -6,6 +6,19 @@ go
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('B707B4E0-EF73-4010-A13B-59263A5029C7','单位、分部、分项工程设置','',10,'0','Menu_JDGL',0,0,1)
--GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('F2BC1293-8639-4BD6-8759-648BCF6346E9','设备材料大类','JDGL/WBS/EquipmentMaterialBigType.aspx',4,'0','Menu_JDGL',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A6A7CDD7-B223-4A80-9A0E-8E0F4B4E422A','F2BC1293-8639-4BD6-8759-648BCF6346E9','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('0D343597-D1FD-4CD5-9F23-43E6A68FE26B','F2BC1293-8639-4BD6-8759-648BCF6346E9','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('D003035F-CE86-4A71-AD3A-33CD4E260A00','F2BC1293-8639-4BD6-8759-648BCF6346E9','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('6210DDB2-9196-4315-9308-009BD3A85E78','F2BC1293-8639-4BD6-8759-648BCF6346E9','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('D00B3C53-2972-4D24-B88F-B38880D4A24F','设备材料分类','JDGL/WBS/EquipmentMaterialType.aspx',5,'0','Menu_JDGL',0,1,1)
GO

View File

@ -582,6 +582,7 @@
<Compile Include="JDGL\WBS\CostControlInitService.cs" />
<Compile Include="JDGL\WBS\CostControlParentDetailService.cs" />
<Compile Include="JDGL\WBS\CostControlService.cs" />
<Compile Include="JDGL\WBS\EquipmentMaterialBigTypeService.cs" />
<Compile Include="JDGL\WBS\EquipmentMaterialTypeService.cs" />
<Compile Include="JDGL\WBS\MilePostService.cs" />
<Compile Include="JDGL\WBS\UnitProjectInitService.cs" />

View File

@ -5204,6 +5204,11 @@ namespace BLL
/// </summary>
public const string ProjectInstallationMenuId = "A4308F9A-0280-49C5-BEE4-FA858FE1CE24";
/// <summary>
/// 设备材料大类
/// </summary>
public const string EquipmentMaterialBigTypeMenuId = "F2BC1293-8639-4BD6-8759-648BCF6346E9";
/// <summary>
/// 设备材料分类
/// </summary>

View File

@ -0,0 +1,125 @@
using FineUIPro;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
{
public static class EquipmentMaterialBigTypeService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 获取实体集合
/// </summary>
/// <returns></returns>
public static List<Model.WBS_EquipmentMaterialBigType> GetList()
{
var q = (from x in Funs.DB.WBS_EquipmentMaterialBigType orderby x.EquipmentMaterialBigTypeCode select x).ToList();
return q;
}
/// <summary>
/// 添加
/// </summary>
/// <param name="?"></param>
public static void AddEquipmentMaterialBigType(Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType)
{
Model.SGGLDB db = Funs.DB;
Model.WBS_EquipmentMaterialBigType newEquipmentMaterialBigType = new Model.WBS_EquipmentMaterialBigType
{
EquipmentMaterialBigTypeId = EquipmentMaterialBigType.EquipmentMaterialBigTypeId,
EquipmentMaterialBigTypeCode = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode,
EquipmentMaterialBigTypeName = EquipmentMaterialBigType.EquipmentMaterialBigTypeName,
Remark = EquipmentMaterialBigType.Remark
};
db.WBS_EquipmentMaterialBigType.InsertOnSubmit(newEquipmentMaterialBigType);
db.SubmitChanges();
}
/// <summary>
/// 修改
/// </summary>
/// <param name="teamGroup"></param>
public static void UpdateEquipmentMaterialBigType(Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType)
{
Model.SGGLDB db = Funs.DB;
Model.WBS_EquipmentMaterialBigType newEquipmentMaterialBigType = db.WBS_EquipmentMaterialBigType.FirstOrDefault(e => e.EquipmentMaterialBigTypeId == EquipmentMaterialBigType.EquipmentMaterialBigTypeId);
if (newEquipmentMaterialBigType != null)
{
newEquipmentMaterialBigType.EquipmentMaterialBigTypeCode = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode;
newEquipmentMaterialBigType.EquipmentMaterialBigTypeName = EquipmentMaterialBigType.EquipmentMaterialBigTypeName;
newEquipmentMaterialBigType.Remark = EquipmentMaterialBigType.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除信息
/// </summary>
/// <param name="EquipmentMaterialBigTypeId"></param>
public static void DeleteEquipmentMaterialBigTypeById(string EquipmentMaterialBigTypeId)
{
Model.SGGLDB db = Funs.DB;
Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = db.WBS_EquipmentMaterialBigType.FirstOrDefault(e => e.EquipmentMaterialBigTypeId == EquipmentMaterialBigTypeId);
{
db.WBS_EquipmentMaterialBigType.DeleteOnSubmit(EquipmentMaterialBigType);
db.SubmitChanges();
}
}
public static void InitEquipmentMaterialBigTypeDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetEquipmentMaterialBigTypeItem();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 设备材料分类下拉框
/// </summary>
/// <param name="dropName"></param>
/// <param name="projectId"></param>
/// <param name="isShowPlease"></param>
public static void InitEquipmentMaterialBigType(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Text";
dropName.DataTextField = "Text";
dropName.DataSource = GetEquipmentMaterialBigTypeItem();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 获取设备材料分类集合
/// </summary>
/// <returns></returns>
public static ListItem[] GetEquipmentMaterialBigTypeItem()
{
var q = (from x in Funs.DB.WBS_EquipmentMaterialBigType orderby x.EquipmentMaterialBigTypeCode select x).ToList();
ListItem[] list = new ListItem[q.Count()];
for (int i = 0; i < q.Count(); i++)
{
list[i] = new ListItem(q[i].EquipmentMaterialBigTypeName ?? "", q[i].EquipmentMaterialBigTypeId);
}
return list;
}
/// <summary>
/// 获取一个设备材料分类信息
/// </summary>
/// <param name="postId"></param>
/// <returns></returns>
public static Model.WBS_EquipmentMaterialBigType GetEquipmentMaterialBigType(string EquipmentMaterialBigTypeId)
{
return Funs.DB.WBS_EquipmentMaterialBigType.FirstOrDefault(e => e.EquipmentMaterialBigTypeId == EquipmentMaterialBigTypeId);
}
}
}

View File

@ -32,6 +32,7 @@ namespace BLL
EquipmentMaterialTypeId = equipmentMaterialType.EquipmentMaterialTypeId,
EquipmentMaterialTypeCode = equipmentMaterialType.EquipmentMaterialTypeCode,
EquipmentMaterialTypeName = equipmentMaterialType.EquipmentMaterialTypeName,
EquipmentMaterialBigTypeId = equipmentMaterialType.EquipmentMaterialBigTypeId,
Remark = equipmentMaterialType.Remark
};
@ -51,6 +52,7 @@ namespace BLL
{
newEquipmentMaterialType.EquipmentMaterialTypeCode = equipmentMaterialType.EquipmentMaterialTypeCode;
newEquipmentMaterialType.EquipmentMaterialTypeName = equipmentMaterialType.EquipmentMaterialTypeName;
newEquipmentMaterialType.EquipmentMaterialBigTypeId = equipmentMaterialType.EquipmentMaterialBigTypeId;
newEquipmentMaterialType.Remark = equipmentMaterialType.Remark;
db.SubmitChanges();
}

View File

@ -387,3 +387,20 @@ IP地址:::1
出错时间:05/25/2023 10:08:31
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
在 FineUIPro.ResourceHelper.GetResourceContentAsBinary(String resName, String resVersion)
在 FineUIPro.ResourceHandler.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
出错时间:06/05/2023 09:22:57
出错文件:http://localhost:9733/res.axd?font=lib.iconfont.iconfont.woff&t=638137763580000000
IP地址:::1
出错时间:06/05/2023 09:22:57

View File

@ -1281,6 +1281,9 @@
<Content Include="JDGL\WBS\CostControlWeekDetailEdit.aspx" />
<Content Include="JDGL\WBS\CostControlWeekDetailHistoryShow.aspx" />
<Content Include="JDGL\WBS\CostControlWeekItemDetailEdit.aspx" />
<Content Include="JDGL\WBS\EquipmentMaterialBigType.aspx" />
<Content Include="JDGL\WBS\EquipmentMaterialBigTypeEdit.aspx" />
<Content Include="JDGL\WBS\EquipmentMaterialBigTypeView.aspx" />
<Content Include="JDGL\WBS\EquipmentMaterialType.aspx" />
<Content Include="JDGL\WBS\EquipmentMaterialTypeEdit.aspx" />
<Content Include="JDGL\WBS\EquipmentMaterialTypeView.aspx" />
@ -13045,6 +13048,27 @@
<Compile Include="JDGL\WBS\CostControlWeekItemDetailEdit.aspx.designer.cs">
<DependentUpon>CostControlWeekItemDetailEdit.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\WBS\EquipmentMaterialBigType.aspx.cs">
<DependentUpon>EquipmentMaterialBigType.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\WBS\EquipmentMaterialBigType.aspx.designer.cs">
<DependentUpon>EquipmentMaterialBigType.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\WBS\EquipmentMaterialBigTypeEdit.aspx.cs">
<DependentUpon>EquipmentMaterialBigTypeEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\WBS\EquipmentMaterialBigTypeEdit.aspx.designer.cs">
<DependentUpon>EquipmentMaterialBigTypeEdit.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\WBS\EquipmentMaterialBigTypeView.aspx.cs">
<DependentUpon>EquipmentMaterialBigTypeView.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\WBS\EquipmentMaterialBigTypeView.aspx.designer.cs">
<DependentUpon>EquipmentMaterialBigTypeView.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\WBS\EquipmentMaterialType.aspx.cs">
<DependentUpon>EquipmentMaterialType.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -169,7 +169,7 @@
<f:RenderField Width="60px" ColumnID="Id" DataField="Id" FieldType="String"
HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" EnableColumnEdit="true">
</f:RenderField>
<f:RenderField Width="180px" ColumnID="Name" DataField="Name" FieldType="String"
<f:RenderField Width="270px" ColumnID="Name" DataField="Name" FieldType="String"
HeaderText="专业和分部工程" HeaderTextAlign="Center" TextAlign="Left" EnableColumnEdit="true">
</f:RenderField>
<f:GroupField HeaderText="本月赢得值参数(单位:万元)" TextAlign="Center">

View File

@ -197,152 +197,219 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
table4.Columns.Add(new DataColumn("CPI", typeof(String)));
table4.Columns.Add(new DataColumn("SPI", typeof(String)));
Model.SGGLDB db = Funs.DB;
var cnProfessionInits = from x in db.WBS_CnProfessionInit select x;
var cnProfessions = from x in db.WBS_CnProfession where x.ProjectId == this.CurrUser.LoginProjectId select x;
var unitProjectInits = from x in db.Wbs_UnitProjectInit select x;
var unitProjects = from x in db.Wbs_UnitProject where x.ProjectId == this.CurrUser.LoginProjectId select x;
var cnProfessions = from x in db.WBS_CnProfession where x.ProjectId == this.CurrUser.LoginProjectId && x.IsApprove == true select x;
var installationIds = cnProfessions.Select(x => x.InstallationId).Distinct().ToList();
var installations = from x in db.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId && installationIds.Contains(x.InstallationId) select x;
var unitProjects = from x in db.Wbs_UnitProject where x.ProjectId == this.CurrUser.LoginProjectId && x.IsApprove == true select x;
var details = from x in db.View_WBS_CostControlParentDetail
where x.Months == Funs.GetNewDateTime(date)
select x;
DataRow row4;
decimal cnACWP, cnBCWP, cnBCWS, cnmACWP, cnmBCWP, cnmBCWS, cnCV, cnSV, cnCPI, cnSPI, cnmCV, cnmSV, cnmCPI, cnmSPI,
unACWP, unBCWP, unBCWS, unmACWP, unmBCWP, unmBCWS, unCV, unSV, unCPI, unSPI, unmCV, unmSV, unmCPI, unmSPI;
int a = 1, b = 1;
foreach (var cn in cnProfessionInits)
unACWP, unBCWP, unBCWS, unmACWP, unmBCWP, unmBCWS, unCV, unSV, unCPI, unSPI, unmCV, unmSV, unmCPI, unmSPI,
inACWP, inBCWP, inBCWS, inmACWP, inmBCWP, inmBCWS, inCV, inSV, inCPI, inSPI, inmCV, inmSV, inmCPI, inmSPI;
int a = 1, b = 1, c = 1;
foreach (var item in installations)
{
cnACWP = 0;
cnBCWP = 0;
cnBCWS = 0;
cnmACWP = 0;
cnmBCWP = 0;
cnmBCWS = 0;
cnCV = 0;
cnSV = 0;
cnCPI = 0;
cnSPI = 0;
cnmCV = 0;
cnmSV = 0;
cnmCPI = 0;
cnmSPI = 0;
inACWP = 0;
inBCWP = 0;
inBCWS = 0;
inmACWP = 0;
inmBCWP = 0;
inmBCWS = 0;
inCV = 0;
inSV = 0;
inCPI = 0;
inSPI = 0;
inmCV = 0;
inmSV = 0;
inmCPI = 0;
inmSPI = 0;
row4 = table4.NewRow();
row4[0] = a;
row4[0] = c.ToString();
row4[1] = "0";
row4[2] = cn.CnProfessionName;
var cnDetails = (from x in details
join y in cnProfessions on x.ParentId equals y.CnProfessionId
where y.OldId == cn.CnProfessionId
row4[2] = item.InstallationName;
var inDetails = (from x in details
where x.ParentId == item.InstallationId
select x).ToList();
cnmACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
cnmBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
cnmBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
cnmCV = cnmBCWP - cnmACWP;
cnmSV = cnmBCWP - cnmBCWS;
if (cnmACWP > 0)
inmACWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
inmBCWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
inmBCWS = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
inmCV = inmBCWP - inmACWP;
inmSV = inmBCWP - inmBCWS;
if (inmACWP > 0)
{
cnmCPI = cnmBCWP / cnmACWP;
inmCPI = inmBCWP / inmACWP;
}
if (cnmBCWS > 0)
if (inmBCWS > 0)
{
cnmSPI = cnmBCWP / cnmBCWS;
inmSPI = inmBCWP / inmBCWS;
}
row4[3] = cnmBCWP.ToString("0.####");
row4[4] = cnmBCWS.ToString("0.####");
row4[5] = cnmACWP.ToString("0.####");
row4[6] = cnmCV.ToString("0.####");
row4[7] = cnmSV.ToString("0.####");
row4[8] = cnmCPI.ToString("0.####");
row4[9] = cnmSPI.ToString("0.####");
cnACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
cnBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
cnBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
cnCV = cnBCWP - cnACWP;
cnSV = cnBCWP - cnBCWS;
if (cnACWP > 0)
row4[3] = inmBCWP.ToString("0.####");
row4[4] = inmBCWS.ToString("0.####");
row4[5] = inmACWP.ToString("0.####");
row4[6] = inmCV.ToString("0.####");
row4[7] = inmSV.ToString("0.####");
row4[8] = inmCPI.ToString("0.####");
row4[9] = inmSPI.ToString("0.####");
inACWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
inBCWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
inBCWS = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
inCV = inBCWP - inACWP;
inSV = inBCWP - inBCWS;
if (inACWP > 0)
{
cnCPI = cnBCWP / cnACWP;
inCPI = inBCWP / inACWP;
}
if (cnBCWS > 0)
if (inBCWS > 0)
{
cnSPI = cnBCWP / cnBCWS;
inSPI = inBCWP / inBCWS;
}
row4[10] = cnBCWP.ToString("0.####");
row4[11] = cnBCWS.ToString("0.####");
row4[12] = cnACWP.ToString("0.####");
row4[13] = cnCV.ToString("0.####");
row4[14] = cnSV.ToString("0.####");
row4[15] = cnCPI.ToString("0.####");
row4[16] = cnSPI.ToString("0.####");
row4[10] = inBCWP.ToString("0.####");
row4[11] = inBCWS.ToString("0.####");
row4[12] = inACWP.ToString("0.####");
row4[13] = inCV.ToString("0.####");
row4[14] = inSV.ToString("0.####");
row4[15] = inCPI.ToString("0.####");
row4[16] = inSPI.ToString("0.####");
table4.Rows.Add(row4);
b = 1;
var unLists = (from x in unitProjectInits where x.CnProfessionId == cn.CnProfessionId orderby x.SortIndex select x).ToList();
foreach (var un in unLists)
a = 1;
var icnProfessions = cnProfessions.Where(x => x.InstallationId == item.InstallationId);
foreach (var cn in icnProfessions)
{
unACWP = 0;
unBCWP = 0;
unBCWS = 0;
unmACWP = 0;
unmBCWP = 0;
unmBCWS = 0;
unCV = 0;
unSV = 0;
unCPI = 0;
unSPI = 0;
unmCV = 0;
unmSV = 0;
unmCPI = 0;
unmSPI = 0;
cnACWP = 0;
cnBCWP = 0;
cnBCWS = 0;
cnmACWP = 0;
cnmBCWP = 0;
cnmBCWS = 0;
cnCV = 0;
cnSV = 0;
cnCPI = 0;
cnSPI = 0;
cnmCV = 0;
cnmSV = 0;
cnmCPI = 0;
cnmSPI = 0;
row4 = table4.NewRow();
row4[0] = a.ToString() + "." + b.ToString();
row4[1] = a;
row4[2] = un.UnitProjectName;
var unDetails = from x in details
join y in unitProjects on x.ParentId equals y.UnitProjectId
where y.UnitProjectCode == un.UnitProjectCode
select x;
unmACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
unmBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
unmBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
unmCV = unmBCWP - unmACWP;
unmSV = unmBCWP - unmBCWS;
if (unmACWP > 0)
row4[0] = c.ToString() + "." + a.ToString();
row4[1] = c;
row4[2] = cn.CnProfessionName;
var cnDetails = (from x in details
where x.ParentId == cn.CnProfessionId
select x).ToList();
cnmACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
cnmBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
cnmBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
cnmCV = cnmBCWP - cnmACWP;
cnmSV = cnmBCWP - cnmBCWS;
if (cnmACWP > 0)
{
unmCPI = unmBCWP / unmACWP;
cnmCPI = cnmBCWP / cnmACWP;
}
if (unmBCWS > 0)
if (cnmBCWS > 0)
{
unmSPI = unmBCWP / unmBCWS;
cnmSPI = cnmBCWP / cnmBCWS;
}
row4[3] = unmBCWP.ToString("0.####");
row4[4] = unmBCWS.ToString("0.####");
row4[5] = unmACWP.ToString("0.####");
row4[6] = unmCV.ToString("0.####");
row4[7] = unmSV.ToString("0.####");
row4[8] = unmCPI.ToString("0.####");
row4[9] = unmSPI.ToString("0.####");
unACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
unBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
unBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
unCV = unBCWP - unACWP;
unSV = unBCWP - unBCWS;
if (unACWP > 0)
row4[3] = cnmBCWP.ToString("0.####");
row4[4] = cnmBCWS.ToString("0.####");
row4[5] = cnmACWP.ToString("0.####");
row4[6] = cnmCV.ToString("0.####");
row4[7] = cnmSV.ToString("0.####");
row4[8] = cnmCPI.ToString("0.####");
row4[9] = cnmSPI.ToString("0.####");
cnACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
cnBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
cnBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
cnCV = cnBCWP - cnACWP;
cnSV = cnBCWP - cnBCWS;
if (cnACWP > 0)
{
unCPI = unBCWP / unACWP;
cnCPI = cnBCWP / cnACWP;
}
if (unBCWS > 0)
if (cnBCWS > 0)
{
unSPI = unBCWP / unBCWS;
cnSPI = cnBCWP / cnBCWS;
}
row4[10] = unBCWP.ToString("0.####");
row4[11] = unBCWS.ToString("0.####");
row4[12] = unACWP.ToString("0.####");
row4[13] = unCV.ToString("0.####");
row4[14] = unSV.ToString("0.####");
row4[15] = unCPI.ToString("0.####");
row4[16] = unSPI.ToString("0.####");
row4[10] = cnBCWP.ToString("0.####");
row4[11] = cnBCWS.ToString("0.####");
row4[12] = cnACWP.ToString("0.####");
row4[13] = cnCV.ToString("0.####");
row4[14] = cnSV.ToString("0.####");
row4[15] = cnCPI.ToString("0.####");
row4[16] = cnSPI.ToString("0.####");
table4.Rows.Add(row4);
b++;
b = 1;
var unLists = from x in unitProjects where x.CnProfessionId == cn.CnProfessionId orderby x.SortIndex select x;
foreach (var un in unLists)
{
unACWP = 0;
unBCWP = 0;
unBCWS = 0;
unmACWP = 0;
unmBCWP = 0;
unmBCWS = 0;
unCV = 0;
unSV = 0;
unCPI = 0;
unSPI = 0;
unmCV = 0;
unmSV = 0;
unmCPI = 0;
unmSPI = 0;
row4 = table4.NewRow();
row4[0] = c.ToString() + "." + a.ToString() + "." + b.ToString();
row4[1] = c.ToString() + "." + a.ToString();
row4[2] = un.UnitProjectName;
var unDetails = from x in details
where x.ParentId == un.UnitProjectId
select x;
unmACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
unmBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
unmBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
unmCV = unmBCWP - unmACWP;
unmSV = unmBCWP - unmBCWS;
if (unmACWP > 0)
{
unmCPI = unmBCWP / unmACWP;
}
if (unmBCWS > 0)
{
unmSPI = unmBCWP / unmBCWS;
}
row4[3] = unmBCWP.ToString("0.####");
row4[4] = unmBCWS.ToString("0.####");
row4[5] = unmACWP.ToString("0.####");
row4[6] = unmCV.ToString("0.####");
row4[7] = unmSV.ToString("0.####");
row4[8] = unmCPI.ToString("0.####");
row4[9] = unmSPI.ToString("0.####");
unACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
unBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
unBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
unCV = unBCWP - unACWP;
unSV = unBCWP - unBCWS;
if (unACWP > 0)
{
unCPI = unBCWP / unACWP;
}
if (unBCWS > 0)
{
unSPI = unBCWP / unBCWS;
}
row4[10] = unBCWP.ToString("0.####");
row4[11] = unBCWS.ToString("0.####");
row4[12] = unACWP.ToString("0.####");
row4[13] = unCV.ToString("0.####");
row4[14] = unSV.ToString("0.####");
row4[15] = unCPI.ToString("0.####");
row4[16] = unSPI.ToString("0.####");
table4.Rows.Add(row4);
b++;
}
a++;
}
a++;
c++;
}
if (table4.Rows.Count > 0)
{
@ -350,7 +417,7 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
this.Grid4.DataBind();
}
//按专业统计
//按设备材料分类统计
DataTable table5 = new DataTable();
table5.Columns.Add(new DataColumn("Id", typeof(String)));
table5.Columns.Add(new DataColumn("Name", typeof(String)));

View File

@ -0,0 +1,114 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentMaterialBigType.aspx.cs" Inherits="FineUIPro.Web.JDGL.WBS.EquipmentMaterialBigType" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>设备材料大类</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="设备材料分类" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="EquipmentMaterialBigTypeId" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="2" DataIDField="EquipmentMaterialBigTypeId" AllowSorting="true" SortField="EquipmentMaterialBigTypeCode"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True" OnRowDoubleClick="Grid1_RowDoubleClick" OnPageIndexChange="Grid1_PageIndexChange">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox ID="txtEquipmentMaterialBigTypeCode" runat="server" Label="编号" Width="250px" LabelWidth="110px"
LabelAlign="Right">
</f:TextBox>
<f:TextBox ID="txtEquipmentMaterialBigTypeName" runat="server" Label="名称" Width="250px" LabelWidth="120px"
LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
</f:Button>
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnNew" Icon="Add" EnablePostBack="true" Hidden="true"
runat="server">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="EquipmentMaterialBigTypeCode" DataField="EquipmentMaterialBigTypeCode"
SortField="EquipmentMaterialBigTypeCode" FieldType="String" HeaderText="编号" TextAlign="center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="300px" ColumnID="EquipmentMaterialBigTypeName" DataField="EquipmentMaterialBigTypeName"
SortField="EquipmentMaterialBigTypeName" FieldType="String" HeaderText="名称" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark"
SortField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="设备材料大类" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="500px" Height="300px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
OnClick="btnMenuModify_Click">
</f:MenuButton>
<%--<f:MenuButton ID="btnMenuView" EnablePostBack="true" runat="server" Text="查看" Icon="ApplicationViewIcons" OnClick="btnMenuView_Click">
</f:MenuButton>--%>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click">
</f:MenuButton>
</Items>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</body>
</html>

View File

@ -0,0 +1,182 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.JDGL.WBS
{
public partial class EquipmentMaterialBigType : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("EquipmentMaterialBigTypeEdit.aspx") + "return false;";
}
}
/// <summary>
/// 绑定数据
/// </summary>
public void BindGrid()
{
DataTable tb = BindData();
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
protected DataTable BindData()
{
string strSql = @"select EquipmentMaterialBigTypeId,EquipmentMaterialBigTypeCode,EquipmentMaterialBigTypeName,Remark from [dbo].[WBS_EquipmentMaterialBigType] where 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtEquipmentMaterialBigTypeCode.Text.Trim()))
{
strSql += " AND EquipmentMaterialBigTypeCode like @EquipmentMaterialBigTypeCode";
listStr.Add(new SqlParameter("@EquipmentMaterialBigTypeCode", "%" + this.txtEquipmentMaterialBigTypeCode.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtEquipmentMaterialBigTypeName.Text.Trim()))
{
strSql += " AND EquipmentMaterialBigTypeName like @EquipmentMaterialBigTypeName";
listStr.Add(new SqlParameter("@EquipmentMaterialBigTypeName", "%" + this.txtEquipmentMaterialBigTypeName.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
}
protected void btnMenuModify_Click(object sender, EventArgs e)
{
EditData();
}
protected void btnMenuDel_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.EquipmentMaterialBigTypeService.DeleteEquipmentMaterialBigTypeById(rowID);
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
if (this.btnMenuModify.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentMaterialBigTypeView.aspx?EquipmentMaterialBigTypeId={0}", Grid1.SelectedRowID, "查看 - ")));
}
else
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentMaterialBigTypeEdit.aspx?EquipmentMaterialBigTypeId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.EquipmentMaterialBigTypeMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnNew.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuModify.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDel.Hidden = false;
}
}
}
#endregion
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
EditData();
}
protected void btnMenuView_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentMaterialBigTypeView.aspx?EquipmentMaterialBigTypeId={0}", Grid1.SelectedRowID, "查看 - ")));
}
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 重置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnRset_Click(object sender, EventArgs e)
{
txtEquipmentMaterialBigTypeCode.Text = "";
txtEquipmentMaterialBigTypeName.Text = "";
BindGrid();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
}
}

View File

@ -0,0 +1,177 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.WBS {
public partial class EquipmentMaterialBigType {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtEquipmentMaterialBigTypeCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeCode;
/// <summary>
/// txtEquipmentMaterialBigTypeName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeName;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnRset 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRset;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuModify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuModify;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
}
}

View File

@ -0,0 +1,54 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentMaterialBigTypeEdit.aspx.cs" Inherits="FineUIPro.Web.JDGL.WBS.EquipmentMaterialBigTypeEdit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>设备材料分类</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtEquipmentMaterialBigTypeCode" runat="server" Label="编号"
Required="true" MaxLength="50" ShowRedStar="true" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtEquipmentMaterialBigTypeName" runat="server" Label="名称"
Required="true" MaxLength="50" ShowRedStar="true" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注"
MaxLength="100" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdCheckerId" runat="server">
</f:HiddenField>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false"
runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,61 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.JDGL.WBS
{
public partial class EquipmentMaterialBigTypeEdit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string EquipmentMaterialBigTypeId = Request.Params["EquipmentMaterialBigTypeId"];
if (!string.IsNullOrEmpty(EquipmentMaterialBigTypeId))
{
Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = BLL.EquipmentMaterialBigTypeService.GetEquipmentMaterialBigType(EquipmentMaterialBigTypeId);
if (EquipmentMaterialBigType != null)
{
this.txtEquipmentMaterialBigTypeCode.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode;
this.txtEquipmentMaterialBigTypeName.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeName;
this.txtRemark.Text = EquipmentMaterialBigType.Remark;
}
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
SaveData(true);
}
private void SaveData(bool b)
{
string EquipmentMaterialBigTypeId = Request.Params["EquipmentMaterialBigTypeId"];
Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = new Model.WBS_EquipmentMaterialBigType();
EquipmentMaterialBigType.EquipmentMaterialBigTypeCode = this.txtEquipmentMaterialBigTypeCode.Text.Trim();
EquipmentMaterialBigType.EquipmentMaterialBigTypeName = this.txtEquipmentMaterialBigTypeName.Text.Trim();
EquipmentMaterialBigType.Remark = this.txtRemark.Text.Trim();
if (!string.IsNullOrEmpty(EquipmentMaterialBigTypeId))
{
EquipmentMaterialBigType.EquipmentMaterialBigTypeId = EquipmentMaterialBigTypeId;
BLL.EquipmentMaterialBigTypeService.UpdateEquipmentMaterialBigType(EquipmentMaterialBigType);
}
else
{
EquipmentMaterialBigType.EquipmentMaterialBigTypeId = SQLHelper.GetNewID(typeof(Model.WBS_EquipmentMaterialBigType));
BLL.EquipmentMaterialBigTypeService.AddEquipmentMaterialBigType(EquipmentMaterialBigType);
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
}
}

View File

@ -0,0 +1,105 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.WBS {
public partial class EquipmentMaterialBigTypeEdit {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtEquipmentMaterialBigTypeCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeCode;
/// <summary>
/// txtEquipmentMaterialBigTypeName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeName;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdCheckerId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckerId;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}

View File

@ -0,0 +1,54 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentMaterialBigTypeView.aspx.cs" Inherits="FineUIPro.Web.JDGL.WBS.EquipmentMaterialBigTypeView" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>设备材料分类</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtEquipmentMaterialBigTypeCode" runat="server" Label="编号"
Required="true" MaxLength="50" ShowRedStar="true" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:TextBox ID="txtEquipmentMaterialBigTypeName" runat="server" Label="名称"
Required="true" MaxLength="50" ShowRedStar="true" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注"
MaxLength="100" LabelWidth="110px">
</f:TextBox>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:HiddenField ID="hdCheckerId" runat="server">
</f:HiddenField>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false"
runat="server" Icon="SystemClose">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,33 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.JDGL.WBS
{
public partial class EquipmentMaterialBigTypeView : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string EquipmentMaterialBigTypeId = Request.Params["EquipmentMaterialBigTypeId"];
if (!string.IsNullOrEmpty(EquipmentMaterialBigTypeId))
{
Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = BLL.EquipmentMaterialBigTypeService.GetEquipmentMaterialBigType(EquipmentMaterialBigTypeId);
if (EquipmentMaterialBigType != null)
{
this.txtEquipmentMaterialBigTypeCode.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode;
this.txtEquipmentMaterialBigTypeName.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeName;
this.txtRemark.Text = EquipmentMaterialBigType.Remark;
}
}
}
}
}
}

View File

@ -0,0 +1,105 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.WBS {
public partial class EquipmentMaterialBigTypeView {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtEquipmentMaterialBigTypeCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeCode;
/// <summary>
/// txtEquipmentMaterialBigTypeName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeName;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdCheckerId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckerId;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
}
}

View File

@ -29,6 +29,7 @@
<f:TextBox ID="txtEquipmentMaterialTypeName" runat="server" Label="名称" Width="250px" LabelWidth="120px"
LabelAlign="Right">
</f:TextBox>
<f:DropDownList runat="server" ID="drpEquipmentMaterialBigTypeId" Label="大类" LabelWidth="110px" EnableEdit="true" LabelAlign="Right"></f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" Icon="SystemSearch"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
@ -52,11 +53,14 @@
SortField="EquipmentMaterialTypeCode" FieldType="String" HeaderText="编号" TextAlign="center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="300px" ColumnID="EquipmentMaterialTypeName" DataField="EquipmentMaterialTypeName"
SortField="EquipmentMaterialTypeName" FieldType="String" HeaderText="名称" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="300px" ColumnID="EquipmentMaterialBigTypeName" DataField="EquipmentMaterialBigTypeName"
SortField="EquipmentMaterialBigTypeName" FieldType="String" HeaderText="大类" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark"
SortField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center">

View File

@ -18,7 +18,7 @@ namespace FineUIPro.Web.JDGL.WBS
{
GetButtonPower();
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
BLL.EquipmentMaterialBigTypeService.InitEquipmentMaterialBigTypeDownList(this.drpEquipmentMaterialBigTypeId, true);
// 绑定表格
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("EquipmentMaterialTypeEdit.aspx") + "return false;";
@ -42,7 +42,7 @@ namespace FineUIPro.Web.JDGL.WBS
protected DataTable BindData()
{
string strSql = @"select EquipmentMaterialTypeId,EquipmentMaterialTypeCode,EquipmentMaterialTypeName,Remark from [dbo].[WBS_EquipmentMaterialType] where 1=1 ";
string strSql = @"select EquipmentMaterialTypeId,EquipmentMaterialTypeCode,EquipmentMaterialTypeName,a.Remark,b.EquipmentMaterialBigTypeName from [dbo].[WBS_EquipmentMaterialType] a left join WBS_EquipmentMaterialBigType b on a.EquipmentMaterialBigTypeId=b.EquipmentMaterialBigTypeId where 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtEquipmentMaterialTypeCode.Text.Trim()))
@ -55,6 +55,11 @@ namespace FineUIPro.Web.JDGL.WBS
strSql += " AND EquipmentMaterialTypeName like @EquipmentMaterialTypeName";
listStr.Add(new SqlParameter("@EquipmentMaterialTypeName", "%" + this.txtEquipmentMaterialTypeName.Text.Trim() + "%"));
}
if (this.drpEquipmentMaterialBigTypeId.SelectedValue != BLL.Const._Null)
{
strSql += " AND a.EquipmentMaterialBigTypeId = @EquipmentMaterialBigTypeId";
listStr.Add(new SqlParameter("@EquipmentMaterialBigTypeId", this.drpEquipmentMaterialBigTypeId.SelectedValue));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;

View File

@ -75,6 +75,15 @@ namespace FineUIPro.Web.JDGL.WBS {
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialTypeName;
/// <summary>
/// drpEquipmentMaterialBigTypeId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEquipmentMaterialBigTypeId;
/// <summary>
/// btnSearch 控件。
/// </summary>

View File

@ -27,6 +27,11 @@
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:DropDownList runat="server" ID="drpEquipmentMaterialBigTypeId" Label="大类" ShowRedStar="true" Required="true" LabelWidth="110px" EnableEdit="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注"

View File

@ -16,6 +16,7 @@ namespace FineUIPro.Web.JDGL.WBS
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string EquipmentMaterialTypeId = Request.Params["EquipmentMaterialTypeId"];
BLL.EquipmentMaterialBigTypeService.InitEquipmentMaterialBigTypeDownList(this.drpEquipmentMaterialBigTypeId, true);
if (!string.IsNullOrEmpty(EquipmentMaterialTypeId))
{
@ -24,6 +25,10 @@ namespace FineUIPro.Web.JDGL.WBS
{
this.txtEquipmentMaterialTypeCode.Text = EquipmentMaterialType.EquipmentMaterialTypeCode;
this.txtEquipmentMaterialTypeName.Text = EquipmentMaterialType.EquipmentMaterialTypeName;
if (!string.IsNullOrEmpty(EquipmentMaterialType.EquipmentMaterialBigTypeId))
{
this.drpEquipmentMaterialBigTypeId.SelectedValue = EquipmentMaterialType.EquipmentMaterialBigTypeId;
}
this.txtRemark.Text = EquipmentMaterialType.Remark;
}
}
@ -33,6 +38,11 @@ namespace FineUIPro.Web.JDGL.WBS
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpEquipmentMaterialBigTypeId.SelectedValue == BLL.Const._Null)
{
ShowNotify("请选择大类!", MessageBoxIcon.Warning);
return;
}
SaveData(true);
}
@ -42,6 +52,7 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_EquipmentMaterialType EquipmentMaterialType = new Model.WBS_EquipmentMaterialType();
EquipmentMaterialType.EquipmentMaterialTypeCode = this.txtEquipmentMaterialTypeCode.Text.Trim();
EquipmentMaterialType.EquipmentMaterialTypeName = this.txtEquipmentMaterialTypeName.Text.Trim();
EquipmentMaterialType.EquipmentMaterialBigTypeId = this.drpEquipmentMaterialBigTypeId.SelectedValue;
EquipmentMaterialType.Remark = this.txtRemark.Text.Trim();
if (!string.IsNullOrEmpty(EquipmentMaterialTypeId))
{

View File

@ -57,6 +57,15 @@ namespace FineUIPro.Web.JDGL.WBS {
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialTypeName;
/// <summary>
/// drpEquipmentMaterialBigTypeId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEquipmentMaterialBigTypeId;
/// <summary>
/// txtRemark 控件。
/// </summary>

View File

@ -27,6 +27,11 @@
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<Items>
<f:DropDownList runat="server" ID="drpEquipmentMaterialBigTypeId" Label="大类" EnableEdit="true" LabelWidth="110px" Readonly="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRemark" runat="server" Label="备注"

View File

@ -16,6 +16,7 @@ namespace FineUIPro.Web.JDGL.WBS
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
string EquipmentMaterialTypeId = Request.Params["EquipmentMaterialTypeId"];
BLL.EquipmentMaterialBigTypeService.InitEquipmentMaterialBigTypeDownList(this.drpEquipmentMaterialBigTypeId, true);
if (!string.IsNullOrEmpty(EquipmentMaterialTypeId))
{
@ -24,6 +25,10 @@ namespace FineUIPro.Web.JDGL.WBS
{
this.txtEquipmentMaterialTypeCode.Text = EquipmentMaterialType.EquipmentMaterialTypeCode;
this.txtEquipmentMaterialTypeName.Text = EquipmentMaterialType.EquipmentMaterialTypeName;
if (!string.IsNullOrEmpty(EquipmentMaterialType.EquipmentMaterialBigTypeId))
{
this.drpEquipmentMaterialBigTypeId.SelectedValue = EquipmentMaterialType.EquipmentMaterialBigTypeId;
}
this.txtRemark.Text = EquipmentMaterialType.Remark;
}
}

View File

@ -57,6 +57,15 @@ namespace FineUIPro.Web.JDGL.WBS {
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentMaterialTypeName;
/// <summary>
/// drpEquipmentMaterialBigTypeId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEquipmentMaterialBigTypeId;
/// <summary>
/// txtRemark 控件。
/// </summary>

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Tree>
<TreeNode id="D00B3C53-2972-4D24-B88F-B38880D4A24F" Text="设备材料分类" NavigateUrl="JDGL/WBS/EquipmentMaterialType.aspx">
<TreeNode id="F2BC1293-8639-4BD6-8759-648BCF6346E9" Text="设备材料大类" NavigateUrl="JDGL/WBS/EquipmentMaterialBigType.aspx">
</TreeNode>
<TreeNode id="D00B3C53-2972-4D24-B88F-B38880D4A24F" Text="设备材料分类" NavigateUrl="JDGL/WBS/EquipmentMaterialType.aspx"></TreeNode>
<TreeNode id="858E83E9-ADE5-452E-BD65-82D8DFF872C0" Text="分部、工作项及费用清单裁剪" NavigateUrl="JDGL/WBS/WBSSetAudit.aspx"></TreeNode>
<TreeNode id="E3905BF1-289B-4500-BD34-36F97D649AFC" Text="工作量录入" NavigateUrl="JDGL/WBS/WorkloadInput.aspx"></TreeNode>
<TreeNode id="2A3F8526-95C7-4D30-B2DD-DD26696BE150" Text="工作量统计" NavigateUrl="JDGL/WBS/WorkloadStatistics.aspx"></TreeNode>

View File

@ -252,7 +252,7 @@ namespace FineUIPro.Web.common
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
List<string> listCategories = new List<string>();
var persons = from x in db.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true select x;
var persons = from x in db.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime > DateTime.Now) select x;
var posts = (from x in persons
join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId
select y).Distinct();

View File

@ -2228,6 +2228,9 @@ namespace Model
partial void InsertWBS_DivisionProject(WBS_DivisionProject instance);
partial void UpdateWBS_DivisionProject(WBS_DivisionProject instance);
partial void DeleteWBS_DivisionProject(WBS_DivisionProject instance);
partial void InsertWBS_EquipmentMaterialBigType(WBS_EquipmentMaterialBigType instance);
partial void UpdateWBS_EquipmentMaterialBigType(WBS_EquipmentMaterialBigType instance);
partial void DeleteWBS_EquipmentMaterialBigType(WBS_EquipmentMaterialBigType instance);
partial void InsertWBS_EquipmentMaterialType(WBS_EquipmentMaterialType instance);
partial void UpdateWBS_EquipmentMaterialType(WBS_EquipmentMaterialType instance);
partial void DeleteWBS_EquipmentMaterialType(WBS_EquipmentMaterialType instance);
@ -9220,6 +9223,14 @@ namespace Model
}
}
public System.Data.Linq.Table<WBS_EquipmentMaterialBigType> WBS_EquipmentMaterialBigType
{
get
{
return this.GetTable<WBS_EquipmentMaterialBigType>();
}
}
public System.Data.Linq.Table<WBS_EquipmentMaterialType> WBS_EquipmentMaterialType
{
get
@ -396925,6 +396936,168 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.WBS_EquipmentMaterialBigType")]
public partial class WBS_EquipmentMaterialBigType : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _EquipmentMaterialBigTypeId;
private string _EquipmentMaterialBigTypeCode;
private string _EquipmentMaterialBigTypeName;
private string _Remark;
private EntitySet<WBS_EquipmentMaterialType> _WBS_EquipmentMaterialType;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnEquipmentMaterialBigTypeIdChanging(string value);
partial void OnEquipmentMaterialBigTypeIdChanged();
partial void OnEquipmentMaterialBigTypeCodeChanging(string value);
partial void OnEquipmentMaterialBigTypeCodeChanged();
partial void OnEquipmentMaterialBigTypeNameChanging(string value);
partial void OnEquipmentMaterialBigTypeNameChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
#endregion
public WBS_EquipmentMaterialBigType()
{
this._WBS_EquipmentMaterialType = new EntitySet<WBS_EquipmentMaterialType>(new Action<WBS_EquipmentMaterialType>(this.attach_WBS_EquipmentMaterialType), new Action<WBS_EquipmentMaterialType>(this.detach_WBS_EquipmentMaterialType));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentMaterialBigTypeId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string EquipmentMaterialBigTypeId
{
get
{
return this._EquipmentMaterialBigTypeId;
}
set
{
if ((this._EquipmentMaterialBigTypeId != value))
{
this.OnEquipmentMaterialBigTypeIdChanging(value);
this.SendPropertyChanging();
this._EquipmentMaterialBigTypeId = value;
this.SendPropertyChanged("EquipmentMaterialBigTypeId");
this.OnEquipmentMaterialBigTypeIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentMaterialBigTypeCode", DbType="NVarChar(50)")]
public string EquipmentMaterialBigTypeCode
{
get
{
return this._EquipmentMaterialBigTypeCode;
}
set
{
if ((this._EquipmentMaterialBigTypeCode != value))
{
this.OnEquipmentMaterialBigTypeCodeChanging(value);
this.SendPropertyChanging();
this._EquipmentMaterialBigTypeCode = value;
this.SendPropertyChanged("EquipmentMaterialBigTypeCode");
this.OnEquipmentMaterialBigTypeCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentMaterialBigTypeName", DbType="NVarChar(50)")]
public string EquipmentMaterialBigTypeName
{
get
{
return this._EquipmentMaterialBigTypeName;
}
set
{
if ((this._EquipmentMaterialBigTypeName != value))
{
this.OnEquipmentMaterialBigTypeNameChanging(value);
this.SendPropertyChanging();
this._EquipmentMaterialBigTypeName = value;
this.SendPropertyChanged("EquipmentMaterialBigTypeName");
this.OnEquipmentMaterialBigTypeNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(100)")]
public string Remark
{
get
{
return this._Remark;
}
set
{
if ((this._Remark != value))
{
this.OnRemarkChanging(value);
this.SendPropertyChanging();
this._Remark = value;
this.SendPropertyChanged("Remark");
this.OnRemarkChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_EquipmentMaterialType_WBS_EquipmentMaterialBigType", Storage="_WBS_EquipmentMaterialType", ThisKey="EquipmentMaterialBigTypeId", OtherKey="EquipmentMaterialBigTypeId", DeleteRule="NO ACTION")]
public EntitySet<WBS_EquipmentMaterialType> WBS_EquipmentMaterialType
{
get
{
return this._WBS_EquipmentMaterialType;
}
set
{
this._WBS_EquipmentMaterialType.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_WBS_EquipmentMaterialType(WBS_EquipmentMaterialType entity)
{
this.SendPropertyChanging();
entity.WBS_EquipmentMaterialBigType = this;
}
private void detach_WBS_EquipmentMaterialType(WBS_EquipmentMaterialType entity)
{
this.SendPropertyChanging();
entity.WBS_EquipmentMaterialBigType = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.WBS_EquipmentMaterialType")]
public partial class WBS_EquipmentMaterialType : INotifyPropertyChanging, INotifyPropertyChanged
{
@ -396939,8 +397112,12 @@ namespace Model
private string _Remark;
private string _EquipmentMaterialBigTypeId;
private EntitySet<WBS_CostControl> _WBS_CostControl;
private EntityRef<WBS_EquipmentMaterialBigType> _WBS_EquipmentMaterialBigType;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -396953,11 +397130,14 @@ namespace Model
partial void OnEquipmentMaterialTypeNameChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
partial void OnEquipmentMaterialBigTypeIdChanging(string value);
partial void OnEquipmentMaterialBigTypeIdChanged();
#endregion
public WBS_EquipmentMaterialType()
{
this._WBS_CostControl = new EntitySet<WBS_CostControl>(new Action<WBS_CostControl>(this.attach_WBS_CostControl), new Action<WBS_CostControl>(this.detach_WBS_CostControl));
this._WBS_EquipmentMaterialBigType = default(EntityRef<WBS_EquipmentMaterialBigType>);
OnCreated();
}
@ -397041,6 +397221,30 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentMaterialBigTypeId", DbType="NVarChar(50)")]
public string EquipmentMaterialBigTypeId
{
get
{
return this._EquipmentMaterialBigTypeId;
}
set
{
if ((this._EquipmentMaterialBigTypeId != value))
{
if (this._WBS_EquipmentMaterialBigType.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnEquipmentMaterialBigTypeIdChanging(value);
this.SendPropertyChanging();
this._EquipmentMaterialBigTypeId = value;
this.SendPropertyChanged("EquipmentMaterialBigTypeId");
this.OnEquipmentMaterialBigTypeIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_CostControl_WBS_EquipmentMaterialType", Storage="_WBS_CostControl", ThisKey="EquipmentMaterialTypeId", OtherKey="EquipmentMaterialTypeId", DeleteRule="NO ACTION")]
public EntitySet<WBS_CostControl> WBS_CostControl
{
@ -397054,6 +397258,40 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_EquipmentMaterialType_WBS_EquipmentMaterialBigType", Storage="_WBS_EquipmentMaterialBigType", ThisKey="EquipmentMaterialBigTypeId", OtherKey="EquipmentMaterialBigTypeId", IsForeignKey=true)]
public WBS_EquipmentMaterialBigType WBS_EquipmentMaterialBigType
{
get
{
return this._WBS_EquipmentMaterialBigType.Entity;
}
set
{
WBS_EquipmentMaterialBigType previousValue = this._WBS_EquipmentMaterialBigType.Entity;
if (((previousValue != value)
|| (this._WBS_EquipmentMaterialBigType.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._WBS_EquipmentMaterialBigType.Entity = null;
previousValue.WBS_EquipmentMaterialType.Remove(this);
}
this._WBS_EquipmentMaterialBigType.Entity = value;
if ((value != null))
{
value.WBS_EquipmentMaterialType.Add(this);
this._EquipmentMaterialBigTypeId = value.EquipmentMaterialBigTypeId;
}
else
{
this._EquipmentMaterialBigTypeId = default(string);
}
this.SendPropertyChanged("WBS_EquipmentMaterialBigType");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;