DataChanged执行了两次

public class QTCKD : AbstractBillPlugIn
{
/// <summary>
/// 界面数据发生变化之后,需要处理的功能
/// </summary>
/// <param name="e"></param>
public override void DataChanged(DataChangedEventArgs e)
{
base.DataChanged(e);
DynamicObject FStockOrgId = this.Model.GetValue("FStockOrgId") as DynamicObject;//获取收料组织
stringFCUSTID = null;
if (FStockOrgId != null)
{
string strFStockOrgId = Convert.ToString(FStockOrgId["Id"]);//获取到的是内码

StringBuilder Sql = new StringBuilder(string.Format(@"select FCUSTID from T_BD_CUSTOMER where FCORRESPONDORGID={0} and FUSEORGID = {0}", strFStockOrgId));
DataSet obj = DBServiceHelper.ExecuteDataSet(this.Context, Sql.ToString());
FCUSTID = obj.Tables[0].Rows[0]["FCUSTID"].ToString();//客户
}
this.Model.BeginIniti();
this.Model.SetValue("FBIJCustomerID", FCUSTID, 0);
this.Model.EndIniti();
//this.View.Model.SetValue("FBIJCustomerID", FCUSTID,0);
// this.View.UpdateView("FBIJCustomerID");
}
}

问题:加了红色的部分,这段代码执行完DataChanged还是会重新执行一次,这个怎么让它不出现第二次执行?

 

问题名称:DataChanged执行了两次

点击链接查看答案:

https://club.kingdee.com/forum.php?mod=viewthread&tid=1181790

未经允许不得转载:友商问答 » DataChanged执行了两次

赞 (0)