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 { /// /// 主键 /// private string BatchId { get { return (string)ViewState["BatchId"]; } set { ViewState["BatchId"] = value; } } /// /// 加载页面 /// /// /// 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(); } } } } /// /// 提交按钮 /// /// /// 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); } } } }