Exemplo n.º 1
0
 private void actualizarRegistroPais()
 {
     if (string.IsNullOrWhiteSpace(txtnombre.Text) /* txtnombre.Text.Trim() == "" || txtnombre.Text.Trim() == null*/)
     {
         MessageBox.Show("El dato del Nombre del Pais esta vacio o solo contiene espacios, favor de colocar un nombre Valido");
         txtnombre.Focus();
     }
     else if (cbxestado.SelectedValue == null)
     {
         MessageBox.Show("El ESTADO DEL PAIS que requiere actualizar esta vacio, favor de seleccionar un estado para modificar");
     }
     else
     {
         REC01_PAIS obj = new REC01_PAIS();
         obj.PAIS            = dtglistado.CurrentRow.Cells[0].Value.ToString();
         obj.DESCRIPCION     = txtnombre.Text.ToString();
         obj.ESTADO_REGISTRO = cbxestado.SelectedValue.ToString();
         Pais           reg  = new Pais();
         Mensaje <Pais> resp = reg.ActualizarRegistroPais(obj);
         MessageBox.Show(resp.mensaje);
     }
 }