2025-03-27 15:05:14 +08:00

69 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SuperMap.RealEstate.CoreFrameWork;
using SuperMap.RealEstate.ServiceModel;
using SuperMap.RealEstate.Utility;
using SuperMap.RealEstate.Web.UI;
using SuperMap.RealEstate.Web.UI.WebControls;
using SuperMap.RealEstate.Web.Utility;
using System.Data;
namespace SuperMap.RealEstate.ExchangeData.Modules.MachineInfo
{
public partial class FIELDENUMOperation : SuperMap.RealEstate.Web.UI.PageValid
{
#region ->
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
//载入数据
ButtonDelete.Enabled = FIELDENUMOperation1.LoadData();
//设置按钮状态
SetControlClientAction(ButtonDelete, false, true, true);
SetControlClientAction(ButtonSave);
//注册遮罩式窗口关闭脚本
SetControlClosePopDialog(ButtonClose);
}
#endregion
#region ->
protected void ButtonSave_Click(object sender, EventArgs e)
{
try
{
//刷新类型
bool _RefreshType = ButtonDelete.Enabled;
//保存数据
ButtonDelete.Enabled = FIELDENUMOperation1.Save();
////刷新弹出页列表
//RefreshOpenerGridPage(_RefreshType ? RefreshGridPageType.Update : RefreshGridPageType.Insert);
//提示信息
Alert("保存成功!", 3);
string pid = Request["PID"].ToDecrypt();
ExecClientScript("$('#pop-dialog-frame-GridViewEx1Page',parent.parent.document).attr('src', " +
"'/ExchangeData/Modules/MachineInfo/FIELDENUMPage.aspx?ID=" + pid.ToEncrypt() +
"&titletext=0&FIELDENUM_NAME=" + Request["FIELDENUM_NAME"] + "&FIELDENUM_PID=" + Request["FIELDENUM_PID"] +
"&PopDialogPageName=F_R_GridPageEx1&PopDialogName=GridViewEx1Page&r=0.7778587905853764')");
//ClosePopDialog();
}
catch (Exception ex)
{
//回滚事务
Transaction.Rollback();
//记录日志
ErrorLogHelper.Write(ex);
#if DEBUG
Alert("保存失败!可能的原因:\n" + ex.Message);
#else
Alert("保存失败!");
#endif
}
}
#endregion
}
}