91 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			91 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			C#
		
	
	
	
| using BLL;
 | |
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using System.Web;
 | |
| using System.Web.UI;
 | |
| using System.Web.UI.WebControls;
 | |
| 
 | |
| namespace FineUIPro.Web.JDGL.Check
 | |
| {
 | |
|     public partial class PipelineCompletionEdit : PageBase
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// id
 | |
|         /// </summary>
 | |
|         public string PipelineCompletionId
 | |
|         {
 | |
|             get
 | |
|             {
 | |
|                 return (string)ViewState["PipelineCompletionId"];
 | |
|             }
 | |
|             set
 | |
|             {
 | |
|                 ViewState["PipelineCompletionId"] = value;
 | |
|             }
 | |
|         }
 | |
|         /// <summary>
 | |
|         /// 项目id
 | |
|         /// </summary>
 | |
|         public string ProjectId
 | |
|         {
 | |
|             get
 | |
|             {
 | |
|                 return (string)ViewState["ProjectId"];
 | |
|             }
 | |
|             set
 | |
|             {
 | |
|                 ViewState["ProjectId"] = value;
 | |
|             }
 | |
|         }
 | |
|         protected void Page_Load(object sender, EventArgs e)
 | |
|         {
 | |
|             if (!IsPostBack)
 | |
|             {
 | |
| 
 | |
|                 this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
 | |
|                 PipelineCompletionId = Request.Params["PipelineCompletionId"];
 | |
|                 if (!string.IsNullOrEmpty(PipelineCompletionId))
 | |
|                 {
 | |
| 
 | |
|                     Model.JDGL_PipelineCompletion PipelineCompletion = BLL.PipelineCompletionService.GetPipelineCompletionById(PipelineCompletionId);
 | |
|                     if (PipelineCompletion != null)
 | |
|                     {
 | |
|                         this.ProjectId = PipelineCompletion.ProjectId;
 | |
|                         if (PipelineCompletion.ThisNum != null)
 | |
|                         {
 | |
|                             this.txtThisNum.Text = PipelineCompletion.ThisNum.ToString();
 | |
|                         }
 | |
|                     }
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         protected void btnSave_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             SaveData(true);
 | |
|         }
 | |
| 
 | |
|         private void SaveData(bool bl)
 | |
|         {
 | |
|             string PipelineCompletionId = Request.Params["PipelineCompletionId"];
 | |
|             Model.JDGL_PipelineCompletion PipelineCompletion = new Model.JDGL_PipelineCompletion();
 | |
|             if (!string.IsNullOrEmpty(this.txtThisNum.Text.Trim()))
 | |
|             {
 | |
|                 PipelineCompletion.ThisNum = Convert.ToDecimal(this.txtThisNum.Text.Trim());
 | |
|             }
 | |
|             if (!string.IsNullOrEmpty(PipelineCompletionId))
 | |
|             {
 | |
|                 PipelineCompletion.PipelineCompletionId = PipelineCompletionId;
 | |
|                 BLL.PipelineCompletionService.UpdatePipelineCompletion(PipelineCompletion);
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 PipelineCompletion.PipelineCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_PipelineCompletion));
 | |
|                 BLL.PipelineCompletionService.AddPipelineCompletion(PipelineCompletion);
 | |
|             }
 | |
|             ShowNotify("保存成功!", MessageBoxIcon.Success);
 | |
|             PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
 | |
|         }
 | |
|     }
 | |
| } |