xinjiang/SGGL/FineUIPro.Web/ProjectData/ProjectGpsAreEdit.aspx.cs

85 lines
2.0 KiB
C#
Raw Normal View History

2024-11-19 09:45:27 +08:00
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)
{
}
}
}