交工资料:
15、阀门试验确认表 16、阀门检验试验记录
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
public partial class ValveTestConfirmationFormEdit : 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.ValveTestConfirmationFormService.GetValveTestConfirmationFormById(this.RecordId);
|
||||
if (report != null)
|
||||
{
|
||||
this.txtCode.Text = report.Code;
|
||||
this.txtName.Text = report.Name;
|
||||
this.txtModelNumber.Text = report.ModelNumber;
|
||||
this.txtSpecifications.Text = report.Specifications;
|
||||
this.txtNominalPressure.Text = report.NominalPressure;
|
||||
this.txtNum.Text = report.Num.ToString();
|
||||
this.txtPressureTest.Text = report.PressureTest;
|
||||
this.txtSealTest.Text = report.SealTest;
|
||||
this.txtUpperSealTest.Text = report.UpperSealTest;
|
||||
this.txtTestResults.Text = report.TestResults;
|
||||
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_ValveTestConfirmationFormMenuId, Const.BtnSave))
|
||||
{
|
||||
Model.JGZL_ValveTestConfirmationForm newReport = new Model.JGZL_ValveTestConfirmationForm();
|
||||
newReport.Code = this.txtCode.Text.Trim();
|
||||
newReport.Name = this.txtName.Text.Trim();
|
||||
newReport.ModelNumber = this.txtModelNumber.Text.Trim();
|
||||
newReport.Specifications = this.txtSpecifications.Text.Trim();
|
||||
newReport.NominalPressure = this.txtNominalPressure.Text.Trim();
|
||||
newReport.Num = Funs.GetNewIntOrZero(this.txtNum.Text.Trim());
|
||||
newReport.PressureTest = this.txtPressureTest.Text.Trim();
|
||||
newReport.SealTest = this.txtSealTest.Text.Trim();
|
||||
newReport.UpperSealTest = this.txtUpperSealTest.Text.Trim();
|
||||
newReport.TestResults = this.txtTestResults.Text.Trim();
|
||||
newReport.Remark = this.txtRemark.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.RecordId))
|
||||
{
|
||||
newReport.RecordId = this.RecordId;
|
||||
BLL.ValveTestConfirmationFormService.UpdateValveTestConfirmationForm(newReport);
|
||||
}
|
||||
else
|
||||
{
|
||||
newReport.ProjectId = this.ProjectId;
|
||||
newReport.CompileMan = this.CurrUser.UserId;
|
||||
newReport.CompileDate = DateTime.Now;
|
||||
newReport.Reviewer = this.CurrUser.UserId;
|
||||
newReport.RevieweDate = DateTime.Now;
|
||||
newReport.RecordId = SQLHelper.GetNewID(typeof(Model.JGZL_ValveTestConfirmationForm));
|
||||
this.RecordId = newReport.RecordId;
|
||||
BLL.ValveTestConfirmationFormService.AddValveTestConfirmationForm(newReport);
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user