77 lines
2.6 KiB
C#
77 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using BLL;
|
|
|
|
namespace FineUIPro.Web.HJGL.WeldingManage
|
|
{
|
|
public partial class CompleteReportDateEdit : PageBase
|
|
{
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
private string BatchId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["BatchId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["BatchId"] = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.BatchId = Request.Params["batchId"];
|
|
if (!string.IsNullOrEmpty(this.BatchId))
|
|
{
|
|
var batch = BLL.HJGL_BO_BatchService.GetBatchById(this.BatchId);
|
|
if (batch != null && batch.ReportFeedback != null)
|
|
{
|
|
this.txtReportFeedback.Text = batch.ReportFeedback.Value.ToString();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <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.HJGL_TestingReportPromptMenuId, Const.BtnEditCompleteReport))
|
|
{
|
|
if (!string.IsNullOrEmpty(this.BatchId))
|
|
{
|
|
var batch = BLL.HJGL_BO_BatchService.GetBatchById(this.BatchId);
|
|
if (batch != null)
|
|
{
|
|
batch.ReportFeedback = Convert.ToDateTime(this.txtReportFeedback.Text);
|
|
BLL.HJGL_BO_BatchService.UpdateBatchReportFeedback(batch);
|
|
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
|
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "录入完成报告反馈时间");
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
|
}
|
|
}
|
|
}
|
|
} |