Files
HJGL_DS/HJGL_DS/FineUIPro.Web/JGZL/ProcessHandoverRecordEdit.aspx.cs
T
xiaju e78630ea13 交工资料
39、管件宏观检查验收记录表
40、工序交接记录
41、管道预制施工检查记录
2026-01-26 19:34:13 +08:00

116 lines
4.3 KiB
C#

using BLL;
using System;
namespace FineUIPro.Web.JGZL
{
public partial class ProcessHandoverRecordEdit : 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.ProcessHandoverRecordService.GetProcessHandoverRecordById(this.RecordId);
if (report != null)
{
this.txtExecutionStandard.Text = report.ExecutionStandard;
this.txtOrganizationalUnit.Text = report.OrganizationalUnit;
this.txtHandoverUnit.Text = report.HandoverUnit;
this.txtReceivingUnit.Text = report.ReceivingUnit;
this.txtInspectionResults.Text = report.InspectionResults;
this.txtReceivingUnitOpinions.Text = report.ReceivingUnitOpinions;
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_ProcessHandoverRecordMenuId, Const.BtnSave))
{
Model.JGZL_ProcessHandoverRecord newReport = new Model.JGZL_ProcessHandoverRecord();
newReport.ExecutionStandard = this.txtExecutionStandard.Text.Trim();
newReport.OrganizationalUnit = this.txtOrganizationalUnit.Text.Trim();
newReport.HandoverUnit = this.txtHandoverUnit.Text.Trim();
newReport.ReceivingUnit = this.txtReceivingUnit.Text.Trim();
newReport.InspectionResults = this.txtInspectionResults.Text.Trim();
newReport.ReceivingUnitOpinions = this.txtReceivingUnitOpinions.Text.Trim();
newReport.Remark = this.txtRemark.Text.Trim();
if (!string.IsNullOrEmpty(this.RecordId))
{
newReport.RecordId = this.RecordId;
BLL.ProcessHandoverRecordService.UpdateProcessHandoverRecord(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_ProcessHandoverRecord));
this.RecordId = newReport.RecordId;
BLL.ProcessHandoverRecordService.AddProcessHandoverRecord(newReport);
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}
}