85 lines
2.0 KiB
C#
85 lines
2.0 KiB
C#
|
using BLL;
|
|||
|
using Model;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Data;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Web;
|
|||
|
using System.Web.UI;
|
|||
|
using System.Web.UI.WebControls;
|
|||
|
|
|||
|
namespace FineUIPro.Web.ProjectData
|
|||
|
{
|
|||
|
public partial class ProjectGpsAreEdit : PageBase
|
|||
|
{
|
|||
|
#region 公共字段
|
|||
|
/// <summary>
|
|||
|
/// 主键
|
|||
|
/// </summary>
|
|||
|
public string GpsAreId
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return (string)ViewState["GpsAreId"];
|
|||
|
}
|
|||
|
set
|
|||
|
{
|
|||
|
ViewState["GpsAreId"] = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (!IsPostBack)
|
|||
|
{
|
|||
|
GpsAreId = Request.Params["GpsAreId"];
|
|||
|
|
|||
|
if (!string.IsNullOrEmpty(GpsAreId))
|
|||
|
{
|
|||
|
var area = ProjectSetMapService.GetProjectGpsAreByGpsAreId(GpsAreId);
|
|||
|
this.txtGpsAreName.Text = area.GpsAreName;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
protected void btnSave_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
//string projectId, string userId, string menuId, string buttonName)
|
|||
|
WxProjectGpsAre area = new WxProjectGpsAre();
|
|||
|
area.ProjectId = this.CurrUser.LoginProjectId;
|
|||
|
area.GpsAreName = this.txtGpsAreName.Text.Trim();
|
|||
|
if (string.IsNullOrEmpty(GpsAreId))
|
|||
|
{
|
|||
|
area.GpsAreId = Guid.NewGuid().ToString();
|
|||
|
ProjectSetMapService.AddProjectGpsAre(area);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
area.GpsAreId = GpsAreId;
|
|||
|
ProjectSetMapService.UpdateProjectGpsAre(area);
|
|||
|
}
|
|||
|
|
|||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|