78 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			2.7 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.TestPackageManage
 | |
| {
 | |
|     public partial class CompleteDateEdit : 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.AskCompleteDate != null)
 | |
|                     {
 | |
|                         this.txtAskCompleteDate.Text = batch.AskCompleteDate.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_TestPackageManageEditMenuId, Const.BtnEditAskCompleteDate))
 | |
|             {
 | |
|                 if (!string.IsNullOrEmpty(this.BatchId))
 | |
|                 {
 | |
|                     var batch = BLL.HJGL_BO_BatchService.GetBatchById(this.BatchId);
 | |
|                     if (batch != null)
 | |
|                     {
 | |
|                         batch.AskCompleteDate =Convert.ToDateTime(this.txtAskCompleteDate.Text);
 | |
|                         batch.SubmitAskDate =  DateTime.Now.Date;
 | |
|                         BLL.HJGL_BO_BatchService.UpdateBatch(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);
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| } |