72 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			72 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C#
		
	
	
	
| 
								 | 
							
								using BLL;
							 | 
						|||
| 
								 | 
							
								using System;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								namespace FineUIPro.Web.JDGL.CostAnalysis
							 | 
						|||
| 
								 | 
							
								{
							 | 
						|||
| 
								 | 
							
								    public partial class RectificationMeasureSet : PageBase
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
								        #region 加载
							 | 
						|||
| 
								 | 
							
								        /// <summary>
							 | 
						|||
| 
								 | 
							
								        /// 加载页面
							 | 
						|||
| 
								 | 
							
								        /// </summary>
							 | 
						|||
| 
								 | 
							
								        /// <param name="sender"></param>
							 | 
						|||
| 
								 | 
							
								        /// <param name="e"></param>
							 | 
						|||
| 
								 | 
							
								        protected void Page_Load(object sender, EventArgs e)
							 | 
						|||
| 
								 | 
							
								        {
							 | 
						|||
| 
								 | 
							
								            if (!IsPostBack)
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                if (!string.IsNullOrEmpty(Request.Params["Type"]))
							 | 
						|||
| 
								 | 
							
								                {
							 | 
						|||
| 
								 | 
							
								                    if (Request.Params["Type"] == "1")
							 | 
						|||
| 
								 | 
							
								                    {
							 | 
						|||
| 
								 | 
							
								                        DropDownBox1.Label = "进度纠偏措施";
							 | 
						|||
| 
								 | 
							
								                    }
							 | 
						|||
| 
								 | 
							
								                    else
							 | 
						|||
| 
								 | 
							
								                    {
							 | 
						|||
| 
								 | 
							
								                        DropDownBox1.Label = "费用纠偏措施";
							 | 
						|||
| 
								 | 
							
								                    }
							 | 
						|||
| 
								 | 
							
								                    this.drpRectificationMeasure.DataTextField = "RectificationMeasureName";
							 | 
						|||
| 
								 | 
							
								                    this.drpRectificationMeasure.DataValueField = "RectificationMeasureId";
							 | 
						|||
| 
								 | 
							
								                    this.drpRectificationMeasure.DataSource = BLL.RectificationMeasureService.GetRectificationMeasureDropDownListByType(Request.Params["Type"]);
							 | 
						|||
| 
								 | 
							
								                    drpRectificationMeasure.DataBind();
							 | 
						|||
| 
								 | 
							
								                }
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								        #endregion
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        #region 保存
							 | 
						|||
| 
								 | 
							
								        /// <summary>
							 | 
						|||
| 
								 | 
							
								        /// 保存按钮
							 | 
						|||
| 
								 | 
							
								        /// </summary>
							 | 
						|||
| 
								 | 
							
								        /// <param name="sender"></param>
							 | 
						|||
| 
								 | 
							
								        /// <param name="e"></param>
							 | 
						|||
| 
								 | 
							
								        protected void btnSave_Click(object sender, EventArgs e)
							 | 
						|||
| 
								 | 
							
								        {
							 | 
						|||
| 
								 | 
							
								            Model.WBSRectificationMeasureSet wBSRectificationMeasureSet = new Model.WBSRectificationMeasureSet();
							 | 
						|||
| 
								 | 
							
								            wBSRectificationMeasureSet.WBSRectificationMeasureSetId = SQLHelper.GetNewID(typeof(Model.WBSRectificationMeasureSet));
							 | 
						|||
| 
								 | 
							
								            wBSRectificationMeasureSet.ProjectId = this.CurrUser.LoginProjectId;
							 | 
						|||
| 
								 | 
							
								            wBSRectificationMeasureSet.ToWbs = Request.Params["ToWbs"];
							 | 
						|||
| 
								 | 
							
								            string ids = string.Empty;
							 | 
						|||
| 
								 | 
							
								            foreach (var item in this.drpRectificationMeasure.SelectedValueArray)
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                ids += item + ",";
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								            if (!string.IsNullOrEmpty(ids))
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                ids = ids.Substring(0, ids.LastIndexOf(","));
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								            wBSRectificationMeasureSet.RectificationMeasureIds = ids;
							 | 
						|||
| 
								 | 
							
								            wBSRectificationMeasureSet.RectificationMeasureType = Request.Params["Type"];
							 | 
						|||
| 
								 | 
							
								            if (!string.IsNullOrEmpty(this.nbRemindDay.Text.Trim()))
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                wBSRectificationMeasureSet.RemindDay = Convert.ToInt32(this.nbRemindDay.Text.Trim());
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								            wBSRectificationMeasureSet.CompileMan = this.CurrUser.UserId;
							 | 
						|||
| 
								 | 
							
								            wBSRectificationMeasureSet.CompileDate = DateTime.Now;
							 | 
						|||
| 
								 | 
							
								            BLL.WBSRectificationMeasureSetService.AddWBSRectificationMeasureSet(wBSRectificationMeasureSet);
							 | 
						|||
| 
								 | 
							
								            BLL.LogService.AddSys_Log(this.CurrUser, wBSRectificationMeasureSet.ToWbs, wBSRectificationMeasureSet.WBSRectificationMeasureSetId, BLL.Const.RectificationMeasureMenuId, "添加纠偏措施");
							 | 
						|||
| 
								 | 
							
								            PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								        #endregion
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |