| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  | using System; | 
					
						
							|  |  |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  |  | using System.Linq; | 
					
						
							|  |  |  |  | using System.Web; | 
					
						
							|  |  |  |  | using System.Web.UI; | 
					
						
							|  |  |  |  | using System.Web.UI.WebControls; | 
					
						
							|  |  |  |  | using BLL; | 
					
						
							|  |  |  |  | using Model; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace FineUIPro.Web.ProjectData | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     public partial class ProjectSetView : PageBase | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 定义项 | 
					
						
							|  |  |  |  |         /// </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();    | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 this.ProjectId = Request.QueryString["ProjectId"]; | 
					
						
							|  |  |  |  |                 if (string.IsNullOrEmpty(this.ProjectId)) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     this.ProjectId = this.CurrUser.LoginProjectId; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 if (!String.IsNullOrEmpty(this.ProjectId)) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId); | 
					
						
							|  |  |  |  |                     if (project != null) | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         this.txtProjectCode.Text = project.ProjectCode; | 
					
						
							| 
									
										
										
										
											2021-07-08 20:34:29 +08:00
										 |  |  |  |                         this.txtJTProjectCode.Text = project.JTProjectCode; | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                         this.txtProjectName.Text = project.ProjectName; | 
					
						
							|  |  |  |  |                         this.txtProjectAddress.Text = project.ProjectAddress; | 
					
						
							|  |  |  |  |                         this.txtRemark.Text = project.Remark; | 
					
						
							|  |  |  |  |                         if (project.StartDate.HasValue) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", project.StartDate); | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  |                         if (project.EndDate.HasValue) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", project.EndDate); | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                         this.txtShortName.Text = project.ShortName; | 
					
						
							|  |  |  |  |                         var projectType = ProjectTypeService.GetProjectTypeById(project.ProjectType); | 
					
						
							|  |  |  |  |                         if (projectType != null) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtProjectType.Text = projectType.ProjectTypeName; | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  |                         this.txtProjectManager.Text = ProjectService.GetProjectManagerName(this.ProjectId); | 
					
						
							|  |  |  |  |                         this.txtConstructionManager.Text = ProjectService.GetConstructionManagerName(this.ProjectId); | 
					
						
							|  |  |  |  |                         this.txtHSSEManager.Text = ProjectService.GetHSSEManagerName(this.ProjectId); | 
					
						
							|  |  |  |  |                         this.txtQAManager.Text = ProjectService.GetQAManagerName(this.ProjectId); | 
					
						
							|  |  |  |  |                         this.txtDriveManager.Text = ProjectService.GetDriveManagerName(this.ProjectId); | 
					
						
							|  |  |  |  |                         if (project.ProjectState == Const.ProjectState_2) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtProjectState.Text = "停工"; | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  |                         else if (project.ProjectState == BLL.Const.ProjectState_3) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtProjectState.Text = "竣工"; | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  |                         else | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtProjectState.Text = "在建"; | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                         this.txtProjectState2.Text = ConstValue.getConstTextsConstValues(project.ProjectState2, ConstValue.GroupId_ProjectState); | 
					
						
							|  |  |  |  |                         Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(project.UnitId); | 
					
						
							|  |  |  |  |                         if (unit != null) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtUnitName.Text = unit.UnitName; | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  |                         if (project.IsForeign == true) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.ckbIsForeign.Checked = true; | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  |                         this.txtWorkRange.Text = project.WorkRange; | 
					
						
							|  |  |  |  |                         this.txtMapCoordinates.Text = project.MapCoordinates; | 
					
						
							|  |  |  |  |                         this.txtDuration.Text = project.Duration.ToString(); | 
					
						
							|  |  |  |  |                         this.txtProjectMoney.Text = project.ProjectMoney.ToString(); | 
					
						
							|  |  |  |  |                         this.txtConstructionMoney.Text = project.ConstructionMoney.ToString(); | 
					
						
							|  |  |  |  |                         this.txtTelephone.Text = project.Telephone; | 
					
						
							|  |  |  |  |                         this.txtCountry.Text = project.Country; | 
					
						
							|  |  |  |  |                         this.txtProvince.Text = project.Province; | 
					
						
							|  |  |  |  |                         this.txtCity.Text = project.City; | 
					
						
							|  |  |  |  |                         this.txtEnglishRemark.Text = project.EnglishRemark; | 
					
						
							| 
									
										
										
										
											2021-11-02 13:32:31 +08:00
										 |  |  |  |                         this.txtHJProjectCode.Text = project.HJProjectCode; | 
					
						
							|  |  |  |  |                         this.txtKZProjectCode.Text = project.KZProjectCode; | 
					
						
							| 
									
										
										
										
											2023-10-07 16:58:43 +08:00
										 |  |  |  |                         this.txtProjType.Text = project.ProjType; | 
					
						
							|  |  |  |  |                         this.txtProjPhase.Text = project.ProjPhase; | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                         if (project.Progress != null) | 
					
						
							|  |  |  |  |                         { | 
					
						
							|  |  |  |  |                             this.txtProgress.Text = project.Progress.ToString(); | 
					
						
							|  |  |  |  |                         } | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |