SHARE
TWEET

Untitled

a guest Jul 15th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DateTime datetime1 = Convert.ToDateTime(NIVigencia.Text);
  2.         DateTime datetime2 = Convert.ToDateTime(NFVigencia.Text);
  3.         DateTime datetime3 = Convert.ToDateTime(fechahoy.Text);
  4.  
  5.         String ActualizarDS1 = "Update DATOSSEGURO SET Poliza = '" + NuevaPoliza.Text + "', Aseguradora = '" + Naseguradora.Text + "', FechaColozacion = '" + datetime3 + "', InitVigencia = '" + datetime1+ "', FinVigencia = '" + datetime2+ "' WHERE Poliza = " + TBPoliza.Text;
  6.         SqlCommand actualizar = new SqlCommand();
  7.         actualizar.Connection = MenuInicio.conexion;
  8.         actualizar.CommandType = CommandType.Text;
  9.         actualizar.CommandText = ActualizarDS1;
  10.         try
  11.         {
  12.             actualizar.ExecuteNonQuery();
  13.             actualizar.Dispose();
  14.             actualizar = null;
  15.             MessageBox.Show("Nueva Poliza agregada con exito", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
  16.         }
  17.         catch (SqlException ex)
  18.         {
  19.             MessageBox.Show("ERROR al actualizar datosseguro :" + ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
  20.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top