void OrderService_GetEntityCompleted(object sender, ActionCompletedEventArgs <OrderEntity> e) { OrderEntity oe = e.Result; if (oe == null) { CommonFunction.ShowErrorMessage("未找到相应记录!"); } if (this.OperationType == OperationTypes.ReSubmit) { this.orderEntity.IsReSubmit = true; this.OperationType = OperationTypes.Edit; } oe.IsReSubmit = this.orderEntity.IsReSubmit; this.OrderEntity = oe; OnLoadDataCompleted(); InitControl(); }
void OrderSource_SaveCompleted(object sender, ActionCompletedEventArgs <OrderEntity> e) { if (e.Result != null) { this.OrderEntity = e.Result; if (this.orderEntity.FBEntityState == FBEntityState.Unchanged && this.OperationType == OperationTypes.Add) { this.OperationType = OperationTypes.Edit; } this.InitData(); } if (this.OrderEntity.FBEntityState != FBEntityState.ReSubmit) { OnSavedCompleted(Actions.Save); } else { this.OrderEntity.FBEntityState = FBEntityState.Added; } }