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.Post: PostFacade facade = new PostFacade(uow); IFacadeUpdateResult <PostData> result = facade.DeletePost(e.Instance.Id); e.IsSuccessful = result.IsSuccessful; if (result.IsSuccessful) { // Refresh data in session CurrentInstance.Posts = facade.RetrievePostsByTopic(CurrentInstance.Id, new PostConverter()); } else { // Deal with Update result ProcUpdateResult(result.ValidationResult, result.Exception); } break; } } }