65 lines
2.4 KiB
C#
65 lines
2.4 KiB
C#
using System;
|
||
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.SellData.Business;
|
||
|
||
namespace SuperMap.RealEstate.HighWay.Modules.EndAccountRollback
|
||
{
|
||
/// <summary>
|
||
/// T_ENDACCOUNT_结账表 的WebUserControl
|
||
/// <summary>
|
||
public partial class ENDACCOUNT : UserControl<Business.ENDACCOUNT>
|
||
{
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
if (IsPostBack) return;
|
||
CORRECT_AMOUNT.Text = (new Business.SELLDATA(this.Transaction)).ExecuteDataTable(
|
||
"SELECT NVL(SUM(FACTAMOUNT),0) FROM HIGHWAY_SELLDATA.T_SELLDATA WHERE COMMODITY_NAME = '补充销售流水' AND TICKETCODE = '" +
|
||
Request["ID"] + "'").Rows[0][0].ToString();
|
||
}
|
||
|
||
//在此加入界面的数据初始化(Page_Load之前),如DropDownList的数据源绑定等
|
||
public override void InitializeWebControl()
|
||
{
|
||
//处理标记
|
||
TREATMENT_MARK.Clear();
|
||
DictionaryHelper.BindingDropDownList("TREATMENT_MARK", TREATMENT_MARK.Items, this.Transaction);
|
||
|
||
}
|
||
|
||
//载入数据
|
||
public override bool LoadData()
|
||
{
|
||
//如果是工作流组件请自行修改载入的逻辑,以下是功能模块的默认代码
|
||
if (!String.IsNullOrEmpty(Request["ID"]))
|
||
{
|
||
CurrObject.ENDACCOUNT_ID_Encrypt = Request["ID"];
|
||
return this.Select();
|
||
}
|
||
//默认返回值,工作流组件返回True,功能模块返回False。
|
||
return (WorkFlowPage != null);
|
||
}
|
||
|
||
//OnDataAction_XXXXX 有一个系列可用,在此加入界面的逻辑处理
|
||
//e.CancelDataAction 来处理是否取消该动作;
|
||
//失败的原因可以用Page.Alert()传递到页面
|
||
public override void OnDataAction_BeforeSave(DataActionEventArgs<Business.ENDACCOUNT> e)
|
||
{
|
||
base.OnDataAction_BeforeSave(e);
|
||
if (TREATMENT_MARK.SelectedValue != "1")
|
||
{
|
||
throw new Exception("此模块只支持回退至待处理状态!");
|
||
}
|
||
}
|
||
|
||
}
|
||
}
|