private void btn_guardar_Click(object sender, EventArgs e) { try { //formato para los datatimepicker dtpFechaI.Format = DateTimePickerFormat.Custom; dtpFechaI.CustomFormat = "yyyy-MM-dd"; dtpFechaT.Format = DateTimePickerFormat.Custom; dtpFechaT.CustomFormat = "yyyy-MM-dd"; CapaDatos db = new CapaDatos(); string id_cotizacionO = txt_codigoTemporal.Text; string nombreT = txtCliente.Text; string TelefonoT = txtTelefono.Text; string fechaInn = dtpFechaI.Text; string fechaTerr = dtpFechaT.Text; db.ActualziarCotizacionEncabezado(nombreT, TelefonoT, dtpFechaI.Text.Trim(), dtpFechaT.Text.Trim(), id_cotizacionO); MessageBox.Show("correcto"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btn_guardar_Click(object sender, EventArgs e) { try { //formato para los datatimepicker dtpFechaI.Format = DateTimePickerFormat.Custom; dtpFechaI.CustomFormat = "yyyy-MM-dd"; dtpFechaT.Format = DateTimePickerFormat.Custom; dtpFechaT.CustomFormat = "yyyy-MM-dd"; CapaDatos db = new CapaDatos(); string id_cotizacionO = txt_codigoTemporal.Text; db.ActualziarCotizacionEncabezado(dtpFechaI.Text.Trim(), dtpFechaT.Text.Trim(), txt_codigoTemporal.Text, id_cotizacionO); MessageBox.Show(" Se Modifico Registro Exitosamente"); ModificacionControl.Enabled = false; } catch (Exception ex) { MessageBox.Show(ex.Message); } }