public void AddSubPedidoEntry() { var subPedioEntry = new SubPedidoEntryModel { Abono = Abono, SubPedidoId = SubPedido.SubPedidoId, }; subPedioEntry = FacadeProvider.SubPedidoEntryProvider().Add(subPedioEntry); SubPedido.Add(subPedioEntry); Abono = 0; }
public void RemoveSubPedidoEntry(SubPedidoEntryModel subPedidoEntry) { if (Authenticator.Instance.IsAdming) { var dlg = new ModernDialog { Title = "Aviso", Content = "Este elemento se eliminara permanente, desea continuar ?" }; dlg.Buttons = new Button[] { dlg.OkButton, dlg.CancelButton }; dlg.ShowDialog(); if (dlg.MessageBoxResult == MessageBoxResult.OK) { SubPedido.Remove(subPedidoEntry); FacadeProvider.SubPedidoEntryProvider().Remove(subPedidoEntry); } } else { ModernDialog.ShowMessage("No tiene permiso para realizar esta operación", "ERROR EN LA OPERACIÓN", MessageBoxButton.OK); } }