20260306 热处理委托打印
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpIsoNoS" runat="server" Label="管道编号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoNoS_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpIsoNoS" runat="server" Label="管道编号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoNoS_SelectedIndexChanged" EnableMultiSelect="true" EnableCheckBoxSelect="true" AutoSelectFirstItem="false" Width="500px"></f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
|
||||
|
||||
@@ -90,25 +90,31 @@ namespace FineUIPro.Web.JGZL
|
||||
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
|
||||
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
var record = BLL.BlowingCleaningService.GetBlowingCleaningByProjectId(this.tvControlItem.SelectedNodeID);
|
||||
if (record != null)
|
||||
{
|
||||
this.BlowingCleaningId = record.BlowingCleaningId;
|
||||
this.txtSystemName.Text = record.SystemName;
|
||||
this.txtSystemCode.Text = record.SystemCode;
|
||||
}
|
||||
|
||||
//管线下拉选择
|
||||
var isoLists = (from x in Funs.DB.JGZL_BlowingCleaningItem
|
||||
where x.BlowingCleaningId == this.BlowingCleaningId
|
||||
select x.ISO_Id).Distinct().ToList();
|
||||
this.drpIsoNoS.Items.Clear();
|
||||
this.drpIsoNoS.DataTextField = "ISO_Id";
|
||||
this.drpIsoNoS.DataValueField = "ISO_Id";
|
||||
this.drpIsoNoS.DataSource = isoLists;
|
||||
this.drpIsoNoS.DataTextField = "ISO_IsoNo";
|
||||
this.drpIsoNoS.DataValueField = "ISO_IsoNo";
|
||||
this.drpIsoNoS.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
this.drpIsoNoS.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
this.drpIsoNoS.SelectedIndex = 0;
|
||||
|
||||
//var record = BLL.BlowingCleaningService.GetBlowingCleaningByProjectId(this.tvControlItem.SelectedNodeID);
|
||||
//if (record != null)
|
||||
//{
|
||||
// this.BlowingCleaningId = record.BlowingCleaningId;
|
||||
// this.txtSystemName.Text = record.SystemName;
|
||||
// this.txtSystemCode.Text = record.SystemCode;
|
||||
//}
|
||||
|
||||
////管线下拉选择
|
||||
//var isoLists = (from x in Funs.DB.JGZL_BlowingCleaningItem
|
||||
// where x.BlowingCleaningId == this.BlowingCleaningId
|
||||
// select x.ISO_Id).Distinct().ToList();
|
||||
//this.drpIsoNoS.Items.Clear();
|
||||
//this.drpIsoNoS.DataTextField = "ISO_Id";
|
||||
//this.drpIsoNoS.DataValueField = "ISO_Id";
|
||||
//this.drpIsoNoS.DataSource = isoLists;
|
||||
//this.drpIsoNoS.DataBind();
|
||||
//Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
//this.drpIsoNoS.SelectedIndex = 0;
|
||||
|
||||
DataIsoInfo();
|
||||
}
|
||||
@@ -117,7 +123,8 @@ namespace FineUIPro.Web.JGZL
|
||||
private void DataIsoInfo()
|
||||
{
|
||||
this.txtSystemCode.Text = "01";
|
||||
this.txtSystemName.Text = "材质";
|
||||
string serName = string.Empty;
|
||||
this.txtSystemName.Text = string.Empty;
|
||||
this.drpCheckResult1.SelectedValue = "合格";
|
||||
this.drpCheckResult2.SelectedValue = "合格";
|
||||
this.drpCheckResult3.SelectedValue = "合格";
|
||||
@@ -125,51 +132,133 @@ namespace FineUIPro.Web.JGZL
|
||||
itemLists.Clear();
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
var record = BLL.BlowingCleaningService.GetBlowingCleaningByProjectId(this.ProjectId);
|
||||
if (record != null)
|
||||
if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue))
|
||||
{
|
||||
this.BlowingCleaningId = record.BlowingCleaningId;
|
||||
this.txtSystemCode.Text = record.SystemCode;
|
||||
this.txtSystemName.Text = record.SystemName;
|
||||
this.drpCheckResult1.SelectedValue = record.CheckReulst1;
|
||||
this.drpCheckResult2.SelectedValue = record.CheckReulst2;
|
||||
this.drpCheckResult3.SelectedValue = record.CheckReulst3;
|
||||
this.drpCheckResult4.SelectedValue = record.CheckReulst4;
|
||||
itemLists = BLL.BlowingCleaningItemService.GetBlowingCleaningItemList(this.BlowingCleaningId);
|
||||
}
|
||||
else
|
||||
{
|
||||
//var pro = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
//if (pro != null)
|
||||
//{
|
||||
// this.txtProjectCode.Text = pro.ProjectCode;
|
||||
// this.txtProjectName.Text = pro.ProjectName;
|
||||
//}
|
||||
}
|
||||
var isoInfos = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
foreach (var item in isoInfos)
|
||||
{
|
||||
var teamWeldingInspectionItem = BLL.BlowingCleaningItemService.GetItemByIsoNo(this.ProjectId, item.ISO_IsoNo);
|
||||
if (teamWeldingInspectionItem != null)
|
||||
List<string> serList = new List<string>();
|
||||
foreach (var isoNo in this.drpIsoNoS.SelectedValueArray)
|
||||
{
|
||||
//itemLists.Add(teamWeldingInspectionItem);
|
||||
var iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoNo(isoNo, ProjectId);
|
||||
if (iso != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(iso.SER_ID))
|
||||
{
|
||||
serList.Add(BLL.HJGL_MediumService.GetServiceBySERID(iso.SER_ID).SER_Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (serList.Count > 0)
|
||||
{
|
||||
Model.JGZL_BlowingCleaningItem newItem = new JGZL_BlowingCleaningItem();
|
||||
newItem.BlowingCleaningItemId = SQLHelper.GetNewID(typeof(Model.JGZL_BlowingCleaningItem));
|
||||
newItem.ISO_Id = item.ISO_IsoNo;
|
||||
newItem.STE_ID = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code;
|
||||
newItem.OperatingMedium = HJGL_MediumService.GetServiceBySERID(item.SER_ID).SER_Name;
|
||||
newItem.ScrubbingMedium = "压缩空气";
|
||||
newItem.CleaningMedium = "洁净水";
|
||||
itemLists.Add(newItem);
|
||||
foreach (var item in serList.Distinct())
|
||||
{
|
||||
serName += item + "、";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(serName))
|
||||
{
|
||||
serName = serName.Substring(0, serName.LastIndexOf('、'));
|
||||
}
|
||||
}
|
||||
this.txtSystemName.Text = serName;
|
||||
|
||||
|
||||
var isoInfos = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
foreach (var item in isoInfos)
|
||||
{
|
||||
var record = BLL.BlowingCleaningService.GetBlowingCleaningByProjectId(this.ProjectId);
|
||||
if (record != null)
|
||||
{
|
||||
this.BlowingCleaningId = record.BlowingCleaningId;
|
||||
this.txtSystemCode.Text = record.SystemCode;
|
||||
//this.txtSystemName.Text = record.SystemName;
|
||||
this.drpCheckResult1.SelectedValue = record.CheckReulst1;
|
||||
this.drpCheckResult2.SelectedValue = record.CheckReulst2;
|
||||
this.drpCheckResult3.SelectedValue = record.CheckReulst3;
|
||||
this.drpCheckResult4.SelectedValue = record.CheckReulst4;
|
||||
|
||||
if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue))
|
||||
{
|
||||
if (this.drpIsoNoS.SelectedValueArray.Contains(item.ISO_IsoNo))
|
||||
{
|
||||
var recordItem = BLL.BlowingCleaningItemService.GetItemByIsoNo(this.ProjectId, item.ISO_IsoNo);
|
||||
if (recordItem != null)
|
||||
{
|
||||
itemLists.Add(recordItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.JGZL_BlowingCleaningItem newItem = new JGZL_BlowingCleaningItem();
|
||||
newItem.BlowingCleaningItemId = SQLHelper.GetNewID(typeof(Model.JGZL_BlowingCleaningItem));
|
||||
newItem.ISO_Id = item.ISO_IsoNo;
|
||||
newItem.STE_ID = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code;
|
||||
newItem.OperatingMedium = HJGL_MediumService.GetServiceBySERID(item.SER_ID).SER_Name;
|
||||
newItem.ScrubbingMedium = "压缩空气";
|
||||
newItem.CleaningMedium = "洁净水";
|
||||
itemLists.Add(newItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (this.drpIsoNoS.SelectedValueArray.Contains(item.ISO_IsoNo))
|
||||
{
|
||||
Model.JGZL_BlowingCleaningItem newItem = new JGZL_BlowingCleaningItem();
|
||||
newItem.BlowingCleaningItemId = SQLHelper.GetNewID(typeof(Model.JGZL_BlowingCleaningItem));
|
||||
newItem.ISO_Id = item.ISO_IsoNo;
|
||||
newItem.STE_ID = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code;
|
||||
newItem.OperatingMedium = HJGL_MediumService.GetServiceBySERID(item.SER_ID).SER_Name;
|
||||
newItem.ScrubbingMedium = "压缩空气";
|
||||
newItem.CleaningMedium = "洁净水";
|
||||
itemLists.Add(newItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue) && this.drpIsoNoS.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
itemLists = itemLists.Where(e => e.ISO_Id.Contains(this.drpIsoNoS.SelectedValue)).ToList(); ;
|
||||
}
|
||||
//var record = BLL.BlowingCleaningService.GetBlowingCleaningByProjectId(this.ProjectId);
|
||||
//if (record != null)
|
||||
//{
|
||||
// this.BlowingCleaningId = record.BlowingCleaningId;
|
||||
// this.txtSystemCode.Text = record.SystemCode;
|
||||
// this.txtSystemName.Text = record.SystemName;
|
||||
// this.drpCheckResult1.SelectedValue = record.CheckReulst1;
|
||||
// this.drpCheckResult2.SelectedValue = record.CheckReulst2;
|
||||
// this.drpCheckResult3.SelectedValue = record.CheckReulst3;
|
||||
// this.drpCheckResult4.SelectedValue = record.CheckReulst4;
|
||||
// itemLists = BLL.BlowingCleaningItemService.GetBlowingCleaningItemList(this.BlowingCleaningId);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// //var pro = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
// //if (pro != null)
|
||||
// //{
|
||||
// // this.txtProjectCode.Text = pro.ProjectCode;
|
||||
// // this.txtProjectName.Text = pro.ProjectName;
|
||||
// //}
|
||||
//}
|
||||
//var isoInfos = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
//foreach (var item in isoInfos)
|
||||
//{
|
||||
// var teamWeldingInspectionItem = BLL.BlowingCleaningItemService.GetItemByIsoNo(this.ProjectId, item.ISO_IsoNo);
|
||||
// if (teamWeldingInspectionItem != null)
|
||||
// {
|
||||
// //itemLists.Add(teamWeldingInspectionItem);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Model.JGZL_BlowingCleaningItem newItem = new JGZL_BlowingCleaningItem();
|
||||
// newItem.BlowingCleaningItemId = SQLHelper.GetNewID(typeof(Model.JGZL_BlowingCleaningItem));
|
||||
// newItem.ISO_Id = item.ISO_IsoNo;
|
||||
// newItem.STE_ID = BLL.HJGL_MaterialService.GetSteelBySteID(item.STE_ID).STE_Code;
|
||||
// newItem.OperatingMedium = HJGL_MediumService.GetServiceBySERID(item.SER_ID).SER_Name;
|
||||
// newItem.ScrubbingMedium = "压缩空气";
|
||||
// newItem.CleaningMedium = "洁净水";
|
||||
// itemLists.Add(newItem);
|
||||
// }
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue) && this.drpIsoNoS.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// itemLists = itemLists.Where(e => e.ISO_Id.Contains(this.drpIsoNoS.SelectedValue)).ToList(); ;
|
||||
//}
|
||||
}
|
||||
this.Grid1.DataSource = itemLists;
|
||||
this.Grid1.DataBind();
|
||||
@@ -351,8 +440,8 @@ namespace FineUIPro.Web.JGZL
|
||||
|
||||
var newRow = dt.NewRow();
|
||||
newRow["ProjectName"] = BLL.Base_ProjectService.GetProjectByProjectId(report.ProjectId).ProjectName;
|
||||
newRow["SystemName"] = report.SystemName;
|
||||
newRow["SystemCode"] = report.SystemCode;
|
||||
newRow["SystemName"] = this.txtSystemName.Text.Trim();
|
||||
newRow["SystemCode"] = this.txtSystemCode.Text.Trim();
|
||||
newRow["Results"] = report.Results;
|
||||
string blowingCleaningDate = string.Format("{0:yyyy年MM月dd日}", report.BlowingCleaningDate);
|
||||
newRow["BlowingCleaningDate"] = blowingCleaningDate;
|
||||
@@ -363,33 +452,43 @@ namespace FineUIPro.Web.JGZL
|
||||
dt.Rows.Add(newRow);
|
||||
BLL.Common.FastReportService.AddFastreportTable(dt);
|
||||
|
||||
var itemList = BLL.BlowingCleaningItemService.GetBlowingCleaningItemList(report.BlowingCleaningId);
|
||||
if (this.drpIsoNoS.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue))
|
||||
{
|
||||
itemList = itemList.Where(x => x.ISO_Id.Contains(this.drpIsoNoS.SelectedValue)).ToList();
|
||||
}
|
||||
if (itemList.Count > 0)
|
||||
{
|
||||
DataTable itemdt = new DataTable();
|
||||
itemdt.TableName = "Data";
|
||||
itemdt.Columns.Add("ISO_IsoNo");
|
||||
itemdt.Columns.Add("STE_Code");
|
||||
itemdt.Columns.Add("OperatingMedium");
|
||||
itemdt.Columns.Add("ScrubbingMedium");
|
||||
itemdt.Columns.Add("CleaningMedium");
|
||||
//var itemList = BLL.BlowingCleaningItemService.GetBlowingCleaningItemList(report.BlowingCleaningId);
|
||||
//if (this.drpIsoNoS.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue))
|
||||
//{
|
||||
// itemList = itemList.Where(x => x.ISO_Id.Contains(this.drpIsoNoS.SelectedValue)).ToList();
|
||||
//}
|
||||
//if (itemList.Count > 0)
|
||||
//{
|
||||
DataTable itemdt = new DataTable();
|
||||
itemdt.TableName = "Data";
|
||||
itemdt.Columns.Add("ISO_IsoNo");
|
||||
itemdt.Columns.Add("STE_Code");
|
||||
itemdt.Columns.Add("OperatingMedium");
|
||||
itemdt.Columns.Add("ScrubbingMedium");
|
||||
itemdt.Columns.Add("CleaningMedium");
|
||||
|
||||
foreach (var item in itemList)
|
||||
{
|
||||
var newRow2 = itemdt.NewRow();
|
||||
newRow2["ISO_IsoNo"] = item.ISO_Id;
|
||||
newRow2["STE_Code"] = item.STE_ID;
|
||||
newRow2["OperatingMedium"] = item.OperatingMedium;
|
||||
newRow2["ScrubbingMedium"] = item.ScrubbingMedium;
|
||||
newRow2["CleaningMedium"] = item.CleaningMedium;
|
||||
itemdt.Rows.Add(newRow2);
|
||||
}
|
||||
BLL.Common.FastReportService.AddFastreportTable(itemdt);
|
||||
//foreach (var item in itemList)
|
||||
//{
|
||||
// var newRow2 = itemdt.NewRow();
|
||||
// newRow2["ISO_IsoNo"] = item.ISO_Id;
|
||||
// newRow2["STE_Code"] = item.STE_ID;
|
||||
// newRow2["OperatingMedium"] = item.OperatingMedium;
|
||||
// newRow2["ScrubbingMedium"] = item.ScrubbingMedium;
|
||||
// newRow2["CleaningMedium"] = item.CleaningMedium;
|
||||
// itemdt.Rows.Add(newRow2);
|
||||
//}
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
var newRow2 = itemdt.NewRow();
|
||||
newRow2["ISO_IsoNo"] = this.Grid1.Rows[i].Values[0].ToString();
|
||||
newRow2["STE_Code"] = this.Grid1.Rows[i].Values[1].ToString();
|
||||
newRow2["OperatingMedium"] = this.Grid1.Rows[i].Values[2].ToString();
|
||||
newRow2["ScrubbingMedium"] = this.Grid1.Rows[i].Values[3].ToString();
|
||||
newRow2["CleaningMedium"] = this.Grid1.Rows[i].Values[4].ToString();
|
||||
itemdt.Rows.Add(newRow2);
|
||||
}
|
||||
BLL.Common.FastReportService.AddFastreportTable(itemdt);
|
||||
//}
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
//keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
||||
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||
@@ -520,17 +619,17 @@ namespace FineUIPro.Web.JGZL
|
||||
}
|
||||
saveItem();
|
||||
|
||||
//管线下拉选择
|
||||
var isoLists = (from x in Funs.DB.JGZL_BlowingCleaningItem
|
||||
where x.BlowingCleaningId == this.BlowingCleaningId
|
||||
select x.ISO_Id).Distinct().ToList();
|
||||
this.drpIsoNoS.Items.Clear();
|
||||
this.drpIsoNoS.DataTextField = "ISO_Id";
|
||||
this.drpIsoNoS.DataValueField = "ISO_Id";
|
||||
this.drpIsoNoS.DataSource = isoLists;
|
||||
this.drpIsoNoS.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
this.drpIsoNoS.SelectedIndex = 0;
|
||||
////管线下拉选择
|
||||
//var isoLists = (from x in Funs.DB.JGZL_BlowingCleaningItem
|
||||
// where x.BlowingCleaningId == this.BlowingCleaningId
|
||||
// select x.ISO_Id).Distinct().ToList();
|
||||
//this.drpIsoNoS.Items.Clear();
|
||||
//this.drpIsoNoS.DataTextField = "ISO_Id";
|
||||
//this.drpIsoNoS.DataValueField = "ISO_Id";
|
||||
//this.drpIsoNoS.DataSource = isoLists;
|
||||
//this.drpIsoNoS.DataBind();
|
||||
//Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
//this.drpIsoNoS.SelectedIndex = 0;
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
@@ -544,13 +643,21 @@ namespace FineUIPro.Web.JGZL
|
||||
|
||||
void saveItem()
|
||||
{
|
||||
BLL.BlowingCleaningItemService.DeleteBlowingCleaningItemList(this.BlowingCleaningId);
|
||||
//BLL.BlowingCleaningItemService.DeleteBlowingCleaningItemList(this.BlowingCleaningId);
|
||||
itemLists.Clear();
|
||||
JArray teamGroupData = Grid1.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
//删除原有信息
|
||||
var item = BLL.BlowingCleaningItemService.GetItemByIsoNo(this.ProjectId, values.Value<string>("ISO_Id"));
|
||||
if (item != null)
|
||||
{
|
||||
Funs.DB.JGZL_BlowingCleaningItem.DeleteOnSubmit(item);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
Model.JGZL_BlowingCleaningItem newDetail = new Model.JGZL_BlowingCleaningItem
|
||||
{
|
||||
BlowingCleaningItemId = values.Value<string>("BlowingCleaningItemId"),
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpIsoNoS" runat="server" Label="管道编号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoNoS_SelectedIndexChanged" EnableMultiSelect="true" EnableCheckBoxSelect="true" AutoSelectFirstItem="false" Width="500px"></f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Text="保存" ToolTip="保存" Icon="SystemSave" runat="server" OnClick="btnSave_Click"></f:Button>
|
||||
|
||||
@@ -69,9 +69,16 @@ namespace FineUIPro.Web.JGZL
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
this.ProjectId = this.drpProjectId.SelectedValue;
|
||||
}
|
||||
this.InitTreeMenu();//加载树
|
||||
|
||||
this.drpIsoNoS.Items.Clear();
|
||||
this.drpIsoNoS.DataTextField = "ISO_IsoNo";
|
||||
this.drpIsoNoS.DataValueField = "ISO_IsoNo";
|
||||
this.drpIsoNoS.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
this.drpIsoNoS.DataBind();
|
||||
|
||||
var record = BLL.PressureTestOfPipelineSystemConfirmationRecordService.GetPressureTestOfPipelineSystemConfirmationRecordByProjectId(this.drpProjectId.SelectedValue);
|
||||
if (record != null)
|
||||
{
|
||||
@@ -104,7 +111,7 @@ namespace FineUIPro.Web.JGZL
|
||||
private void InitData()
|
||||
{
|
||||
this.txtSystemCode.Text = "01";
|
||||
this.txtSystemName.Text = "材质";
|
||||
this.txtSystemName.Text = string.Empty;
|
||||
this.txtRemark.Text = string.Empty;
|
||||
itemLists.Clear();
|
||||
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||
@@ -401,8 +408,8 @@ namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
||||
keyValuePairs.Add("SystemName", report.FirstOrDefault().SystemName);
|
||||
keyValuePairs.Add("SystemCode", report.FirstOrDefault().SystemCode);
|
||||
keyValuePairs.Add("SystemName", this.txtSystemName.Text.Trim());
|
||||
keyValuePairs.Add("SystemCode", this.txtSystemCode.Text.Trim());
|
||||
keyValuePairs.Add("CheckItem1", report.Where(x => x.CheckItem1 == "01").FirstOrDefault().CheckItem3);
|
||||
keyValuePairs.Add("CheckItem2", report.Where(x => x.CheckItem1 == "02").FirstOrDefault().CheckItem3);
|
||||
keyValuePairs.Add("CheckItem3", report.Where(x => x.CheckItem1 == "03").FirstOrDefault().CheckItem3);
|
||||
@@ -652,5 +659,35 @@ namespace FineUIPro.Web.JGZL
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void drpIsoNoS_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtSystemName.Text.Trim();
|
||||
string serName = string.Empty;
|
||||
List<string> serList = new List<string>();
|
||||
foreach (var isoNo in this.drpIsoNoS.SelectedValueArray)
|
||||
{
|
||||
var iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoNo(isoNo, ProjectId);
|
||||
if (iso != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(iso.SER_ID))
|
||||
{
|
||||
serList.Add(BLL.HJGL_MediumService.GetServiceBySERID(iso.SER_ID).SER_Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (serList.Count > 0)
|
||||
{
|
||||
foreach (var item in serList.Distinct())
|
||||
{
|
||||
serName += item + "、";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(serName))
|
||||
{
|
||||
serName = serName.Substring(0, serName.LastIndexOf('、'));
|
||||
}
|
||||
}
|
||||
this.txtSystemName.Text = serName;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+9
@@ -95,6 +95,15 @@ namespace FineUIPro.Web.JGZL
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsoNoS 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsoNoS;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpIsoNoS" runat="server" Label="管道编号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoNoS_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpIsoNoS" runat="server" Label="管道编号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoNoS_SelectedIndexChanged" EnableMultiSelect="true" EnableCheckBoxSelect="true" AutoSelectFirstItem="false" Width="500px"></f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
|
||||
@@ -120,19 +120,9 @@
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px" Hidden="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<%--<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:DropDownList>
|
||||
</PageItems>--%>
|
||||
<Listeners>
|
||||
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
@@ -155,13 +145,38 @@
|
||||
</f:MenuButton>
|
||||
</f:Menu>--%>
|
||||
</form>
|
||||
<%--<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
<script type="text/javascript">
|
||||
<%--var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}--%>
|
||||
|
||||
function onGridAfterEdit(event, value, params) {
|
||||
var me = this;
|
||||
var columnId = params.columnId;
|
||||
var rowId = params.rowId;
|
||||
|
||||
// 处理 TestTemperature 列
|
||||
if (columnId == 'TestTemperature') {
|
||||
// 先移除已有单位(避免重复拼接),再添加单位
|
||||
var pureValue = (value || '').toString().replace(/℃/g, '');
|
||||
// 仅当值不为空时才添加单位
|
||||
if (pureValue) {
|
||||
me.updateCellValue(rowId, 'TestTemperature', pureValue + '℃');
|
||||
}
|
||||
}
|
||||
//处理 TestMediumTemperature 列
|
||||
if (columnId == 'TestMediumTemperature') {
|
||||
// 先移除已有单位(避免重复拼接),再添加单位
|
||||
var pureValue = (value || '').toString().replace(/℃/g, '');
|
||||
// 仅当值不为空时才添加单位
|
||||
if (pureValue) {
|
||||
me.updateCellValue(rowId, 'TestMediumTemperature', pureValue + '℃');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>--%>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using FineUIPro.Web.HJGL.DataIn;
|
||||
using FastReport;
|
||||
using FastReport.Export.Dbf;
|
||||
using FineUIPro.Web.HJGL.DataIn;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.PeerResolvers;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
@@ -90,25 +92,25 @@ namespace FineUIPro.Web.JGZL
|
||||
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
|
||||
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
var record = BLL.PressureTestOfPipelineSystemRecordService.GetPressureTestOfPipelineSystemRecordByProjectId(this.tvControlItem.SelectedNodeID);
|
||||
if (record != null)
|
||||
{
|
||||
this.RecordId = record.RecordId;
|
||||
this.txtSystemName.Text = record.SystemName;
|
||||
this.txtSystemCode.Text = record.SystemCode;
|
||||
}
|
||||
//var record = BLL.PressureTestOfPipelineSystemRecordService.GetPressureTestOfPipelineSystemRecordByProjectId(this.tvControlItem.SelectedNodeID);
|
||||
//if (record != null)
|
||||
//{
|
||||
// this.RecordId = record.RecordId;
|
||||
// this.txtSystemName.Text = record.SystemName;
|
||||
// this.txtSystemCode.Text = record.SystemCode;
|
||||
//}
|
||||
|
||||
//管线下拉选择
|
||||
var isoLists = (from x in Funs.DB.JGZL_PressureTestOfPipelineSystemRecordItem
|
||||
where x.RecordId == this.RecordId
|
||||
select x.PipelineNo).Distinct().ToList();
|
||||
//var isoLists = (from x in Funs.DB.JGZL_PressureTestOfPipelineSystemRecordItem
|
||||
// where x.RecordId == this.RecordId
|
||||
// select x.PipelineNo).Distinct().ToList();
|
||||
this.drpIsoNoS.Items.Clear();
|
||||
this.drpIsoNoS.DataTextField = "PipelineNo";
|
||||
this.drpIsoNoS.DataValueField = "PipelineNo";
|
||||
this.drpIsoNoS.DataSource = isoLists;
|
||||
this.drpIsoNoS.DataTextField = "ISO_IsoNo";
|
||||
this.drpIsoNoS.DataValueField = "ISO_IsoNo";
|
||||
this.drpIsoNoS.DataSource = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
this.drpIsoNoS.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
this.drpIsoNoS.SelectedIndex = 0;
|
||||
//Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
//this.drpIsoNoS.SelectedIndex = 0;
|
||||
|
||||
DataIsoInfo();
|
||||
}
|
||||
@@ -116,62 +118,117 @@ namespace FineUIPro.Web.JGZL
|
||||
|
||||
private void DataIsoInfo()
|
||||
{
|
||||
this.txtSystemCode.Text = "01";
|
||||
this.txtSystemName.Text = "材质";
|
||||
itemLists.Clear();
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
this.txtSystemName.Text = string.Empty;
|
||||
string serName = string.Empty;
|
||||
this.txtSystemCode.Text = "01";
|
||||
if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue))
|
||||
{
|
||||
var record = BLL.PressureTestOfPipelineSystemRecordService.GetPressureTestOfPipelineSystemRecordByProjectId(this.ProjectId);
|
||||
if (record != null)
|
||||
List<string> serList = new List<string>();
|
||||
foreach (var isoNo in this.drpIsoNoS.SelectedValueArray)
|
||||
{
|
||||
this.RecordId = record.RecordId;
|
||||
this.txtSystemCode.Text = record.SystemCode;
|
||||
this.txtSystemName.Text = record.SystemName;
|
||||
itemLists = BLL.PressureTestOfPipelineSystemRecordItemService.GetItemByRecordId(this.RecordId);
|
||||
}
|
||||
else
|
||||
{
|
||||
//var pro = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId);
|
||||
//if (pro != null)
|
||||
//{
|
||||
// this.txtProjectCode.Text = pro.ProjectCode;
|
||||
// this.txtProjectName.Text = pro.ProjectName;
|
||||
//}
|
||||
}
|
||||
var isoInfos = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
foreach (var item in isoInfos)
|
||||
{
|
||||
var teamWeldingInspectionItem = BLL.PressureTestOfPipelineSystemRecordItemService.GetItemByIsoNo(this.ProjectId,item.ISO_IsoNo);
|
||||
if (teamWeldingInspectionItem != null)
|
||||
var iso = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoNo(isoNo, ProjectId);
|
||||
if (iso != null)
|
||||
{
|
||||
//itemLists.Add(teamWeldingInspectionItem);
|
||||
if (!string.IsNullOrEmpty(iso.SER_ID))
|
||||
{
|
||||
serList.Add(BLL.HJGL_MediumService.GetServiceBySERID(iso.SER_ID).SER_Name);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
if (serList.Count > 0)
|
||||
{
|
||||
foreach (var item in serList.Distinct())
|
||||
{
|
||||
Model.JGZL_PressureTestOfPipelineSystemRecordItem newItem = new JGZL_PressureTestOfPipelineSystemRecordItem();
|
||||
newItem.Id = SQLHelper.GetNewID(typeof(Model.JGZL_PressureTestOfPipelineSystemRecordItem));
|
||||
newItem.PipelineNo = item.ISO_IsoNo;
|
||||
newItem.DesignPressure = item.ISO_DesignPress.HasValue ? item.ISO_DesignPress.Value.ToString("0.##") + "Mpa" : "";
|
||||
newItem.DesignTemperature = item.ISO_DesignTemperature.HasValue ? item.ISO_DesignTemperature.Value.ToString("0.##") + "℃" : "";
|
||||
newItem.TestMedium = "水";
|
||||
newItem.TestPressure = item.ISO_TestPress.HasValue ? item.ISO_TestPress.Value.ToString(("0.##")) + "MPa" : "";
|
||||
newItem.VoltageStabilizationTime = "10min";
|
||||
itemLists.Add(newItem);
|
||||
serName += item + "、";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(serName))
|
||||
{
|
||||
serName = serName.Substring(0, serName.LastIndexOf('、'));
|
||||
}
|
||||
}
|
||||
this.txtSystemName.Text = serName;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
var isoInfos = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByProjectId(this.ProjectId);
|
||||
foreach (var item in isoInfos)
|
||||
{
|
||||
var record = BLL.PressureTestOfPipelineSystemRecordService.GetPressureTestOfPipelineSystemRecordByProjectId(this.ProjectId);
|
||||
if (record != null)
|
||||
{
|
||||
this.RecordId = record.RecordId;
|
||||
if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue))
|
||||
{
|
||||
if (this.drpIsoNoS.SelectedValueArray.Contains(item.ISO_IsoNo))
|
||||
{
|
||||
var recordItems = BLL.PressureTestOfPipelineSystemRecordItemService.GetPressureTestOfPipelineSystemRecordByPipeLine(this.RecordId, item.ISO_IsoNo);
|
||||
if (recordItems.Count > 0)
|
||||
{
|
||||
foreach (var recordItem in recordItems)
|
||||
{
|
||||
itemLists.Add(recordItem);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.JGZL_PressureTestOfPipelineSystemRecordItem newItem = new JGZL_PressureTestOfPipelineSystemRecordItem();
|
||||
newItem.Id = SQLHelper.GetNewID(typeof(Model.JGZL_PressureTestOfPipelineSystemRecordItem));
|
||||
newItem.PipelineNo = item.ISO_IsoNo;
|
||||
newItem.DesignPressure = item.ISO_DesignPress.HasValue ? item.ISO_DesignPress.Value.ToString("0.##") + "Mpa" : "";
|
||||
newItem.DesignTemperature = item.ISO_DesignTemperature.HasValue ? item.ISO_DesignTemperature.Value.ToString("0.##") + "℃" : "";
|
||||
newItem.TestMedium = "水";
|
||||
newItem.TestPressure = (item.ISO_DesignPress.Value * 1.5m).ToString("0.##") + "Mpa";
|
||||
newItem.VoltageStabilizationTime = "10min";
|
||||
itemLists.Add(newItem);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemRecordItem newItem2 = new JGZL_PressureTestOfPipelineSystemRecordItem();
|
||||
newItem2.Id = SQLHelper.GetNewID(typeof(Model.JGZL_PressureTestOfPipelineSystemRecordItem));
|
||||
newItem2.PipelineNo = item.ISO_IsoNo;
|
||||
newItem2.DesignPressure = item.ISO_DesignPress.HasValue ? item.ISO_DesignPress.Value.ToString("0.##") + "Mpa" : "";
|
||||
newItem2.DesignTemperature = item.ISO_DesignTemperature.HasValue ? item.ISO_DesignTemperature.Value.ToString("0.##") + "℃" : "";
|
||||
newItem2.TestMedium = "水";
|
||||
newItem2.TestPressure = item.ISO_TestPress.HasValue ? item.ISO_TestPress.Value.ToString("0.##") + "MPa" : "";
|
||||
newItem2.VoltageStabilizationTime = "30min";
|
||||
itemLists.Add(newItem2);
|
||||
Model.JGZL_PressureTestOfPipelineSystemRecordItem newItem2 = new JGZL_PressureTestOfPipelineSystemRecordItem();
|
||||
newItem2.Id = SQLHelper.GetNewID(typeof(Model.JGZL_PressureTestOfPipelineSystemRecordItem));
|
||||
newItem2.PipelineNo = item.ISO_IsoNo;
|
||||
newItem2.DesignPressure = item.ISO_DesignPress.HasValue ? item.ISO_DesignPress.Value.ToString("0.##") + "Mpa" : "";
|
||||
newItem2.DesignTemperature = item.ISO_DesignTemperature.HasValue ? item.ISO_DesignTemperature.Value.ToString("0.##") + "℃" : "";
|
||||
newItem2.TestMedium = "水";
|
||||
newItem2.TestPressure = newItem2.DesignPressure;
|
||||
newItem2.VoltageStabilizationTime = "30min";
|
||||
itemLists.Add(newItem2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//var teamWeldingInspectionItem = BLL.PressureTestOfPipelineSystemRecordItemService.GetItemByIsoNo(this.ProjectId, item.ISO_IsoNo);
|
||||
//if (teamWeldingInspectionItem != null)
|
||||
//{
|
||||
// //itemLists.Add(teamWeldingInspectionItem);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
if (this.drpIsoNoS.SelectedValueArray.Contains(item.ISO_IsoNo))
|
||||
{
|
||||
Model.JGZL_PressureTestOfPipelineSystemRecordItem newItem = new JGZL_PressureTestOfPipelineSystemRecordItem();
|
||||
newItem.Id = SQLHelper.GetNewID(typeof(Model.JGZL_PressureTestOfPipelineSystemRecordItem));
|
||||
newItem.PipelineNo = item.ISO_IsoNo;
|
||||
newItem.DesignPressure = item.ISO_DesignPress.HasValue ? item.ISO_DesignPress.Value.ToString("0.##") + "Mpa" : "";
|
||||
newItem.DesignTemperature = item.ISO_DesignTemperature.HasValue ? item.ISO_DesignTemperature.Value.ToString("0.##") + "℃" : "";
|
||||
newItem.TestMedium = "水";
|
||||
newItem.TestPressure = (item.ISO_DesignPress.Value * 1.5m).ToString("0.##") + "Mpa";
|
||||
newItem.VoltageStabilizationTime = "10min";
|
||||
itemLists.Add(newItem);
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemRecordItem newItem2 = new JGZL_PressureTestOfPipelineSystemRecordItem();
|
||||
newItem2.Id = SQLHelper.GetNewID(typeof(Model.JGZL_PressureTestOfPipelineSystemRecordItem));
|
||||
newItem2.PipelineNo = item.ISO_IsoNo;
|
||||
newItem2.DesignPressure = item.ISO_DesignPress.HasValue ? item.ISO_DesignPress.Value.ToString("0.##") + "Mpa" : "";
|
||||
newItem2.DesignTemperature = item.ISO_DesignTemperature.HasValue ? item.ISO_DesignTemperature.Value.ToString("0.##") + "℃" : "";
|
||||
newItem2.TestMedium = "水";
|
||||
newItem2.TestPressure = newItem2.DesignPressure;
|
||||
newItem2.VoltageStabilizationTime = "30min";
|
||||
itemLists.Add(newItem2);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue) && this.drpIsoNoS.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
itemLists = itemLists.Where(e => e.PipelineNo.Contains(this.drpIsoNoS.SelectedValue)).ToList(); ;
|
||||
itemLists.OrderBy(e => e.PipelineNo).OrderBy(e => e.VoltageStabilizationTime);
|
||||
}
|
||||
}
|
||||
this.Grid1.DataSource = itemLists;
|
||||
@@ -349,20 +406,20 @@ namespace FineUIPro.Web.JGZL
|
||||
string rootPath = Server.MapPath("~/");
|
||||
BLL.Common.FastReportService.ResetData();
|
||||
|
||||
var report = BLL.PressureTestOfPipelineSystemRecordService.GetPressureTestOfPipelineSystemRecordByProjectId(projectId);
|
||||
if (report != null)
|
||||
{
|
||||
string strSql = @"SELECT * from JGZL_PressureTestOfPipelineSystemRecordItem m left join JGZL_PressureTestOfPipelineSystemRecord d on d.RecordId = m.RecordId where d.ProjectId=@projectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", projectId));
|
||||
if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue) && this.drpIsoNoS.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " and PipelineNo like @isoNo";
|
||||
listStr.Add(new SqlParameter("@isoNo", "%" + this.drpIsoNoS.SelectedValue + "%"));
|
||||
}
|
||||
strSql += " order by PipelineNo,VoltageStabilizationTime asc";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
//var report = BLL.PressureTestOfPipelineSystemRecordService.GetPressureTestOfPipelineSystemRecordByProjectId(projectId);
|
||||
//if (report != null)
|
||||
//{
|
||||
//string strSql = @"SELECT * from JGZL_PressureTestOfPipelineSystemRecordItem m left join JGZL_PressureTestOfPipelineSystemRecord d on d.RecordId = m.RecordId where d.ProjectId=@projectId ";
|
||||
//List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//listStr.Add(new SqlParameter("@projectId", projectId));
|
||||
//if (!string.IsNullOrEmpty(this.drpIsoNoS.SelectedValue) && this.drpIsoNoS.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
// strSql += " and PipelineNo like @isoNo";
|
||||
// listStr.Add(new SqlParameter("@isoNo", "%" + this.drpIsoNoS.SelectedValue + "%"));
|
||||
//}
|
||||
//strSql += " order by PipelineNo,VoltageStabilizationTime asc";
|
||||
//SqlParameter[] parameter = listStr.ToArray();
|
||||
//DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
DataTable dt = new DataTable();
|
||||
dt.TableName = "Data";
|
||||
@@ -375,29 +432,42 @@ namespace FineUIPro.Web.JGZL
|
||||
dt.Columns.Add("TestPressure");
|
||||
dt.Columns.Add("VoltageStabilizationTime");
|
||||
|
||||
DataRow[] rows = tb.DefaultView.ToTable().Select();
|
||||
foreach (var row in rows)
|
||||
{
|
||||
var newRow = dt.NewRow();
|
||||
newRow["PipelineNo"] = row["PipelineNo"].ToString();
|
||||
newRow["DesignPressure"] = row["DesignPressure"].ToString();
|
||||
newRow["DesignTemperature"] = row["DesignTemperature"].ToString();
|
||||
newRow["TestTemperature"] = row["TestTemperature"].ToString();
|
||||
newRow["TestMedium"] = row["TestMedium"].ToString();
|
||||
newRow["TestMediumTemperature"] = row["TestMediumTemperature"].ToString();
|
||||
newRow["TestPressure"] = row["TestPressure"].ToString();
|
||||
newRow["VoltageStabilizationTime"] = row["VoltageStabilizationTime"].ToString();
|
||||
dt.Rows.Add(newRow);
|
||||
}
|
||||
//DataRow[] rows = tb.DefaultView.ToTable().Select();
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
var newRow = dt.NewRow();
|
||||
newRow["PipelineNo"] = this.Grid1.Rows[i].Values[1].ToString();
|
||||
newRow["DesignPressure"] = this.Grid1.Rows[i].Values[2].ToString();
|
||||
newRow["DesignTemperature"] = this.Grid1.Rows[i].Values[3].ToString();
|
||||
newRow["TestTemperature"] = this.Grid1.Rows[i].Values[4].ToString();
|
||||
newRow["TestMedium"] = this.Grid1.Rows[i].Values[5].ToString();
|
||||
newRow["TestMediumTemperature"] = this.Grid1.Rows[i].Values[6].ToString();
|
||||
newRow["TestPressure"] = this.Grid1.Rows[i].Values[7].ToString();
|
||||
newRow["VoltageStabilizationTime"] = this.Grid1.Rows[i].Values[8].ToString();
|
||||
dt.Rows.Add(newRow);
|
||||
}
|
||||
//foreach (var row in rows)
|
||||
//{
|
||||
//var newRow = dt.NewRow();
|
||||
//newRow["PipelineNo"] = row["PipelineNo"].ToString();
|
||||
//newRow["DesignPressure"] = row["DesignPressure"].ToString();
|
||||
//newRow["DesignTemperature"] = row["DesignTemperature"].ToString();
|
||||
//newRow["TestTemperature"] = row["TestTemperature"].ToString();
|
||||
//newRow["TestMedium"] = row["TestMedium"].ToString();
|
||||
//newRow["TestMediumTemperature"] = row["TestMediumTemperature"].ToString();
|
||||
//newRow["TestPressure"] = row["TestPressure"].ToString();
|
||||
//newRow["VoltageStabilizationTime"] = row["VoltageStabilizationTime"].ToString();
|
||||
//dt.Rows.Add(newRow);
|
||||
//}
|
||||
BLL.Common.FastReportService.AddFastreportTable(dt);
|
||||
|
||||
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
||||
keyValuePairs.Add("SystemName", report.SystemName);
|
||||
keyValuePairs.Add("SystemCode", report.SystemCode);
|
||||
keyValuePairs.Add("TestConclusion", report.TestConclusion);
|
||||
keyValuePairs.Add("Remark", report.Remark);
|
||||
keyValuePairs.Add("SystemName", this.txtSystemName.Text.Trim());
|
||||
keyValuePairs.Add("SystemCode", this.txtSystemCode.Text.Trim());
|
||||
//keyValuePairs.Add("TestConclusion", report.TestConclusion);
|
||||
//keyValuePairs.Add("Remark", report.Remark);
|
||||
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||
|
||||
initTemplatePath = "File\\Fastreport\\JGZL\\管道系统压力试验记录.frx";
|
||||
@@ -405,12 +475,12 @@ namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowPrint.GetShowReference(String.Format("../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请先保存数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请先保存数据!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -653,16 +723,16 @@ namespace FineUIPro.Web.JGZL
|
||||
saveItem();
|
||||
|
||||
//管线下拉选择
|
||||
var isoLists = (from x in Funs.DB.JGZL_PressureTestOfPipelineSystemRecordItem
|
||||
where x.RecordId == this.RecordId
|
||||
select x.PipelineNo).Distinct().ToList();
|
||||
this.drpIsoNoS.Items.Clear();
|
||||
this.drpIsoNoS.DataTextField = "PipelineNo";
|
||||
this.drpIsoNoS.DataValueField = "PipelineNo";
|
||||
this.drpIsoNoS.DataSource = isoLists;
|
||||
this.drpIsoNoS.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
this.drpIsoNoS.SelectedIndex = 0;
|
||||
//var isoLists = (from x in Funs.DB.JGZL_PressureTestOfPipelineSystemRecordItem
|
||||
// where x.RecordId == this.RecordId
|
||||
// select x.PipelineNo).Distinct().ToList();
|
||||
//this.drpIsoNoS.Items.Clear();
|
||||
//this.drpIsoNoS.DataTextField = "PipelineNo";
|
||||
//this.drpIsoNoS.DataValueField = "PipelineNo";
|
||||
//this.drpIsoNoS.DataSource = isoLists;
|
||||
//this.drpIsoNoS.DataBind();
|
||||
//Funs.FineUIPleaseSelect(this.drpIsoNoS);
|
||||
//this.drpIsoNoS.SelectedIndex = 0;
|
||||
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
@@ -676,13 +746,22 @@ namespace FineUIPro.Web.JGZL
|
||||
|
||||
void saveItem()
|
||||
{
|
||||
BLL.PressureTestOfPipelineSystemRecordItemService.DeleteItemByRecordId(this.RecordId);
|
||||
//BLL.PressureTestOfPipelineSystemRecordItemService.DeleteItemByRecordId(this.RecordId);
|
||||
itemLists.Clear();
|
||||
JArray teamGroupData = Grid1.GetMergedData();
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
int rowIndex = teamGroupRow.Value<int>("index");
|
||||
|
||||
//删除原有信息
|
||||
var item = BLL.PressureTestOfPipelineSystemRecordItemService.GetPressureTestOfPipelineSystemRecordByPipeLine(this.RecordId, values.Value<string>("PipelineNo"));
|
||||
if (item.Count > 0)
|
||||
{
|
||||
Funs.DB.JGZL_PressureTestOfPipelineSystemRecordItem.DeleteAllOnSubmit(item);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
Model.JGZL_PressureTestOfPipelineSystemRecordItem newDetail = new Model.JGZL_PressureTestOfPipelineSystemRecordItem
|
||||
{
|
||||
Id = values.Value<string>("Id"),
|
||||
@@ -717,5 +796,6 @@ namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
DataIsoInfo();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user