protected void btnGuardar_Click(object sender, EventArgs e) { Prestamo pre = new Prestamo(); Nota no = new Nota(); try { CapturarDatos(pre); if (pre.Insertar()) { CapturaNota(no, pre.PrestamoId, pre.ClienteId); Session["PrestamoId"] = pre.PrestamoId; if (no.Insertar()) { Utilitario.ShowToastr(this, "PRESTAMO REGISTRADO & NOTA AGREGADA.!", "Mensaje", "success"); } Utilitario.ShowToastr(this, "PRESTAMO REGISTRADO.!", "Mensaje", "success"); divNota.Visible = false; divPreta.Visible = false; divFecha.Visible = false; divMonto.Visible = false; divCliente.Visible = false; btnGuardar.Visible = false; divImprimir.Visible = true; } } catch (Exception ex) { throw ex; } }
protected void btnGuardarNonta_Click(object sender, EventArgs e) { Nota no = new Nota(); CapturaNota(no, Convert.ToInt32(lblId.Text), Convert.ToInt32(LblClienteId.Text)); if (no.Insertar()) { Utilitario.ShowToastr(this, "NOTA AGREGADA.!", "Mensaje", "success"); } }