Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
alter table HJGL_YardPlanning add YardPlanName varchar(100);
|
||||
alter table HJGL_YardPlanning add SurperId varchar(50);
|
||||
@@ -132,11 +132,11 @@ namespace BLL
|
||||
lib.MaterialMade,
|
||||
-sum( pipe.Number) AS num
|
||||
FROM dbo.HJGL_PipeLineMat pipe
|
||||
LEFT JOIN HJGL_Pipeline_ComponentJoint comjoint
|
||||
ON comjoint.PipelineComponentCode =pipe.PrefabricatedComponents
|
||||
LEFT JOIN HJGL_Pipeline_Component com
|
||||
ON com.PipelineComponentCode =pipe.PrefabricatedComponents
|
||||
LEFT JOIN HJGL_MaterialCodeLib lib
|
||||
ON lib.MaterialCode = pipe.MaterialCode
|
||||
WHERE comjoint.State=1
|
||||
WHERE com.ProductionState=1
|
||||
GROUP BY lib.MaterialCode,lib.MaterialName,lib.MaterialUnit, lib.MaterialSpec,lib.MaterialMade
|
||||
UNION
|
||||
SELECT lib.MaterialCode,
|
||||
|
||||
@@ -14,6 +14,11 @@ namespace BLL
|
||||
{
|
||||
return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId == YardPlanningId);
|
||||
}
|
||||
public static List<Model.HJGL_YardPlanning> GetHJGL_YardPlanningBySurperId(string SurperId)
|
||||
{
|
||||
var q= (from x in Funs.DB.HJGL_YardPlanning where x.SurperId== SurperId select x ) .ToList();
|
||||
return q;
|
||||
}
|
||||
public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId,string unitworkid)
|
||||
|
||||
{
|
||||
@@ -44,7 +49,15 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SavePic(string YardPlanningId, string imgurl)
|
||||
{
|
||||
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId== YardPlanningId);
|
||||
if (model != null)
|
||||
{
|
||||
model.FlowChartPic = imgurl;
|
||||
UpdateHJGL_YardPlanning(model);
|
||||
}
|
||||
}
|
||||
public static void AddHJGL_YardPlanning(Model.HJGL_YardPlanning newtable)
|
||||
{
|
||||
Model.HJGL_YardPlanning table = new Model.HJGL_YardPlanning();
|
||||
@@ -53,6 +66,8 @@ namespace BLL
|
||||
table.Remark = newtable.Remark;
|
||||
table.FlowChartPic = newtable.FlowChartPic;
|
||||
table.UnitWorkId = newtable.UnitWorkId;
|
||||
table.YardPlanName=newtable.YardPlanName;
|
||||
table.SurperId = newtable.SurperId;
|
||||
Funs.DB.HJGL_YardPlanning.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
@@ -69,6 +84,8 @@ namespace BLL
|
||||
table.Remark = newtable.Remark;
|
||||
table.FlowChartPic = newtable.FlowChartPic;
|
||||
table.UnitWorkId = newtable.UnitWorkId;
|
||||
table.YardPlanName = newtable.YardPlanName;
|
||||
table.SurperId = newtable.SurperId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -83,6 +100,31 @@ namespace BLL
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteHJGL_YardPlanningBySurperId(string SurperId)
|
||||
{
|
||||
var q= GetHJGL_YardPlanningBySurperId(SurperId);
|
||||
if (q.Count >0)
|
||||
{
|
||||
Funs.DB.HJGL_YardPlanning.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void DleteAllById(string YardPlanningId)
|
||||
{
|
||||
var q = GetHJGL_YardPlanningById(YardPlanningId);
|
||||
var id = q.YardPlanningId;
|
||||
DeleteHJGL_YardPlanningById(YardPlanningId);
|
||||
var chirdList = GetHJGL_YardPlanningBySurperId(id);
|
||||
if (chirdList.Count>0)
|
||||
{
|
||||
foreach (var item in chirdList)
|
||||
{
|
||||
DleteAllById(item.YardPlanningId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,5 +209,6 @@ namespace BLL
|
||||
|
||||
return decimal.Truncate(result);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,5 +290,7 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,6 +310,15 @@ namespace BLL
|
||||
|
||||
return list;
|
||||
}
|
||||
public static List<Model.HJGL_WeldingDaily> GetPipelineDailyListByUnitWorkId(string UnitWorkId)
|
||||
{
|
||||
var list = (from x in Funs.DB.HJGL_WeldingDaily
|
||||
where x.UnitWorkId == UnitWorkId
|
||||
orderby x.WeldingDailyCode
|
||||
select x).ToList();
|
||||
|
||||
return list;
|
||||
}
|
||||
public static Dictionary<string, object> GetFileOutValueById(string WeldingDailyId)
|
||||
{
|
||||
var value = new Dictionary<string, object>();
|
||||
@@ -375,7 +384,7 @@ namespace BLL
|
||||
/// <param name="dropName">下拉框名称</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
/// <param name="WeldingDailyType">耗材类型</param>
|
||||
public static void InitWeldingDailyDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string unitId)
|
||||
public static void InitDropDownListByUnitId(FineUIPro.DropDownList dropName, bool isShowPlease, string unitId)
|
||||
{
|
||||
dropName.DataValueField = "WeldingDailyId";
|
||||
dropName.DataTextField = "WeldingDailyCode";
|
||||
@@ -386,6 +395,17 @@ namespace BLL
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
public static void InitDownListByUnitWortId(FineUIPro.DropDownList dropName, bool isShowPlease, string UnitWortId)
|
||||
{
|
||||
dropName.DataValueField = "WeldingDailyId";
|
||||
dropName.DataTextField = "WeldingDailyCode";
|
||||
dropName.DataSource = GetPipelineDailyListByUnitWorkId(UnitWortId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,6 +558,7 @@
|
||||
<Content Include="HJGL\PreDesign\PrePipeline.aspx" />
|
||||
<Content Include="HJGL\PreDesign\PrePipelineBatchEdit.aspx" />
|
||||
<Content Include="HJGL\PreDesign\PrePipelineEdit.aspx" />
|
||||
<Content Include="HJGL\PreDesign\YardPlanningEdit.aspx" />
|
||||
<Content Include="HJGL\PurgingCleaning\PC_ItemEndCheck.aspx" />
|
||||
<Content Include="HJGL\PurgingCleaning\PC_ItemEndCheckEdit.aspx" />
|
||||
<Content Include="HJGL\PurgingCleaning\PurgingCleaningAudit.aspx" />
|
||||
@@ -7936,6 +7937,13 @@
|
||||
<Compile Include="HJGL\PreDesign\PrePipelineEdit.aspx.designer.cs">
|
||||
<DependentUpon>PrePipelineEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\PreDesign\YardPlanningEdit.aspx.cs">
|
||||
<DependentUpon>YardPlanningEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\PreDesign\YardPlanningEdit.aspx.designer.cs">
|
||||
<DependentUpon>YardPlanningEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\PurgingCleaning\PC_ItemEndCheck.aspx.cs">
|
||||
<DependentUpon>PC_ItemEndCheck.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -188,16 +188,16 @@
|
||||
<f:RenderField HeaderText="盖面焊工号" ColumnID="WelderCode" DataField="WelderCode"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="热处理报告编号" ColumnID="HotProessTrustNo" DataField="HotProessTrustNo"
|
||||
<f:RenderField HeaderText="热处理报告编号" ColumnID="HotProessReportNo" DataField="HotProessReportNo"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="热处理检测结果" ColumnID="HotIsPass" DataField="HotIsPass"
|
||||
<f:RenderField HeaderText="热处理检测结果" ColumnID="HotProessResult" DataField="HotProessResult"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="硬度报告编号" ColumnID="HardReportNo" DataField="HardReportNo"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="硬度检测结果" ColumnID="HardIsPass" DataField="HardIsPass"
|
||||
<f:RenderField HeaderText="硬度检测结果" ColumnID="HardResult" DataField="HardResult"
|
||||
FieldType="String" HeaderTextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="委托单编号" ColumnID="TrustBatchCode" DataField="TrustBatchCode"
|
||||
|
||||
@@ -84,6 +84,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
ViewState["Incomplete_weldjunction"] = value;
|
||||
}
|
||||
}
|
||||
public static List<Model.View_HJGL_WeldJoint> View_HJGL_WeldJoint = new List<Model.View_HJGL_WeldJoint>();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -293,9 +295,10 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
}
|
||||
model.PipelineId= this.tvControlItem.SelectedNodeID;
|
||||
model.PipelineId= this.tvControlItem.SelectedNodeID;
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
View_HJGL_WeldJoint = list;
|
||||
Grid1.RecordCount = list.Count;
|
||||
// var table = this.GetPagedDataTable(Grid1, list);
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
@@ -473,28 +476,68 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
//model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
//if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
//{
|
||||
// model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
View_HJGL_WeldJoint = list;
|
||||
}
|
||||
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
var q = (from x in View_HJGL_WeldJoint
|
||||
select new
|
||||
{
|
||||
焊口号 = x.WeldJointCode,
|
||||
单位名称 = x.UnitName,
|
||||
材质1 = x.Material1Code,
|
||||
材质2 = x.Material2Code,
|
||||
达因 = x.Size,
|
||||
外径 = x.Dia,
|
||||
壁厚 = x.Thickness,
|
||||
规格 = x.Specification,
|
||||
焊缝类型 = x.WeldTypeCode,
|
||||
焊接方法 = x.WeldingMethodCode,
|
||||
WPS编号 = x.WPQCode,
|
||||
坡口类型 = x.GrooveTypeCode,
|
||||
焊条 = x.WeldingRod,
|
||||
焊丝 = x.WeldingWire,
|
||||
预热温度 = x.PreTemperature,
|
||||
焊口属性 = x.JointAttribute,
|
||||
焊接日期 = x.WeldingDate,
|
||||
打底焊工号 = x.BackingWelderCode,
|
||||
盖面焊工号 = x.WelderCode,
|
||||
热处理报告编号 = x.HotProessReportNo,
|
||||
热处理检测结果 = x.HotProessResult,
|
||||
硬度报告编号 = x.HardReportNo,
|
||||
硬度检测结果 = x.HardResult,
|
||||
委托单编号 = x.TrustBatchCode,
|
||||
检测单编号 = x.NDECode,
|
||||
|
||||
//}
|
||||
//else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
//{
|
||||
// model.PipelineId = this.tvControlItem.SelectedNodeID;
|
||||
//}
|
||||
//model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
//var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
}).ToList();
|
||||
MiniExcel.SaveAs(path, q);
|
||||
|
||||
string fileName = "焊口信息总览.xlsx";
|
||||
FileInfo info = new FileInfo(path);
|
||||
long fileSize = info.Length;
|
||||
System.Web.HttpContext.Current.Response.Clear();
|
||||
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
File.Delete(path);
|
||||
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊口台账总览" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
//Response.ClearContent();
|
||||
//string filename = Funs.GetNewFileName();
|
||||
//Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊口台账总览" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
//Response.ContentType = "application/excel";
|
||||
//Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
//Response.Write(GetGridTableHtml(Grid1));
|
||||
//Response.End();
|
||||
}
|
||||
protected void btnOutNOComPipeline_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -19,18 +19,25 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线" OnTextChanged="Tree_TextChanged"
|
||||
EmptyText="输入查询条件" AutoPostBack="true"
|
||||
Width="280px" LabelWidth="60px">
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线"
|
||||
EmptyText="输入查询条件" Width="280px" LabelWidth="60px">
|
||||
</f:TextBox>
|
||||
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnTreeFind_Click1" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="单位工程"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="true" AutoLeafIdentification="true" OnNodeExpand="tvControlItem_TreeNodeExpanded"
|
||||
EnableSingleClickExpand="false" AutoLeafIdentification="true" OnNodeExpand="tvControlItem_TreeNodeExpanded"
|
||||
EnableTextSelection="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
@@ -51,43 +58,45 @@
|
||||
<f:DropDownList ID="drpProductionState" Label="生产状态" runat="server"
|
||||
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
|
||||
<f:DropDownList ID="drpWeldingDailyCode" Label="日报编号" runat="server" AutoSelectFirstItem="true"
|
||||
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
|
||||
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" Text="查询"
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
|
||||
</f:Button>
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" OnClick="btnDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
|
||||
Text="删除" Icon="Delete">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnImportQRCode" Text="导入二维码信息" ToolTip="导入二维码信息" Icon="PackageIn" runat="server" OnClick="btnImportQRCode_Click">
|
||||
<f:Button ID="btnImportQRCode" Text="导入二维码信息" ToolTip="导入二维码信息" Icon="PackageIn" runat="server" OnClick="btnImportQRCode_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" Hidden="true"
|
||||
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" Hidden="true"
|
||||
runat="server" OnClick="btnBatchAdd_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSinglePreview" ToolTip="管道预制加工图" Icon="PageRed" Text="管道预制加工图"
|
||||
EnablePostBack="true" OnClick="btnSinglePreview_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnableAjax="false" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
|
||||
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息" ForceFit="true"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息" ForceFit="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineComponentId" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineComponentId"
|
||||
AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
@@ -123,7 +132,7 @@
|
||||
HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<%-- <f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center"
|
||||
<%-- <f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("QRCode"),Eval("PipelineComponentId")) %>'></asp:Label>
|
||||
@@ -142,7 +151,7 @@
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="cmd_print" Text="预览打印" />
|
||||
|
||||
</Columns>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
@@ -180,7 +189,7 @@
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -110,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
@@ -160,6 +160,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = item.PipelineCode + "【" + comCount.ToString() + " " + "组件" + "】";
|
||||
newNode.ToolTip = "管线号【组件数】";
|
||||
newNode.CommandName = "管线";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
@@ -197,21 +198,30 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
if (e.CommandName.Split('|').Length == 2)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
WeldingDailyService.InitDownListByUnitWortId(drpWeldingDailyCode, true, this.tvControlItem.SelectedNodeID);
|
||||
|
||||
}
|
||||
if (e.CommandName == "加载")
|
||||
else if (e.CommandName == "管线")
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
}
|
||||
}
|
||||
else if (e.CommandName == "加载")
|
||||
{
|
||||
string CommandName = e.Node.ParentNode.CommandName;
|
||||
e.Node.ParentNode.CommandName = ( int.Parse( CommandName.Split('|')[0])+1)+"|"+ int.Parse(CommandName.Split('|')[1]);
|
||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
BindNodes(e.Node.ParentNode);
|
||||
}
|
||||
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
@@ -222,7 +232,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
|
||||
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
|
||||
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,
|
||||
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,com.DrawingName,com.ReceiveDate,
|
||||
person.PersonName
|
||||
@@ -231,12 +241,29 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit
|
||||
LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit
|
||||
LEFT JOIN Person_Persons person on com.ReceiveMan=person.PersonId
|
||||
WHERE com.PipelineId =@PipelineId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter> { };
|
||||
LEFT JOIN HJGL_WeldJoint joint on joint.PipelineId =com.PipelineId
|
||||
WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
// strSql += " AND com.PipelineId =@PipelineId";
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
|
||||
{
|
||||
strSql += " and pipe.UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
|
||||
}
|
||||
else if (tvControlItem.SelectedNode.CommandName=="管线")
|
||||
{
|
||||
strSql += " and com.PipelineId = @PipelineId ";
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
|
||||
}
|
||||
|
||||
if (drpWeldingDailyCode.SelectedValue!=Const._Null &&!string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue))
|
||||
{
|
||||
strSql += " and joint.WeldingDailyId = @WeldingDailyId ";
|
||||
listStr.Add(new SqlParameter("@WeldingDailyId", drpWeldingDailyCode.SelectedValue));
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
|
||||
{
|
||||
strSql += " AND com.PipelineComponentCode like @PipelineComponentCode";
|
||||
@@ -323,7 +350,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
Print(tvControlItem.SelectedNodeID,"");
|
||||
@@ -451,6 +477,38 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "PreviewQRCode")
|
||||
{
|
||||
var ID = e.RowID;
|
||||
var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
|
||||
string path = "";
|
||||
if (!string.IsNullOrEmpty(q.QRCode))
|
||||
{
|
||||
path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
|
||||
|
||||
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + filepath + "');</script>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.CommandName == "cmd_print")
|
||||
{
|
||||
string Id = this.Grid1.SelectedRowID;
|
||||
Print(tvControlItem.SelectedNodeID, Id);
|
||||
}
|
||||
|
||||
}
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口及刷新页面
|
||||
@@ -474,17 +532,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Tree_TextChanged(object sender, EventArgs e)
|
||||
protected void btnTreeFind_Click1(object sender, EventArgs e)
|
||||
{
|
||||
this.InitTreeMenu();
|
||||
tvControlItem.CollapseAllNodes(tvControlItem.Nodes[1].Nodes);
|
||||
this.BindGrid();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -493,10 +544,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
public string ConvertImageUrlByImage(object str, object id)
|
||||
{
|
||||
string path = string.Empty;
|
||||
@@ -572,31 +619,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
|
||||
}
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "PreviewQRCode")
|
||||
{
|
||||
var ID = e.RowID;
|
||||
var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
|
||||
string path = "";
|
||||
if (!string.IsNullOrEmpty(q.QRCode))
|
||||
{
|
||||
path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
|
||||
|
||||
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + filepath + "');</script>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.CommandName == "cmd_print")
|
||||
{
|
||||
string Id = this.Grid1.SelectedRowID;
|
||||
Print(tvControlItem.SelectedNodeID, Id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// btnTreeFind 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnTreeFind;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
@@ -131,6 +140,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProductionState;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldingDailyCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldingDailyCode;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -11,14 +11,18 @@
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
Layout="HBox" EnableCollapse="true" Width="300" Title="示意图" TitleToolTip="示意图"
|
||||
ShowBorder="true" ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="300px" Title="示意图"
|
||||
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="装置区域"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="true"
|
||||
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="false"
|
||||
EnableTextSelection="true">
|
||||
<Listeners>
|
||||
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
|
||||
</Listeners>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
@@ -37,7 +41,7 @@
|
||||
<f:Listener Event="click" Handler="onUploadClick" />
|
||||
</Listeners>
|
||||
</f:Tool>
|
||||
<f:Tool runat="server" ID="btnAttachUrl" Icon="TableCell" Text="上传附件" EnablePostBack="true" OnClick="btnAttachUrl_Click">
|
||||
<f:Tool runat="server" ID="btnAttachUrl" Icon="TableCell" Text="上传附件" EnablePostBack="true" OnClick="btnAttachUrl_Click">
|
||||
</f:Tool>
|
||||
</Tools>
|
||||
<Items>
|
||||
@@ -60,72 +64,43 @@
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window1" Title="编辑" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Self" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="300px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="增加" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Self" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="300px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuAdd" OnClick="btnMenuAdd_Click" EnablePostBack="true" runat="server" Icon="Add"
|
||||
Text="增加">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true" Icon="Pencil"
|
||||
runat="server" Text="修改">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true" Icon="Delete"
|
||||
ConfirmText="确认删除选中项?" ConfirmTarget="Top" runat="server" Text="删除">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var filePhotoClientID = '<%= filePhoto.ClientID %>';
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 保存当前菜单对应的树节点ID
|
||||
var currentNodeId;
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onTreeNodeContextMenu(event, nodeId) {
|
||||
currentNodeId = nodeId;
|
||||
F(menuID).show();
|
||||
return false;
|
||||
}
|
||||
function onUploadClick(event) {
|
||||
F(filePhotoClientID).el.find('.f-field-fileupload-fileinput').click();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<%--<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" ShowHeader="false" Title="应急流程" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="EmergencyProcessId" ForceFit="true"
|
||||
DataIDField="EmergencyProcessId" AllowSorting="true" SortField="ProcessSteps" SortDirection="ASC"
|
||||
AllowPaging="false" IsDatabasePaging="true" PageSize="100" EnableRowDoubleClickEvent="true"
|
||||
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RenderField Width="60px" ColumnID="ProcessSteps" DataField="ProcessSteps"
|
||||
FieldType="String" HeaderText="步骤" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="ProcessName" DataField="ProcessName"
|
||||
FieldType="String" HeaderText="名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="StepOperator" DataField="StepOperator"
|
||||
FieldType="String" HeaderText="操作人员" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="500px" ColumnID="Remark" DataField="Remark" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderText="内容" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="应急流程" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1000px" Height="450px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="TableEdit" EnablePostBack="true"
|
||||
Hidden="true" runat="server" Text="编辑">
|
||||
</f:MenuButton>
|
||||
</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;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>--%>
|
||||
</html>
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
if (unit != null)
|
||||
{
|
||||
@@ -119,7 +119,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
//int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -127,24 +128,53 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.EnableClickEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
BoundTree(tn1.Nodes, tn1.NodeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (unitWork2.Count() > 0)
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId==q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
// tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn2.Text = q.UnitWorkName ;
|
||||
tn2.CommandName = "主项";
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.EnableClickEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a>0)
|
||||
{
|
||||
BoundTree(tn2.Nodes, tn2.NodeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BoundTree(TreeNodeCollection nodes, string superId)
|
||||
{
|
||||
var mdoel = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningBySurperId(superId);
|
||||
foreach (var m in mdoel)
|
||||
{
|
||||
TreeNode chidNode = new TreeNode
|
||||
{
|
||||
Text = m.YardPlanName,
|
||||
NodeID = m.YardPlanningId,
|
||||
Expanded = true,
|
||||
Selectable = true,
|
||||
EnableClickEvent= true,
|
||||
};
|
||||
nodes.Add(chidNode);
|
||||
this.BoundTree(chidNode.Nodes, m.YardPlanningId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 点击TreeView
|
||||
@@ -186,8 +216,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
@@ -213,10 +241,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
protected void filePhoto_FileSelected(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID) && tvControlItem.SelectedNode.CommandName != "主项")
|
||||
{
|
||||
if (filePhoto.HasFile)
|
||||
{
|
||||
{
|
||||
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
|
||||
if (string.IsNullOrEmpty(rootUrl))
|
||||
{
|
||||
@@ -244,19 +272,48 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName;
|
||||
|
||||
|
||||
HJGL_YardPlanningService.SavePic(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName);
|
||||
HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName);
|
||||
// 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!)
|
||||
filePhoto.Reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一个主项!", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("主节点无法上传,请新增节点!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 树点击事件
|
||||
protected void btnMenuAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("YardPlanningEdit.aspx?YardPlanningId={0}&&Type=Add", this.tvControlItem.SelectedNodeID, "增加 - ")));
|
||||
|
||||
}
|
||||
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "主项")
|
||||
{
|
||||
ShowNotify("无法修改此节点!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("YardPlanningEdit.aspx?YardPlanningId={0}&&Type=Edit", this.tvControlItem.SelectedNodeID, "增加 - ")));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
BLL.HJGL_YardPlanningService.DleteAllById(this.tvControlItem.SelectedNodeID);
|
||||
|
||||
this.InitTreeMenu();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Tree点击事件
|
||||
/// </summary>
|
||||
@@ -266,7 +323,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
if (unit != null)
|
||||
{
|
||||
@@ -279,162 +336,34 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)&& tvControlItem.SelectedNode.CommandName!="主项")
|
||||
{
|
||||
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
|
||||
if (model == null)
|
||||
{
|
||||
HJGL_YardPlanningService.SavePic(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID, "");
|
||||
model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, "");
|
||||
// model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL_YardPlanning&menuId={1}", model.YardPlanningId, BLL.Const.HJGL_YardPlanningMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一个主项!", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("主节点无法上传,请新增节点!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
ShowNotify("修改成功!", MessageBoxIcon.Success);
|
||||
this.InitTreeMenu();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//public partial class EmergencyProcess : PageBase
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 项目id
|
||||
// /// </summary>
|
||||
// public string ProjectId
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return (string)ViewState["ProjectId"];
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// ViewState["ProjectId"] = value;
|
||||
// }
|
||||
// }
|
||||
|
||||
// #region 加载
|
||||
// /// <summary>
|
||||
// /// 加载页面
|
||||
// /// </summary>
|
||||
// /// <param name="sender"></param>
|
||||
// /// <param name="e"></param>
|
||||
// protected void Page_Load(object sender, EventArgs e)
|
||||
// {
|
||||
// if (!IsPostBack)
|
||||
// {
|
||||
// ////权限按钮方法
|
||||
// this.GetButtonPower();
|
||||
// this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
// if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
// {
|
||||
// this.ProjectId = Request.Params["projectId"];
|
||||
// }
|
||||
// // 绑定表格
|
||||
// this.BindGrid();
|
||||
// }
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region GV绑定数据
|
||||
// /// <summary>
|
||||
// /// 绑定数据
|
||||
// /// </summary>
|
||||
// void BindGrid()
|
||||
// {
|
||||
// var getEmergencys = (from x in Funs.DB.Emergency_EmergencyProcess
|
||||
// where x.ProjectId == this.ProjectId
|
||||
// select x).ToList();
|
||||
// if (getEmergencys.Count() == 0)
|
||||
// {
|
||||
// var getEEmergencyProcessItems = from x in Funs.DB.Emergency_EmergencyProcess
|
||||
// where x.ProjectId == null
|
||||
// select x;
|
||||
// foreach (var item in getEEmergencyProcessItems)
|
||||
// {
|
||||
// Model.Emergency_EmergencyProcess newItem = new Model.Emergency_EmergencyProcess
|
||||
// {
|
||||
// EmergencyProcessId = SQLHelper.GetNewID(),
|
||||
// ProjectId = this.ProjectId,
|
||||
// ProcessSteps = item.ProcessSteps,
|
||||
// ProcessName = item.ProcessName,
|
||||
// StepOperator = item.StepOperator,
|
||||
// Remark = item.Remark,
|
||||
// };
|
||||
// Funs.DB.Emergency_EmergencyProcess.InsertOnSubmit(newItem);
|
||||
// Funs.DB.SubmitChanges();
|
||||
|
||||
// getEmergencys.Add(item);
|
||||
// }
|
||||
// }
|
||||
|
||||
// Grid1.RecordCount = getEmergencys.Count();
|
||||
// DataTable tb = this.GetPagedDataTable(Grid1, getEmergencys);
|
||||
// Grid1.DataSource = tb;
|
||||
// Grid1.DataBind();
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 编辑
|
||||
// /// <summary>
|
||||
// /// 双击事件
|
||||
// /// </summary>
|
||||
// /// <param name="sender"></param>
|
||||
// /// <param name="e"></param>
|
||||
// protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
// {
|
||||
// this.EditData();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 右键编辑事件
|
||||
// /// </summary>
|
||||
// /// <param name="sender"></param>
|
||||
// /// <param name="e"></param>
|
||||
// protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
// {
|
||||
// this.EditData();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// 编辑数据方法
|
||||
// /// </summary>
|
||||
// void EditData()
|
||||
// {
|
||||
// if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
// {
|
||||
// Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EmergencyProcessEdit.aspx?EmergencyProcessId={0}", Grid1.SelectedRowID, "详细 - ")));
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
// #region 获取按钮权限
|
||||
// /// <summary>
|
||||
// /// 获取按钮权限
|
||||
// /// </summary>
|
||||
// /// <param name="button"></param>
|
||||
// /// <returns></returns>
|
||||
// void GetButtonPower()
|
||||
// {
|
||||
// if (Request.Params["value"] == "0")
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_YardPlanningMenuId);
|
||||
// if (buttonList.Count() > 0)
|
||||
// {
|
||||
// if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
// {
|
||||
// this.btnMenuEdit.Hidden = false;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// #endregion
|
||||
//}
|
||||
}
|
||||
@@ -139,5 +139,59 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YardPlanningEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.YardPlanningEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<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="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtYardPlanName" runat="server" Label="名称" LabelWidth="130px" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,373 +1,74 @@
|
||||
using BLL;
|
||||
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;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
public partial class YardPlanningEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string EmergencyProcessId
|
||||
public string YardPlanningId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["EmergencyProcessId"];
|
||||
return (string)ViewState["YardPlanningId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["EmergencyProcessId"] = value;
|
||||
ViewState["YardPlanningId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GetButtonPower();
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.EmergencyProcessId = Request.Params["EmergencyProcessId"];
|
||||
if (!string.IsNullOrEmpty(this.EmergencyProcessId))
|
||||
YardPlanningId=Request.Params["YardPlanningId"];
|
||||
string Type= Request.Params["Type"];
|
||||
if (!string.IsNullOrEmpty(Type))
|
||||
{
|
||||
var EmergencyProcess = Funs.DB.Emergency_EmergencyProcess.FirstOrDefault(x => x.EmergencyProcessId == this.EmergencyProcessId);
|
||||
if (EmergencyProcess != null)
|
||||
|
||||
if (Type=="Edit")
|
||||
{
|
||||
this.txtProcessSteps.Text = EmergencyProcess.ProcessSteps;
|
||||
this.txtProcessName.Text = EmergencyProcess.ProcessName;
|
||||
this.txtStepOperator.Text = EmergencyProcess.StepOperator;
|
||||
//this.txtRemark.Text = EmergencyProcess.Remark;
|
||||
if (EmergencyProcess.ProcessSteps == "0")
|
||||
{
|
||||
this.State1.Hidden = false;
|
||||
this.State2.Hidden = true;
|
||||
this.State2Person.Hidden = true;
|
||||
BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
EmergencyTeamAndTrainService.InitTeamDropDownList(drpTeam, this.CurrUser.LoginProjectId, true);
|
||||
if (!string.IsNullOrEmpty(EmergencyProcess.ProcessTeam))
|
||||
{
|
||||
this.drpTeam.SelectedValueArray = EmergencyProcess.ProcessTeam.Split(',');
|
||||
string Users = string.Empty;
|
||||
string[] array = this.drpTeam.SelectedValueArray;
|
||||
List<string> str = new List<string>();
|
||||
foreach (var item in array)
|
||||
{
|
||||
if (item != BLL.Const._Null)
|
||||
{
|
||||
var TeamItem = (from x in Funs.DB.Emergency_EmergencyTeamItem where x.FileId == item select x).ToList();
|
||||
foreach (var teams in TeamItem)
|
||||
{
|
||||
Users += PersonService.GetPersonNameById(teams.PersonId) + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Users))
|
||||
{
|
||||
txtUser.Text = Users.Substring(0, Users.LastIndexOf(","));
|
||||
}
|
||||
}
|
||||
}
|
||||
var q = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningById(YardPlanningId);
|
||||
txtYardPlanName.Text = q.YardPlanName;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select * from Emergency_EmergencyProcessItem where EmergencyProcessId=@EmergencyProcessId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@EmergencyProcessId", this.EmergencyProcessId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.SaveData();
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
void SaveData()
|
||||
{
|
||||
var EmergencyProcess = Funs.DB.Emergency_EmergencyProcess.FirstOrDefault(x => x.EmergencyProcessId == this.EmergencyProcessId);
|
||||
if (EmergencyProcess != null)
|
||||
string Type = Request.Params["Type"];
|
||||
if (!string.IsNullOrEmpty(Type))
|
||||
{
|
||||
|
||||
EmergencyProcess.ProcessName = this.txtProcessName.Text.Trim();
|
||||
EmergencyProcess.StepOperator = this.txtStepOperator.Text.Trim();
|
||||
//EmergencyProcess.Remark = this.txtRemark.Text.Trim();
|
||||
//队伍
|
||||
EmergencyProcess.ProcessTeam = Funs.GetStringByArray(this.drpTeam.SelectedValueArray);
|
||||
Funs.DB.SubmitChanges();
|
||||
if (EmergencyProcess.ProcessSteps == "0")
|
||||
if (Type == "Add")
|
||||
{
|
||||
var getViewList = this.CollectGridInfo();
|
||||
foreach (var item in getViewList)
|
||||
Model.HJGL_YardPlanning hJGL_YardPlanning = new Model.HJGL_YardPlanning
|
||||
{
|
||||
var ProcessItem = Funs.DB.Emergency_EmergencyProcessItem.FirstOrDefault(x => x.EmergencyProcessItemId == item.EmergencyProcessItemId);
|
||||
if (ProcessItem != null)
|
||||
{
|
||||
ProcessItem.Content = item.Content;
|
||||
ProcessItem.SortId = item.SortId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Emergency_EmergencyProcessItem newItem = new Model.Emergency_EmergencyProcessItem
|
||||
{
|
||||
EmergencyProcessItemId = item.EmergencyProcessItemId,
|
||||
EmergencyProcessId = this.EmergencyProcessId,
|
||||
Content = item.Content,
|
||||
SortId = item.SortId,
|
||||
};
|
||||
Funs.DB.Emergency_EmergencyProcessItem.InsertOnSubmit(newItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
YardPlanningId = SQLHelper.GetNewID(),
|
||||
YardPlanName = txtYardPlanName.Text,
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
SurperId = YardPlanningId,
|
||||
|
||||
};
|
||||
HJGL_YardPlanningService.AddHJGL_YardPlanning(hJGL_YardPlanning);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//private string GetStringByArray(string[] array)
|
||||
//{
|
||||
// string str = string.Empty;
|
||||
// foreach (var item in array)
|
||||
// {
|
||||
// if (item != BLL.Const._Null)
|
||||
// {
|
||||
// str += item + ",";
|
||||
// }
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(str))
|
||||
// {
|
||||
// str = str.Substring(0, str.LastIndexOf(","));
|
||||
// }
|
||||
// return str;
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectEmergencyProcessMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
else if (Type == "Edit")
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
var q = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningById(YardPlanningId);
|
||||
q.YardPlanName=txtYardPlanName.Text ;
|
||||
HJGL_YardPlanningService.UpdateHJGL_YardPlanning(q);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
|
||||
#region 确定按钮
|
||||
/// <summary>
|
||||
/// 确定按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSure_Click(object sender, EventArgs e)
|
||||
{
|
||||
var getViewList = this.CollectGridInfo();
|
||||
getViewList = getViewList.Where(x => x.EmergencyProcessItemId != this.hdEmergencyProcessId.Text).ToList();
|
||||
Model.Emergency_EmergencyProcessItem newView = new Model.Emergency_EmergencyProcessItem
|
||||
{
|
||||
EmergencyProcessItemId = SQLHelper.GetNewID(),
|
||||
EmergencyProcessId = this.EmergencyProcessId,
|
||||
Content = this.txtContent.Text,
|
||||
SortId=this.txtSortId.Text,
|
||||
};
|
||||
getViewList.Add(newView);
|
||||
|
||||
this.Grid1.DataSource = getViewList;
|
||||
this.Grid1.DataBind();
|
||||
this.InitText();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 收集页面信息
|
||||
/// <summary>
|
||||
/// 收集页面信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<Model.Emergency_EmergencyProcessItem> CollectGridInfo()
|
||||
{
|
||||
List<Model.Emergency_EmergencyProcessItem> getViewList = new List<Model.Emergency_EmergencyProcessItem>();
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
Model.Emergency_EmergencyProcessItem newView = new Model.Emergency_EmergencyProcessItem
|
||||
{
|
||||
EmergencyProcessItemId = Grid1.Rows[i].DataKeys[0].ToString(),
|
||||
EmergencyProcessId = this.EmergencyProcessId,
|
||||
Content = Grid1.Rows[i].Values[1].ToString(),
|
||||
SortId = Grid1.Rows[i].Values[0].ToString(),
|
||||
};
|
||||
getViewList.Add(newView);
|
||||
}
|
||||
|
||||
return getViewList;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 页面清空
|
||||
/// <summary>
|
||||
/// 页面清空
|
||||
/// </summary>
|
||||
private void InitText()
|
||||
{
|
||||
this.hdEmergencyProcessId.Text = string.Empty;
|
||||
this.txtContent.Text = string.Empty;
|
||||
this.txtSortId.Text = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid 操作事件
|
||||
/// <summary>
|
||||
/// 双击
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑事件
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var getViewList = this.CollectGridInfo();
|
||||
var item = getViewList.FirstOrDefault(x => x.EmergencyProcessItemId == Grid1.SelectedRowID);
|
||||
if (item != null)
|
||||
{
|
||||
this.hdEmergencyProcessId.Text = item.EmergencyProcessItemId;
|
||||
this.txtContent.Text = item.Content;
|
||||
this.txtSortId.Text = item.SortId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
var getViewList = this.CollectGridInfo();
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var item = getViewList.FirstOrDefault(x => x.EmergencyProcessItemId == rowID);
|
||||
if (item != null)
|
||||
{
|
||||
getViewList.Remove(item);
|
||||
}
|
||||
var ProcessItem = Funs.DB.Emergency_EmergencyProcessItem.First(x => x.EmergencyProcessItemId == rowID);
|
||||
if (ProcessItem != null) {
|
||||
Funs.DB.Emergency_EmergencyProcessItem.DeleteOnSubmit(ProcessItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
this.Grid1.DataSource = getViewList;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void drpTeam_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
txtUser.Text = string.Empty; ;
|
||||
string Users = string.Empty;
|
||||
string[] array = this.drpTeam.SelectedValueArray;
|
||||
List<string> str = new List<string>();
|
||||
foreach (var item in array)
|
||||
{
|
||||
if (item != BLL.Const._Null)
|
||||
{
|
||||
var TeamItem = (from x in Funs.DB.Emergency_EmergencyTeamItem where x.FileId == item select x).ToList();
|
||||
foreach (var teams in TeamItem)
|
||||
{
|
||||
Users += PersonService.GetPersonNameById(teams.PersonId)+ ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Users))
|
||||
{
|
||||
txtUser.Text = Users.Substring(0, Users.LastIndexOf(","));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-155
@@ -42,130 +42,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtProcessSteps 控件。
|
||||
/// txtYardPlanName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProcessSteps;
|
||||
|
||||
/// <summary>
|
||||
/// txtProcessName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProcessName;
|
||||
|
||||
/// <summary>
|
||||
/// txtStepOperator 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtStepOperator;
|
||||
|
||||
/// <summary>
|
||||
/// State1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow State1;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// txtSortId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSortId;
|
||||
|
||||
/// <summary>
|
||||
/// txtContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtContent;
|
||||
|
||||
/// <summary>
|
||||
/// btnSure 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSure;
|
||||
|
||||
/// <summary>
|
||||
/// hdEmergencyProcessId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdEmergencyProcessId;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// State2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow State2;
|
||||
|
||||
/// <summary>
|
||||
/// drpTeam 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpTeam;
|
||||
|
||||
/// <summary>
|
||||
/// State2Person 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow State2Person;
|
||||
|
||||
/// <summary>
|
||||
/// txtUser 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtUser;
|
||||
protected global::FineUIPro.TextBox txtYardPlanName;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
@@ -184,41 +67,5 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnMatImport" Text="材料导入" ToolTip="材料导入" Icon="PackageIn" runat="server" OnClick="btnMatImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title> </title>
|
||||
<title></title>
|
||||
</head>
|
||||
<body class="f-bgcolor">
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" runat="server">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
|
||||
Icon="TableGo" EnableAjax="false" DisableControlBeforePostBack="true" EnablePostBack="true">
|
||||
</f:Button>
|
||||
|
||||
Icon="TableGo" EnableAjax="false" DisableControlBeforePostBack="true" EnablePostBack="true">
|
||||
</f:Button>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -30,12 +30,24 @@
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineCode" EnableBigData="true"
|
||||
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC"
|
||||
AllowPaging="true" IsDatabasePaging="false" PageSize="300" EnableBigDataRowTip="false" ForceFit="true"
|
||||
EnableTextSelection="True" >
|
||||
EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:RenderField Width="130px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||
FieldType="String" HeaderText="管线号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="130px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
|
||||
FieldType="String" HeaderText="流水段" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="130px" ColumnID="MatchingRate" DataField="MatchingRate" SortField="MatchingRate"
|
||||
FieldType="String" HeaderText="匹配率" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="130px" ColumnID="PlanStarDate" DataField="PlanStarDate" SortField="PlanStarDate"
|
||||
FieldType="String" HeaderText="安装日期" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
var a = (from x in pipelinecode select new { PipelineCode = x }).ToList();
|
||||
var b=(from x in Funs.DB .HJGL_Pipeline where pipelinecode.Contains(x.PipelineCode)
|
||||
select new {管线号=x.PipelineCode ,匹配率="100%",计划安装日期=x.PlanStartDate }).ToList();
|
||||
select new {管线号=x.PipelineCode ,流水段=x.FlowingSection,匹配率="100%",计划安装日期=x.PlanStartDate }).ToList();
|
||||
MiniExcel.SaveAs(path, b);
|
||||
|
||||
string fileName = "材料匹配100%管线.xlsx";
|
||||
@@ -70,9 +70,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
void BindGrid()
|
||||
{
|
||||
var a =( from x in pipelinecode select new { PipelineCode = x }).ToList();
|
||||
var a = (from x in pipelinecode select new { PipelineCode = x }).ToList();
|
||||
var b = (from x in Funs.DB.HJGL_Pipeline
|
||||
where pipelinecode.Contains(x.PipelineCode)
|
||||
select new { PipelineCode = x.PipelineCode, FlowingSection = x.FlowingSection, MatchingRate = "100%", PlanStarDate = x.PlanStartDate }).ToList();
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
this.Grid1.DataSource = a;
|
||||
this.Grid1.DataSource = b;
|
||||
this.Grid1.DataBind();
|
||||
Grid1.RecordCount = a.Count();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<Items>
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="焊接任务单" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="true"
|
||||
EnableTextSelection="true" OnNodeCommand="tvControlItem_NodeCommand" EnableExpandEvent="true">
|
||||
EnableTextSelection="true" OnNodeCommand="tvControlItem_NodeCommand" EnableExpandEvent="true" OnNodeExpand="tvControlItem_TreeNodeExpanded">
|
||||
<Listeners>
|
||||
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
|
||||
</Listeners>
|
||||
@@ -100,7 +100,7 @@
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="机动化程度" ColumnID="WeldingMode"
|
||||
<f:RenderField HeaderText="机动化程度" ColumnID="WeldingMode" Hidden="true"
|
||||
DataField="WeldingMode" SortField="WeldingMode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
@@ -116,19 +116,27 @@
|
||||
DataField="Size" SortField="Size" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="70px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia"
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia" Hidden="true"
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="70px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness" Hidden="true"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="70px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊接方法" ColumnID="WeldingMethodCode"
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia" Hidden="true"
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="70px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="公称直径" ColumnID="DNDia" Hidden="true"
|
||||
DataField="DNDia" SortField="DNDia" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="70px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊接方法" ColumnID="WeldingMethodCode" Hidden="true"
|
||||
DataField="WeldingMethodCode" SortField="WeldingMethodCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRodCode"
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRodCode" Hidden="true"
|
||||
DataField="WeldingRodCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="110px">
|
||||
<Editor>
|
||||
@@ -137,7 +145,7 @@
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWireCode"
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWireCode" Hidden="true"
|
||||
DataField="WeldingWireCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="110px">
|
||||
<Editor>
|
||||
|
||||
@@ -120,6 +120,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
var a = (from x in Funs.DB.HJGL_WeldTask
|
||||
where x.UnitWorkId == q.UnitWorkId
|
||||
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
|
||||
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
|
||||
select x.TaskDate.Value.Date).Distinct().Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -127,8 +132,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn1.CommandName = "单位工程";
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.EnableClickEvent = true;
|
||||
tn1.EnableExpandEvent = true;
|
||||
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
BindNodes(tn1);
|
||||
if (a > 0)
|
||||
{
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
tn1.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (unitWork2.Count() > 0)
|
||||
@@ -136,19 +150,40 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
var a = (from x in Funs.DB.HJGL_WeldTask
|
||||
where x.UnitWorkId == q.UnitWorkId
|
||||
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
|
||||
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
|
||||
select x.TaskDate.Value.Date).Distinct().Count();
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
tn2.Text = q.UnitWorkName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.EnableClickEvent = true;
|
||||
tn2.EnableExpandEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
BindNodes(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
tn2.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
|
||||
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
BindNodes(e.Node);
|
||||
}
|
||||
}
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
var p = (from x in Funs.DB.HJGL_WeldTask
|
||||
|
||||
@@ -82642,6 +82642,10 @@ namespace Model
|
||||
|
||||
private string _UnitWorkId;
|
||||
|
||||
private string _YardPlanName;
|
||||
|
||||
private string _SurperId;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
@@ -82656,6 +82660,10 @@ namespace Model
|
||||
partial void OnFlowChartPicChanged();
|
||||
partial void OnUnitWorkIdChanging(string value);
|
||||
partial void OnUnitWorkIdChanged();
|
||||
partial void OnYardPlanNameChanging(string value);
|
||||
partial void OnYardPlanNameChanged();
|
||||
partial void OnSurperIdChanging(string value);
|
||||
partial void OnSurperIdChanged();
|
||||
#endregion
|
||||
|
||||
public HJGL_YardPlanning()
|
||||
@@ -82763,6 +82771,46 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YardPlanName", DbType="VarChar(100)")]
|
||||
public string YardPlanName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._YardPlanName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._YardPlanName != value))
|
||||
{
|
||||
this.OnYardPlanNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._YardPlanName = value;
|
||||
this.SendPropertyChanged("YardPlanName");
|
||||
this.OnYardPlanNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SurperId", DbType="VarChar(50)")]
|
||||
public string SurperId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._SurperId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._SurperId != value))
|
||||
{
|
||||
this.OnSurperIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._SurperId = value;
|
||||
this.SendPropertyChanged("SurperId");
|
||||
this.OnSurperIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
Reference in New Issue
Block a user