// See if the business object contains the table this control is bound to if (DataTableName != "" && ds.Tables.Contains(DataTableName)) { // Tell the control to bind control.OnBindData(BizObj, new mmBusinessStateChangeEventArgs( mmBusinessState.Bind, DataTableName, BizObj.GetPrimaryKeyValue(), BizObj.GetPrimaryKeyValues()), bindBack); }to
// see if we bind back bool bindBack = false; if (control.IsPostBack && control.BindOnPostBack) { bindBack = true; } // See if the business object contains the table this control is bound to if (DataTableName != "" && ds.Tables.Contains(DataTableName)) { // Tell the control to bind control.OnBindData(BizObj, new mmBusinessStateChangeEventArgs( mmBusinessState.Bind, DataTableName, BizObj.GetPrimaryKeyValue(), BizObj.GetPrimaryKeyValues()), bindBack); }I think that it's a little more human readable than just
// Tell the control to bind control.OnBindData(BizObj, new mmBusinessStateChangeEventArgs( mmBusinessState.Bind, DataTableName, BizObj.GetPrimaryKeyValue(), BizObj.GetPrimaryKeyValues()), control.IsPostBack && control.BindOnPostBack);Please let me know if you see any problems with this. Thanks!