protected void btnContinuar_Click(object sender, EventArgs e) { lblMensaje.Text = string.Empty; DAL_Venta oVenta = new DAL_Venta(); VentaVO venta = new VentaVO(); venta.Barrio = txtBarrio.Text; venta.Ciudad = dllCiudad.SelectedItem.Value; venta.Comentarios = txtComentarios.Text; venta.Direccion = txtDireccion.Text; venta.Email = txtEmail.Text; venta.NombreCliente = txtNombre.Text; venta.Telefono = txtTelefono.Text; if (optConsignacion.Checked == true) { venta.Pago = Convert.ToInt16(UtilidadesPeterPan.eTipoPago.eConsignacion); } /*if (optPagos.Checked == true) * { * venta.Pago = Convert.ToInt16(UtilidadesPeterPan.eTipoPago.ePagos); * } * if (optPay.Checked == true) * { * venta.Pago = Convert.ToInt16(UtilidadesPeterPan.eTipoPago.ePaypal); * }*/ if (optContra.Checked == true) { venta.Pago = Convert.ToInt16(UtilidadesPeterPan.eTipoPago.eContraentrega); } if (optSer.Checked == true) { venta.Envio = Convert.ToInt16(UtilidadesPeterPan.eEnvio.eServientrega); } if (optDom.Checked == true) { venta.Envio = Convert.ToInt16(UtilidadesPeterPan.eEnvio.eDomicilio); } if (optSin.Checked == true) { venta.Envio = Convert.ToInt16(UtilidadesPeterPan.eEnvio.eSinEnvio); } venta.Productos = (List <ProductoVO>)Session[UtilidadesPeterPan.VENTAS]; try { venta.Numero_venta = oVenta.InsertarVenta(venta); Session[UtilidadesPeterPan.SESION_VENTA] = venta; Session.Remove(UtilidadesPeterPan.VENTAS); EnviarCorreo(venta); Response.Redirect("Frm_Confirmacion.aspx", true); } catch (Exception ex) { lblMensaje.Text = ex.Message; } }
protected void btnEnviar_Click(object sender, EventArgs e) { lblMensaje.Text = String.Empty; DAL_Venta oVenta = new DAL_Venta(); Contacto contacto = new Contacto(); contacto.Comentarios = txtComentarios.Text; contacto.Email = txtEmail.Text; contacto.Nombre = txtNombre.Text; contacto.Producto = txtProducto.Text; try { oVenta.InsertarContacto(contacto); lblMensaje.Text = "Se envio su solicitud. Nuestro equipo lo contactara, gracias por la información."; } catch { Response.Redirect("~/About.aspx"); } }