87 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			87 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			C#
		
	
	
	
| using BLL;
 | |
| using Model;
 | |
| using System;
 | |
| using System.Linq;
 | |
| 
 | |
| namespace FineUIPro.Web.ProjectData
 | |
| {
 | |
|     public partial class ProjectSetMap : PageBase
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// 定义项
 | |
|         /// </summary>
 | |
|         public string ProjectId
 | |
|         {
 | |
|             get
 | |
|             {
 | |
|                 return (string)ViewState["ProjectId"];
 | |
|             }
 | |
|             set
 | |
|             {
 | |
|                 ViewState["ProjectId"] = value;
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 加载页面
 | |
|         /// </summary>
 | |
|         /// <param name="sender"></param>
 | |
|         /// <param name="e"></param>
 | |
|         protected void Page_Load(object sender, EventArgs e)
 | |
|         {
 | |
|             if (!IsPostBack)
 | |
|             {                    
 | |
|                 this.ProjectId = Request.QueryString["ProjectId"];
 | |
|                 if (!String.IsNullOrEmpty(this.ProjectId))
 | |
|                 {
 | |
|                     var getPoints = ProjectSetMapService.GetProjectGpsPointByProjectId(this.ProjectId);
 | |
|                     foreach (var item in getPoints)
 | |
|                     {
 | |
|                         this.txtProjectPointResult.Text += item + "|";
 | |
|                     }
 | |
|                     if (!string.IsNullOrEmpty(this.txtProjectPointResult.Text))
 | |
|                     {
 | |
|                         PageContext.RegisterStartupScript("AddPolygon();");
 | |
|                     }
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 保存数据
 | |
|         /// </summary>
 | |
|         /// <param name="sender"></param>
 | |
|         /// <param name="e"></param>
 | |
|         protected void btnSave_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             ProjectSetMapService.SaveProjectGpsPoint(this.ProjectId, this.txtProjectPointResult.Text.Trim());
 | |
|             ShowNotify("保存成功!", MessageBoxIcon.Success);
 | |
|             PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 确定按钮
 | |
|         /// </summary>
 | |
|         /// <param name="sender"></param>
 | |
|         /// <param name="e"></param>
 | |
|         protected void btnSure_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             if (!string.IsNullOrEmpty(this.txtProjectPoint.Text))
 | |
|             {
 | |
|                 this.txtProjectPointResult.Text += (this.txtProjectPoint.Text + "|");
 | |
|             }
 | |
|             this.txtProjectPoint.Text = string.Empty;
 | |
|             PageContext.RegisterStartupScript("removeOverlay();");
 | |
|         }
 | |
| 
 | |
|         /// <summary>
 | |
|         /// 完成按钮
 | |
|         /// </summary>
 | |
|         /// <param name="sender"></param>
 | |
|         /// <param name="e"></param>
 | |
|         protected void btnComplete_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             PageContext.RegisterStartupScript("AddPolygon();");
 | |
|         }
 | |
|     }
 | |
| } |