Example #1
0
 private void BTN_Editar_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
         {
             string RPT = N_Empleado.Editar(Convert.ToInt32(TXT_ID.Text), TXT_Nombre.Text, TXT_Apellido.Text, Convert.ToInt32(TXT_Edad.Text), TXT_Correo.Text, TXT_Telefono.Text,
                                            TXT_Celular.Text, TXT_Dui.Text, TXT_Nit.Text, TXT_Isss.Text, TXT_Usuario.Text, TXT_ContraseƱa.Text, TXT_Puesto.Text,
                                            TXT_Departamento.Text);
             if (RPT.Equals("OK"))
             {
                 System.Windows.MessageBox.Show("Se actualiz el registro.", "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);
         }
     }
 }