58 lines
2.0 KiB
C#
58 lines
2.0 KiB
C#
using System;
|
|
using SuperMap.RealEstate.ServiceModel;
|
|
using SuperMap.RealEstate.Utility;
|
|
using SuperMap.RealEstate.Web.UI;
|
|
using HWBS = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.CloudModule.HotKeySet
|
|
{
|
|
public partial class HOTKEYSETPage : Storage.UI.BasePage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
//载入数据
|
|
HOTKEYSET1.LoadData();
|
|
//设置按钮状态
|
|
SetControlClientAction(ButtonSave);
|
|
//注册遮罩式窗口关闭脚本
|
|
SetControlClosePopDialog(ButtonClose);
|
|
}
|
|
|
|
protected void ButtonSave_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
//刷新类型
|
|
bool _RefreshType = HOTKEYSET1.Save(GoodsProvinceCode);
|
|
//获取商品信息
|
|
HWBS.COMMODITY _COMMODITY = new HWBS.COMMODITY(Transaction);
|
|
_COMMODITY.COMMODITY_ID_Encrypt = HOTKEYSET1.COMMODITY_ID.Text.ToEncrypt();
|
|
if (_COMMODITY.Select(GoodsProvinceCode))
|
|
{
|
|
//下发商品、同步商品版本号、同步商品数据至合作商户平台
|
|
Storage.Business.COMMODITY.SynchroData(Transaction, _COMMODITY, WholeServerpartID);
|
|
}
|
|
//刷新弹出页列表
|
|
RefreshOpenerGridPage(_RefreshType ? RefreshGridPageType.Update : RefreshGridPageType.Insert);
|
|
//提示信息
|
|
Alert("保存成功!", 3);
|
|
ClosePopDialog();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
//回滚事务
|
|
Transaction.Rollback();
|
|
//记录日志
|
|
ErrorLogHelper.Write(ex);
|
|
#if DEBUG
|
|
Alert("保存失败!可能的原因:\n" + ex.Message);
|
|
#else
|
|
Alert("保存失败!");
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
}
|