protected void ucIDetail_ChildListInstanceRowDeleting(object sender, InstanceRowDeletingEventArgs e) { using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey)) { switch ((InstanceTypes)Enum.Parse(typeof(InstanceTypes), e.InstanceType)) { case InstanceTypes.OrderItem: OrderFacade facade = new OrderFacade(uow); IFacadeUpdateResult <OrderData> result = facade.DeleteOrderItem(CurrentInstance.Id, e.Instance.Id); e.IsSuccessful = result.IsSuccessful; if (result.IsSuccessful) { // Refresh whole list OrderDto savedParentInstance = result.ToDto(new OrderConverter()); CurrentInstance.OrderItems = savedParentInstance.OrderItems; } else { // Deal with Update result ProcUpdateResult(result.ValidationResult, result.Exception); } break; } } }