128 lines
5.4 KiB
C#
128 lines
5.4 KiB
C#
|
|
using BLL;
|
||
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Linq;
|
||
|
|
using Newtonsoft.Json.Linq;
|
||
|
|
|
||
|
|
namespace FineUIPro.Web.JGZL
|
||
|
|
{
|
||
|
|
public partial class PressureTestOfPipelineSystemConfirmationRecordEdit : PageBase
|
||
|
|
{
|
||
|
|
#region 定义项
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 主键
|
||
|
|
/// </summary>
|
||
|
|
private string RecordId
|
||
|
|
{
|
||
|
|
get { return (string)ViewState["RecordId"]; }
|
||
|
|
set { ViewState["RecordId"] = value; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 项目Id
|
||
|
|
/// </summary>
|
||
|
|
private 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)
|
||
|
|
{
|
||
|
|
this.ProjectId = Request.Params["projectId"];
|
||
|
|
this.RecordId = Request.Params["recordId"];
|
||
|
|
if (!string.IsNullOrEmpty(this.RecordId))
|
||
|
|
{
|
||
|
|
var report = BLL.PressureTestOfPipelineSystemConfirmationRecordService.GetPressureTestOfPipelineSystemConfirmationRecordById(this.RecordId);
|
||
|
|
if (report != null)
|
||
|
|
{
|
||
|
|
this.txtSystemCode.Text = report.SystemCode;
|
||
|
|
this.txtSystemName.Text = report.SystemName;
|
||
|
|
this.txtCheckItem1.Text = report.CheckItem1;
|
||
|
|
this.txtCheckItem2.Text = report.CheckItem2;
|
||
|
|
this.txtCheckItem3.Text = report.CheckItem3;
|
||
|
|
this.txtCheckItem4.Text = report.CheckItem4;
|
||
|
|
this.txtCheckItem5.Text = report.CheckItem5;
|
||
|
|
this.txtCheckItem6.Text = report.CheckItem6;
|
||
|
|
this.txtCheckItem7.Text = report.CheckItem7;
|
||
|
|
this.txtCheckItem8.Text = report.CheckItem8;
|
||
|
|
this.txtCheckItem9.Text = report.CheckItem9;
|
||
|
|
this.txtCheckItem10.Text = report.CheckItem10;
|
||
|
|
this.txtCheckItem11.Text = report.CheckItem11;
|
||
|
|
this.txtCheckItem12.Text = report.CheckItem12;
|
||
|
|
this.txtRemark.Text = report.Remark;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
#region 提交按钮
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 提交按钮
|
||
|
|
/// </summary>
|
||
|
|
/// <param name="sender"></param>
|
||
|
|
/// <param name="e"></param>
|
||
|
|
protected void btnSave_Click(object sender, EventArgs e)
|
||
|
|
{
|
||
|
|
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_PressureTestOfPipelineSystemConfirmationRecordMenuId, Const.BtnSave))
|
||
|
|
{
|
||
|
|
Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord newReport = new Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord();
|
||
|
|
newReport.SystemCode = this.txtSystemCode.Text.Trim();
|
||
|
|
newReport.SystemName = this.txtSystemName.Text.Trim();
|
||
|
|
newReport.CheckItem1 = this.txtCheckItem1.Text.Trim();
|
||
|
|
newReport.CheckItem2 = this.txtCheckItem2.Text.Trim();
|
||
|
|
newReport.CheckItem3 = this.txtCheckItem3.Text.Trim();
|
||
|
|
newReport.CheckItem4 = this.txtCheckItem4.Text.Trim();
|
||
|
|
newReport.CheckItem5 = this.txtCheckItem5.Text.Trim();
|
||
|
|
newReport.CheckItem6 = this.txtCheckItem6.Text.Trim();
|
||
|
|
newReport.CheckItem7 = this.txtCheckItem7.Text.Trim();
|
||
|
|
newReport.CheckItem8 = this.txtCheckItem8.Text.Trim();
|
||
|
|
newReport.CheckItem9 = this.txtCheckItem9.Text.Trim();
|
||
|
|
newReport.CheckItem10 = this.txtCheckItem10.Text.Trim();
|
||
|
|
newReport.CheckItem11 = this.txtCheckItem11.Text.Trim();
|
||
|
|
newReport.CheckItem12 = this.txtCheckItem12.Text.Trim();
|
||
|
|
newReport.Remark = this.txtRemark.Text;
|
||
|
|
if (!string.IsNullOrEmpty(this.RecordId))
|
||
|
|
{
|
||
|
|
newReport.RecordId = this.RecordId;
|
||
|
|
BLL.PressureTestOfPipelineSystemConfirmationRecordService.UpdatePressureTestOfPipelineSystemConfirmationRecord(newReport);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
newReport.ProjectId = this.ProjectId;
|
||
|
|
newReport.CompileMan = this.CurrUser.UserId;
|
||
|
|
newReport.CompileDate = DateTime.Now;
|
||
|
|
newReport.RecordId = SQLHelper.GetNewID(typeof(Model.JGZL_PressureTestOfPipelineSystemConfirmationRecord));
|
||
|
|
this.RecordId = newReport.RecordId;
|
||
|
|
BLL.PressureTestOfPipelineSystemConfirmationRecordService.AddPressureTestOfPipelineSystemConfirmationRecord(newReport);
|
||
|
|
}
|
||
|
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
#endregion
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|