我在 OnInSelectedRow 获取到我选择的列表数据,我想在不符合条件时候,终止这个单据转换,请问应该怎么做?在那个事件里处理?
public override void OnInSelectedRow(InSelectedRowEventArgs e)
{
base.OnInSelectedRow(e);
//ListSelectedRowCollection selectedRows = e.SelectedRows as ListSelectedRowCollection;
List
if (selectedRows.Count>0)
{
for (int i = 0; i < selectedRows.Count; i++)
{
string strBillNo= selectedRows[i].BillNo;
string sql = string.Format(@"select FTxtSQDJBH ,b.FDOCUMENTSTATUS from qxy_t_GongYingShangZB2 a left join DY_T_PUR_MATREQ b on a.FTxtSQDJBH=b.fbillno
where a.fbillno ='{0}' ", strBillNo);
DynamicObjectCollection dobj = Kingdee.BOS.ServiceHelper.DBServiceHelper.ExecuteDynamicObject(this.Context, sql);
if(dobj.Count>0)
{
for (int j = 0; j < dobj.Count; j++)
{
string FDOCUMENTSTATUS = dobj[j]["FDOCUMENTSTATUS"].ToString();
}
}
}
}
}
推荐阅读