private void BTN_Anular_Click(object sender, RoutedEventArgs e) { if (TXT_ID.Text == "") { Point relativePoint = IMG_Info.PointToScreen(new Point(0d, 0d)); TXT_ID.Focus(); System.Windows.Forms.Cursor.Position = new System.Drawing.Point(Convert.ToInt32(relativePoint.X), Convert.ToInt32(relativePoint.Y)); } else { try { if (TXT_Puesto.Text == "") { BTN_Buscar_Click(null, e); } else { if (TXT_Puesto.Text == "Anulado") { TXT_Puesto.Focus(); TXT_Puesto.Select(0, 7); } else { string RPT = N_Empleado.Anular(Convert.ToInt32(TXT_ID.Text), "Anulado"); if (RPT.Equals("OK")) { System.Windows.MessageBox.Show("Se anulo el empleado", "Hotel Royal S.V", MessageBoxButton.OK, MessageBoxImage.Information); } else { System.Windows.MessageBox.Show(RPT, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } Limpiar(); ActualizarTabla = true; } } } catch (Exception err) { System.Windows.MessageBox.Show(err.Message); } } }