private void btnSalir_Click(object sender, RoutedEventArgs e) { if (CustomMessageBox.ShowOption("Salir", "¿Desea salir del sistema de subasta?", "Si", "No", "") == true) { this.Close(); } }
/// <summary> /// Elimina un registro. /// </summary> private void btnDelete_Click(object sender, RoutedEventArgs e) { if (CustomMessageBox.ShowOption("Eliminar", "¿Desea eliminar el registro?", "Si", "No", "", Window.GetWindow(this)) == true) { Remove(); } }
private void btnCancelMov_Click(object sender, RoutedEventArgs e) { try { if (CustomMessageBox.ShowOption("Cancelar Movimiento", "¿Desea cancelar el movimiento?", "Si", "No", "") == true) { CancelMovementDTO lObjCancelMovementDTO = (CancelMovementDTO)dgBatch.CurrentItem; string lStrCancel = string.Empty; if (lObjCancelMovementDTO.DocumentType == Core.Auctions.Enums.Inventory.DocumentTypeEnum.GOODS_ISSUE) { lStrCancel = CancelGoodsIssue(lObjCancelMovementDTO); } else if (lObjCancelMovementDTO.DocumentType == Core.Auctions.Enums.Inventory.DocumentTypeEnum.GOODS_RETURN) { lStrCancel = CancelGoodReturn(lObjCancelMovementDTO); } if (!string.IsNullOrEmpty(lStrCancel)) { CustomMessageBox.Show("No fue posible cancelar", lStrCancel, this.GetParent()); } else { CustomMessageBox.Show("", "Cancelación realizada con exito", this.GetParent()); } LoadDatagrid(); } } catch (Exception ex) { CustomMessageBox.Show("Error", ex.Message, this.GetParent()); } }
/// <summary> /// Elimina un registro. /// </summary> private void btnDelete_Click(object sender, RoutedEventArgs e) { if (CustomMessageBox.ShowOption("Eliminar", "¿Desea eliminar el registro?", "Si", "No", "", Window.GetWindow(this)) == true) { mObjServiceFactory.GetItemDefinitionService().Remove(mLonId); ResetForm(); } }
private void btnDelete_Click(object sender, RoutedEventArgs e) { try { if (CustomMessageBox.ShowOption("Eliminar", "¿Desea eliminar el registro?", "Si", "No", "", Window.GetWindow(this)) == true) { mObjAuctionsServicesFactory.GetTradeService().Remove(mLonId); ClearControls(); } } catch (Exception lObjException) { CustomMessageBox.Show("Error", lObjException.Message, this.GetParent()); } }
/// <summary> /// Elimina un registro. /// </summary> private void btnDelete_Click(object pObjSender, RoutedEventArgs pObjArgs) { try { if (CustomMessageBox.ShowOption("Eliminar", "¿Desea eliminar el registro?", "Si", "No", "", Window.GetWindow(this)) == true) { mObjInventoryServicesFactory.GetGoodsReceiptService().Remove(mLonId); ResetForm(); } } catch (Exception lObjException) { CustomMessageBox.Show("Error", lObjException.Message, this.GetParent()); } }
private void btnDelete_Click(object pObjSender, RoutedEventArgs e) { if (CustomMessageBox.ShowOption("Eliminar", "¿Desea eliminar el registro?", "Si", "No", "", this.GetParent()) == true) { try { mObjInventoryFactory.GetItemTypeDefinitionService().Remove(mLonDefinitionId); ResetForm(); LoadDataGrid(); } catch (Exception lObjException) { CustomMessageBox.Show("Error", lObjException.Message, this.GetParent()); } } }
private void btnDelete_Click(object pObjSender, RoutedEventArgs pObjArgs) { try { if (CustomMessageBox.ShowOption("Eliminar", "¿Desea eliminar el registro?", "Si", "No", "", Window.GetWindow(this)) == true) { this.mObjBusinessFactory.GetPartnerClassificationService().Remove(mLonId); this.SearchPagedList(txtSearch.Text); this.ClearControls(); } } catch (Exception lObjException) { CustomMessageBox.Show("Error", lObjException.Message, this.GetParent()); } }
private void btnCancel_Click(object sender, RoutedEventArgs e) { try { List <CancelMovementDTO> lLstCancelMovementDTO = new List <CancelMovementDTO>(); for (int i = 0; i < dgBatch.Items.Count; i++) { CancelMovementDTO lObjCancelMovementDTO = (CancelMovementDTO)dgBatch.Items[i]; lLstCancelMovementDTO.Add(lObjCancelMovementDTO); } lLstCancelMovementDTO = lLstCancelMovementDTO.Where(x => x.Canceled == false).ToList(); int lIntQtyMovement = lLstCancelMovementDTO.Count(); if (lIntQtyMovement > 0) { if (CustomMessageBox.ShowOption("Cancelar Movimientos", "Se cancelaran " + lIntQtyMovement + " movimientos ¿Desea continuar?", "Si", "No", "", this.GetParent()) == true) { IList <string> lLstErrors = new List <string>(); foreach (CancelMovementDTO lObjCancelMovement in lLstCancelMovementDTO) { if (lObjCancelMovement.DocumentType == Core.Auctions.Enums.Inventory.DocumentTypeEnum.GOODS_ISSUE) { string lStrCancel = CancelGoodsIssue(lObjCancelMovement); if (!string.IsNullOrEmpty(lStrCancel)) { lLstErrors.Add(lStrCancel); } } else if (lObjCancelMovement.DocumentType == Core.Auctions.Enums.Inventory.DocumentTypeEnum.GOODS_RETURN) { string lStrCancel = CancelGoodReturn(lObjCancelMovement); if (!string.IsNullOrEmpty(lStrCancel)) { lLstErrors.Add(lStrCancel); } } } if (lLstErrors.Count > 0) { string lStrMessage = string.Format("Error al cancelar {0}:\n", string.Join("\n", lLstErrors.Select(x => string.Format("-{0}", x)).ToArray())); CustomMessageBox.Show(lStrMessage); } else { CustomMessageBox.Show("", "Cancelación realizada con exito", this.GetParent()); } LoadDatagrid(); } } else { CustomMessageBox.Show("", "No existen movimientos a cancelar", this.GetParent()); } } catch (Exception ex) { CustomMessageBox.Show("Error", ex.Message, this.GetParent()); //row; } }