57 lines
2.1 KiB
C#
57 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
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 Business = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Modules.EndAccountRollback
|
|
{
|
|
public partial class SubmitDate : BasePage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
//设置按钮状态
|
|
SetControlClientAction(ButtonSave);
|
|
//注册遮罩式窗口关闭脚本
|
|
SetControlClosePopDialog(ButtonClose);
|
|
StatisticsDate.Text = DateTime.Now.ToShortDateString();
|
|
}
|
|
|
|
protected void ButtonSave_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
Business.CommonHelper.ExcuteSql("UPDATE HIGHWAY_SELLDATA.T_ENDACCOUNT SET STATISTICS_DATE = TO_DATE('" +
|
|
StatisticsDate.Text + "','YYYY-MM-DD') WHERE ENDACCOUNT_ID IN (" + Request["ID"].ToDecrypt() + ")");
|
|
Business.CommonHelper.ExcuteSql("UPDATE HIGHWAY_SELLDATA.T_ENDACCOUNT_TEMP SET STATISTICS_DATE = TO_DATE('" +
|
|
StatisticsDate.Text + "','YYYY-MM-DD') WHERE ENDACCOUNT_ID IN (" + Request["ID"].ToDecrypt() + ")");
|
|
//刷新弹出页列表
|
|
RefreshOpenerGridPage(RefreshGridPageType.Update);
|
|
//提示信息
|
|
Alert("更新成功!", 3);
|
|
ClosePopDialog();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
//回滚事务
|
|
Transaction.Rollback();
|
|
//记录日志
|
|
ErrorLogHelper.Write(ex);
|
|
#if DEBUG
|
|
Alert("保存失败!可能的原因:\n" + ex.Message);
|
|
#else
|
|
Alert("保存失败!");
|
|
#endif
|
|
}
|
|
}
|
|
}
|
|
} |