写了一个测试方法,分别放在AfterBindData方法和获取子表单返回的委托里,结果关闭子表单后,父表单的单据体没有刷新,而AfterBindData事件正常。[code] public class MobileEFSTFHeadBillPlugIn : AbstractMobilePlugin
{
public override void OnInitialize(InitializeEventArgs e)
{
base.OnInitialize(e);
}
public override void AfterBindData(EventArgs e)
{
base.AfterBindData(e);
testBindListView();
}
public override void ButtonClick(ButtonClickEventArgs e)
{
if (e.Key.ToUpper() == ("F_ZHY_AddPaths").ToUpper())
{
MobileShowParameter parameter = new MobileShowParameter();
parameter.FormId = "ZHY_MOBILE_CCSQD_E";
parameter.ParentPageId = this.View.PageId;
Action
this.View.ShowForm(parameter, frt);
}
}
///
/// 获取子窗体的返回值
///
///
void getReturnData(FormResult frt)
{
testBindListView();
}
private void testBindListView()
{
this.View.Model.DeleteEntryData("FMobileListViewEntity");
this.Model.BeginIniti();
//创建数据行并赋值
int currentrowindex = this.Model.GetEntryRowCount("FMobileListViewEntity");
this.View.Model.CreateNewEntryRow("FMobileListViewEntity");
this.Model.SetValue("F_ZHY_StartDate", DateTime.Now, currentrowindex);
this.Model.SetValue("F_ZHY_EndDate", DateTime.Now.AddHours(5), currentrowindex);
this.Model.SetValue("F_ZHY_FromPlace", "A", currentrowindex);
this.Model.SetValue("F_ZHY_ToPlace", "B", currentrowindex);
this.Model.EndIniti();
IEntryState state = this.View.GetEntryState("FMobileListViewEntity");
state.CurrentPageIndex = 0;
this.View.UpdateView("FMobileListViewEntity");
this.View.GetControl
}
}[/code]
推荐阅读