public override string registrar(ENCliente c = null, ENMarca m = null) { context.registrarClientes(c.primerNombre, c.segundoNombre, c.primerApellido, c.segundoApellido, c.dui, c.direccion, c.telefono, c.correo, salida); context.SaveChanges(); return(salida.Value.ToString()); }
protected void Button1_Click(object sender, EventArgs e) { ENCliente cli = new ENCliente(); DataSet ds = new DataSet(); ds = cli.ObtenerDatosClienteConDni(Session["Usuario"].ToString()); cli.DNI = ds.Tables["Cliente"].Rows[0][0].ToString(); Session["nombre"] = cli.Nombre = TTextBoxNombre.Text; Session["apellidos"] = cli.Apellidos = TTextBoxApellidos.Text; Session["provincia"] = cli.Provincia = TDropDownListProvincia.Text; Session["ciudad"] = cli.Ciudad = TDropDownListCiudad.Text; Session["direccion"] =cli.Direccion = TTextBoxDireccion.Text; Session["email"] = cli.Email = TTextBoxEmail.Text; cli.Tarifa = ds.Tables["Cliente"].Rows[0][8].ToString(); cli.Sexo = ds.Tables["Cliente"].Rows[0][9].ToString(); cli.PassWeb = TTextBoxPass.Text; TTextBoxPass2.Text = cli.PassWeb; Session["telefono"] = cli.Telefono = Int32.Parse(TTextBoxTelefono.Text); // Response.Redirect("Perfil.aspx"); if (TTextBoxApellidos.Text == "" || TTextBoxNombre.Text == "" || TTextBoxDireccion.Text == "" || TTextBoxEmail.Text == "" || TTextBoxPass.Text == "" || TTextBoxPass2.Text == "" || TTextBoxTelefono.Text == "" || TDropDownListProvincia.Text =="" || TDropDownListCiudad.Text =="") { LabelErrorCampos.Visible = true; } else { LabelErrorCampos.Visible = false; cli.EditarCliente(); Server.Transfer("Perfil.aspx"); } }
public override string actualizar(int?id, ENCliente c = null, ENMarca m = null) { context.modificarClientes(id, c.primerNombre, c.segundoNombre, c.primerApellido, c.segundoApellido, c.dui, c.direccion, c.telefono, c.correo, salida); context.SaveChanges(); return(salida.Value.ToString()); }
void cargarDatos() { c = c2.buscar(id) as ENCliente; txtPrimerNombre.Text = c.primerNombre; txtSegundoNombre.Text = c.segundoNombre; txtPrimerApellido.Text = c.primerApellido; txtSegundoApellido.Text = c.segundoApellido; txtDui.Text = c.dui; txtDireccion.Text = c.direccion; txtTelefono.Text = c.telefono; txtCorreo.Text = c.correo; }
public override object buscar(int?id) { c = context.Cliente.Find(id); ENCliente c2 = new ENCliente(); c2.primerNombre = c.PrimerNombre; c2.segundoNombre = c.SegundoNombre; c2.primerApellido = c.PrimerApellido; c2.segundoApellido = c.SegundoApellido; c2.dui = c.Dui; c2.direccion = c.Direccion; c2.telefono = c.Telefono; c2.correo = c.Correo; return(c2); }
public int SaveCliente(ENCliente oCliente) { DACliente data = new DACliente(); int Resultado = 0; using (SqlConnection con = new SqlConnection(CadenaConexion)) { try { Resultado = data.SaveCliente(con, oCliente); } catch (Exception ex) { GrabarLog(ex); } } return(Resultado); }
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { EN.ENCliente enCli = new EN.ENCliente(); DataSet ds = new DataSet(); ds = enCli.ObtenerDatosClienteConDni(Login1.UserName.ToString()); if (ds.Tables["Cliente"].Rows.Count > 0) { if (ds.Tables["Cliente"].Rows[0][10].ToString() == Login1.Password.ToString()) { Session["Usuario"] = Login1.UserName.ToString(); e.Authenticated = true; EN.ENCliente cli = new ENCliente(); DataSet dscli = new DataSet(); if (Session["Usuario"] != null) { dscli = cli.ObtenerDatosClienteConDni(Session["Usuario"].ToString()); Session["nombre"] = dscli.Tables["Cliente"].Rows[0][1].ToString(); Session["apellidos"] = dscli.Tables["Cliente"].Rows[0][2].ToString(); Session["telefono"]= dscli.Tables["Cliente"].Rows[0][3].ToString(); Session["email"] = dscli.Tables["Cliente"].Rows[0][4].ToString(); Session["direccion"] = dscli.Tables["Cliente"].Rows[0][5].ToString(); Session["provincia"]= dscli.Tables["Cliente"].Rows[0][6].ToString(); Session["ciudad"] = dscli.Tables["Cliente"].Rows[0][7].ToString(); } Response.Redirect("Index.aspx"); } else { e.Authenticated = false; Login1.FailureText = "Contraseña o usuario incorrecto."; } } else { e.Authenticated = false; Login1.FailureText = "No existe ese usuario."; } }
protected void Page_Load(object sender, EventArgs e) { LabelErrorCampos.Visible = false; if (!Page.IsPostBack) { FotoUsuario.ImageUrl = "/Imagenes/ImagenesPerfil/" + Session["Usuario"].ToString() + ".jpg"; TTextBoxNombre.Text = Session["nombre"].ToString(); TTextBoxApellidos.Text = Session["apellidos"].ToString(); TTextBoxEmail.Text = Session["email"].ToString(); TTextBoxTelefono.Text = Session["telefono"].ToString(); TTextBoxDireccion.Text = Session["direccion"].ToString(); ENCliente cli = new ENCliente(); DataSet ds = new DataSet(); ds = cli.ObtenerDatosClienteConDni(Session["Usuario"].ToString()); TTextBoxPass.Text = ds.Tables["Cliente"].Rows[0][10].ToString(); TTextBoxPass2.Text = TTextBoxPass.Text; } }
protected void Page_Load(object sender, EventArgs e) { ImagenUsuario.ImageUrl = "/Imagenes/ImagenesPerfil/" + Session["Usuario"].ToString() + ".jpg"; EN.ENCliente cli = new ENCliente(); DataSet dscli = new DataSet(); if (Session["Usuario"] != null) { dscli = cli.ObtenerDatosClienteConDni(Session["Usuario"].ToString()); Session["nombre"] = TLabelNombre.Text = dscli.Tables["Cliente"].Rows[0][1].ToString(); Session["apellidos"] = TLabelApellidos.Text = dscli.Tables["Cliente"].Rows[0][2].ToString(); Session["telefono"] = TLabelTelefono.Text = dscli.Tables["Cliente"].Rows[0][3].ToString(); Session["email"] = TLabelEmail.Text = dscli.Tables["Cliente"].Rows[0][4].ToString(); Session["direccion"] = TLabelDireccion.Text = dscli.Tables["Cliente"].Rows[0][5].ToString(); Session["provincia"] = TLabelProvincia.Text = dscli.Tables["Cliente"].Rows[0][6].ToString(); Session["ciudad"] = TLabelCiudad.Text = dscli.Tables["Cliente"].Rows[0][7].ToString(); EN.ENReservas re = new ENReservas(); DataSet dsre = new DataSet(); dsre = re.ObtenerReservasPorUsuario(Session["Usuario"].ToString()); //obtenemos la reserva FALTA ARREGLARLO PARA Q TE DEVUELVA La del DNI QUE QIERES // CREAMOS UN DATATABLE(tabla personalizada por mi) Para introducirlo en el dataset y este se introducira en el datagridview EN.ENVehiculo ve = new ENVehiculo(); DataSet dsve = new DataSet(); DataTable dtvehi = dsve.Tables.Add("DataTableMia"); dtvehi.Columns.Add("Nº Reserva", typeof(String)); dtvehi.Columns.Add("Matricula", typeof(String)); dtvehi.Columns.Add("Marca", typeof(String)); dtvehi.Columns.Add("Modelo", typeof(String)); dtvehi.Columns.Add("Fecha Inicio", typeof(String)); dtvehi.Columns.Add("Fecha Fin", typeof(String)); //DATATABLE CREADO if (dsre.Tables["Reservas"].Rows.Count > 0) { for (int i = 0; i < dsre.Tables["Reservas"].Rows.Count && i < 4; i++) //4 lo ponemos para limitar a 4 las reservas q se pueden mostrar { string numeroreserva = dsre.Tables["Reservas"].Rows[i][0].ToString(); string matricula = dsre.Tables["Reservas"].Rows[i][2].ToString(); //Substring nos sirve para recortar el string y quitarle la hora string fechaini = dsre.Tables["Reservas"].Rows[i][3].ToString().Substring(0, 10); //Substring nos sirve para recortar el string y quitarle la hora string fechafin = dsre.Tables["Reservas"].Rows[i][4].ToString().Substring(0, 10); ve.Matricula = matricula; ve.ObtenerDatosVehiculos(); //obtenemos los datos del vehiculo correspondientes a la matricula anterior DataRow fila; fila = dtvehi.NewRow(); //para crear una nueva fila fila["Nº Reserva"] = numeroreserva; fila["Matricula"] = ve.Matricula; fila["Marca"] = ve.Marca; fila["Modelo"] = ve.Modelo; fila["Fecha Inicio"] = fechaini; fila["Fecha Fin"] = fechafin; //fila["Marca"] = ve.Marca; dtvehi.Rows.Add(fila); } } TDataGridViewReservas.DataSource = dsve; TDataGridViewReservas.DataBind(); } else { Response.Redirect("Registro.aspx"); } }
public abstract string registrar(ENCliente c = null, ENMarca m = null);
protected void ReservabotonPrecio_Click(object sender, EventArgs e) { errorReserva.Visible = false; if (IndexTextFechaFin.Text != "" && IndexTextFechaInicio.Text != "" && conductores.Text != "" && Int32.Parse(conductores.Text)<10)//algo mal { TimeSpan ts = Convert.ToDateTime(IndexTextFechaFin.Text) - Convert.ToDateTime(IndexTextFechaInicio.Text); EN.ENFacturacion enFa = new ENFacturacion(); EN.ENCliente enCli = new ENCliente(); DataSet dsCli = new DataSet(); dsCli= enCli.ObtenerDatosClienteConDni(Session["Usuario"].ToString()); enFa.Categoria = comboCategorias.Text; enFa.Conductores = Int32.Parse(conductores.Text); enFa.Tarifa = dsCli.Tables["Cliente"].Rows[0][8].ToString(); enFa.Tiempo = ts.Days + 1; enFa.ObtenerPrecio(); precio.Text = enFa.PrecioTotal.ToString(); if (Session["Usuario"] != null) { ReservabotonConsulta.Visible = true; } } }
protected void ReservabotonConsulta_Click(object sender, EventArgs e) { DataSet dsMatricula = new DataSet(); EN.ENReservas enRe = new EN.ENReservas(); EN.ENVehiculo enVe = new ENVehiculo(); EN.ENCliente cli = new ENCliente(); DataSet dscli = new DataSet(); if (Session["Usuario"] != null) { dscli = cli.ObtenerDatosClienteConDni(Session["Usuario"].ToString()); enRe.Cliente = dscli.Tables["Cliente"].Rows[0][0].ToString(); if (!CompareValidatorFechas.IsValid || !CustomValidator1.IsValid || !Posterior.IsValid)//algo mal { } else { dsMatricula = enVe.ObtenerMatriculaReserva(comboMarcas.Text, comboModelos.Text, comboCategorias.Text); if (dsMatricula.Tables["Reserva"].Rows.Count > 0) { enRe.Matricula = dsMatricula.Tables["Reserva"].Rows[0][0].ToString(); enVe.Matricula = dsMatricula.Tables["Reserva"].Rows[0][0].ToString(); enVe.ObtenerDatosVehiculos(); enVe.Estado = "Reservado"; enVe.EditarVehiculo(); } enRe.Conductores = Int32.Parse(conductores.Text); enRe.FechaFin = Convert.ToDateTime(IndexTextFechaFin.Text); enRe.FechaInicio = Convert.ToDateTime(IndexTextFechaInicio.Text); enRe.Modelo = comboModelos.Text; enRe.Activa = true; enRe.AnyadirReserva(); } } }
public int SaveCliente(SqlConnection con, ENCliente oCliente) { using (con) { SqlCommand cmd = new SqlCommand("DBPESPS_ClienteRegistro", con); cmd.CommandType = CommandType.StoredProcedure; //Parametro de Retorno IDentity SqlParameter parmR = new SqlParameter("@CodigoRetorno", SqlDbType.Int); parmR.Size = 50; parmR.Direction = ParameterDirection.Output; cmd.Parameters.Add(parmR); SqlParameter parm1 = new SqlParameter("@Nombres", SqlDbType.NVarChar); parm1.Value = oCliente.Nombres; parm1.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm1); SqlParameter parm2 = new SqlParameter("@Apellido_Paterno", SqlDbType.NVarChar); parm2.Value = oCliente.Apellido_Paterno; parm2.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm2); SqlParameter parm3 = new SqlParameter("@Apellido_Materno", SqlDbType.NVarChar); parm3.Value = oCliente.Apellido_Materno; parm3.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm3); SqlParameter parm4 = new SqlParameter("@DNI", SqlDbType.NVarChar); parm4.Value = oCliente.DNI; parm4.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm4); SqlParameter parm5 = new SqlParameter("@Sexo", SqlDbType.NVarChar); parm5.Value = oCliente.Sexo; parm5.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm5); SqlParameter parm6 = new SqlParameter("@Email", SqlDbType.NVarChar); parm6.Value = oCliente.Email; parm6.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm6); SqlParameter parm7 = new SqlParameter("@Telefono", SqlDbType.NVarChar); parm7.Value = oCliente.Telefono; parm7.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm7); SqlParameter parm8 = new SqlParameter("@Domicilio", SqlDbType.NVarChar); parm8.Value = oCliente.Domicilio; parm8.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm8); SqlParameter parm9 = new SqlParameter("@Ciudad", SqlDbType.NVarChar); parm9.Value = oCliente.Ciudad; parm9.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm9); SqlParameter parm10 = new SqlParameter("@Estado", SqlDbType.NVarChar); parm10.Value = "A"; parm10.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm10); SqlParameter parm11 = new SqlParameter("@idCotizacion", SqlDbType.Int); parm11.Value = oCliente.idCotizacion; parm11.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm11); SqlParameter parm12 = new SqlParameter("@idAseguradora", SqlDbType.Int); parm12.Value = oCliente.idAseguradora; parm12.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm12); con.Open(); cmd.ExecuteNonQuery(); con.Close(); object intSolicitudCotizacion = cmd.Parameters["@CodigoRetorno"].Value; return((int)(intSolicitudCotizacion)); } }
public override string actualizar(int?id, ENCliente c = null, ENMarca marca = null) { context.modificarMarcas(id, marca.Nombre, marca.Comentario, salida); context.SaveChanges(); return(salida.Value.ToString()); }
public override string registrar(ENCliente c = null, ENMarca marca = null) { context.registrarMarcas(marca.Nombre, marca.Comentario, salida); context.SaveChanges(); return(salida.Value.ToString()); }
public abstract string actualizar(int?id, ENCliente p = null, ENMarca m = null);
protected void Page_Load(object sender, EventArgs e) { //////////////////////LOAD NORMAL DE RESERVAS/////////////////////////////// Posterior.ValueToCompare = System.DateTime.Today.AddDays(-1).ToString(); if (comboCategorias.Items.Count == 0) { DataSet ds = new DataSet(); EN.ENVehiculo envehiculo = new ENVehiculo(); ds = envehiculo.ObtenerCategorias(); for (int i = 0; i < ds.Tables["Categoria"].Rows.Count; i++) { comboCategorias.Items.Add(ds.Tables["Categoria"].Rows[i][0].ToString()); } //MARCAS comboMarcas.Items.Clear(); ds = envehiculo.ObtenerMarcas(comboCategorias.Text.ToString()); for (int i = 0; i < ds.Tables["Marcas"].Rows.Count; i++) { comboMarcas.Items.Add(ds.Tables["Marcas"].Rows[i][0].ToString()); } //MODELOS comboModelos.Items.Clear(); ds = envehiculo.ObtenerModelosVehiculos(comboCategorias.Text.ToString(), comboMarcas.Text.ToString()); for (int i = 0; i < ds.Tables["Modelos"].Rows.Count; i++) { comboModelos.Items.Add(ds.Tables["Modelos"].Rows[i][0].ToString()); } } ///////////////////////////RESERVAS COCHES/////////////////////// if (!Page.IsPostBack)//SOLO ENTRA SI ES LA PRIMERA VEZ QUE SE CARGA LA PAGINA { EN.ENCliente enCliente = new ENCliente(); EN.ENVehiculo enVehi = new ENVehiculo(); if (Session["Usuario"] != null) { enCliente.DNI = Session["Usuario"].ToString(); if (Session["ReservaRapida"] == "Habitual") { Session["ReservaRapida"] = null; string matricula = ""; char[] separadores = { '|', ',' }; string[] favorito = enCliente.ReservaFavorita().Split(separadores); DataSet dsMatricula = new DataSet(); //Marca,Modelo,FK_Categoria dsMatricula = enVehi.ObtenerMatriculaReserva(favorito[0], favorito[1], favorito[2]); matricula = dsMatricula.Tables["Reserva"].Rows[0][0].ToString(); RellenarCocheReserva(matricula); } if (Session["ReservaRapida"] == "Ultima") { Session["ReservaRapida"] = null; enCliente.DNI = Session["Usuario"].ToString(); RellenarCocheReserva(enCliente.UltimaReserva()); } } else { errorRegistrado.Visible = true; } /////////////////////////////FECHAS////////////////////////// if (Session["FechaInicioIndex"] != null && Session["FechaFinIndex"] != null) { IndexTextFechaInicio.Text = Session["FechaInicioIndex"].ToString(); IndexTextFechaFin.Text = Session["FechaFinIndex"].ToString(); Session["FechaInicioIndex"] = null; Session["FechaFinIndex"] = null; } } ////MOSTRAR IMAGENES DE COCHES// MostrarImagen(); }
//JSON generación de Orden de Compra public JsonResult GenerarComprar(ENCliente obCliente) { try { int intRes = 0; //Registro de Cliente LNCliente oCliente = new LNCliente(); obCliente.idCotizacion = Int32.Parse(Session["idCotizacion"].ToString()); intRes = oCliente.SaveCliente(obCliente); string nombres = obCliente.Nombres + " " + obCliente.Apellido_Paterno + " " + obCliente.Apellido_Materno; //Envio de Email de Confirmción String DetalledeCompra = ""; //String TablaDetalleCotizacion = "<table width='90%' border='0' cellpadding='0' cellspacing='0' class='contenttable'><th>RIMAC</th><th>PACIFICO</th><th>LA POSITIVA</th><th>MAPFRE</th><th>HDI</th><tr><td>USD$" + oCotizacionDetalle.Prima_Rimac + "</td><td>USD$" + oCotizacionDetalle.Prima_Pacifico + "</td><td>USD$" + oCotizacionDetalle.Prima_LaPositiva + "</td><td>USD$" + oCotizacionDetalle.Prima_Mafre + "</td><td>USD$" + oCotizacionDetalle.Prima_HDI + "</td></tr></table>"; string cuerpoEmail = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'> <title>El Equipo de DigitalBrokers.pe</title> <style type='text/css'> body {margin: 0; padding: 0; min-width: 100%!important;} img {height: auto;} .content {width: 100%; max-width: 600px;} .contenttable{align:middle;text-align:center;width:100%;}.contenttable th{background-color:#0080FF;color: #fff;height:80px;font-weight :200;}. contenttable td{text-align:center; vertical-align:center;} .header {padding: 40px 30px 20px 30px;} .innerpadding {padding: 30px 30px 30px 30px;} .borderbottom {border-bottom: 1px solid #f2eeed;} .subhead {font-size: 15px; color: #ffffff; font-family: sans-serif;} .h2, .bodycopy {color: #fff; font-family: sans-serif;} .h1 {font-size: 33px;color: #fff; line-height: 38px; font-weight: bold;} .h2 {padding: 0 0 15px 0; font-size: 24px; line-height: 28px; font-weight: bold;} .bodycopy {font-size: 16px; line-height: 22px;} .button {text-align: center; font-size: 18px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;} .button a {color: #ffffff; text-decoration: none;} .footer {padding: 20px 30px 15px 30px;} .footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;} .footercopy a {color: #ffffff; text-decoration: underline;} @media only screen and (max-width: 550px), screen and (max-device-width: 550px) { body[yahoo] .hide {display: none!important;} body[yahoo] .buttonwrapper {background-color: transparent!important;} body[yahoo] .button {padding: 0px!important;} body[yahoo] .button a {background-color: #e05443; padding: 15px 15px 13px!important;} body[yahoo] .unsubscribe {display: block; margin-top: 20px; padding: 10px 50px; background: #2f3942; border-radius: 5px; text-decoration: none!important; font-weight: bold;} } /*@media only screen and (min-device-width: 601px) { .content {width: 600px !important;} .col425 {width: 425px!important;} .col380 {width: 380px!important;} }*/ </style> </head> <!-- Desarrolado por Daniel Lazarte @daniellazarte en Twitter--> <body style='margin: 0;padding: 0;min-width: 100%!important;'> <table width='100%' bgcolor='#f6f8f1' border='0' cellpadding='0' cellspacing='0'> <tr> <td> <!--[if (gte mso 9)|(IE)]> <table width='600' align='center' cellpadding='0' cellspacing='0' border='0'> <tr> <td> <![endif]--> <table bgcolor='#ffffff' class='content' align='center' cellpadding='0' cellspacing='0' border='0' style='width: 100%;max-width: 600px;'> <tr> <td bgcolor='#0080FF' class='header' style='padding: 40px 30px 20px 30px;'> <table width='70' align='left' border='0' cellpadding='0' cellspacing='0'> <tr> <td height='70' style='padding: 0 20px 20px 0;'> <img class='fix' src='http://app.digitalbrokers.pe/imagenes/box.png' width='70' height='70' border='0' alt='' style='height: auto;'> </td> </tr> </table> <!--[if (gte mso 9)|(IE)]> <table width='425' align='left' cellpadding='0' cellspacing='0' border='0'> <tr> <td> <![endif]--> <table class='col425' align='left' border='0' cellpadding='0' cellspacing='0' style='width: 100%; max-width: 425px;'> <tr> <td height='70'> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td class='subhead' style='padding: 0 0 0 3px;font-size: 15px;color: #ffffff;font-family: sans-serif;'> El Equipo de DigitalBrokers.pe</td> </tr> <tr> <td class='h1' style='padding: 5px 0 0 0;color: #fff;font-family: sans-serif;font-size: 33px;line-height: 38px;font-weight: bold;'>Gracias por tu Compra. </td> </tr> </table> </td> </tr> </table> <!--[if (gte mso 9)|(IE)]> </td> </tr> </table> <![endif]--> </td> </tr> <tr> <td class='innerpadding borderbottom' style='padding: 30px 30px 30px 30px;border-bottom: 1px solid #f2eeed;'> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td class='h2' style='color: #153643;font-family: sans-serif;padding: 0 0 15px 0;font-size: 24px;line-height: 28px;font-weight: 200;'> Hola " + nombres + ", gran desición estamos muy contentos de que hallas realizado la compra de tu seguro con nuestra plataforma. </td> </tr> <tr> <td class='bodycopy' style='color: #153643;font-family: sans-serif;font-size: 16px;line-height: 22px;'>En breve un asesor estará comunicandose contigo para concluir tu proceso de adquisición de tu Seguro Vehicular. Nuevamente Muchas gracias por ser parte de nuestro selecto equipo de clientes. <br><br></td></tr><tr><td>" + DetalledeCompra + "</td></tr> </table></td> </tr> <tr> <td class='innerpadding borderbottom' style='padding: 30px 30px 30px 30px;border-bottom: 1px solid #f2eeed;'> <img class='fix' src='http://app.digitalbrokers.pe/imagenes/thanks-buy.gif' width='100%' border='0' alt='' style='height: auto;'> </td> </tr> <tr> <td class='innerpadding bodycopy' style='padding: 30px 30px 30px 30px;color: #153643;font-family: sans-serif;font-size: 16px;line-height: 22px;'> Gracias por ser parte de nuestro equipo =) . </td> </tr> <tr> <td class='footer' bgcolor='#44525f' style='padding: 20px 30px 15px 30px;'> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td align='center' class='footercopy' style='font-family: sans-serif;font-size: 14px;color: #ffffff;'> ® Digital Brokers S.A.<br> <span class='hide'>Correo enviado de forma automática por el portal DigitalBrokers.pe.<br/>Se recomienda no responder al presnete correo.</span> </td> </tr> <tr> <td align='center' style='padding: 20px 0 0 0;'> <table border='0' cellspacing='0' cellpadding='0'> <tr> <td width='37' style='text-align: center; padding: 0 10px 0 10px;'> <a href='http://www.facebook.com/'> <img src='https://pga.editoraperu.com.pe/image/facebook.png' width='37' height='37' alt='Facebook' border='0' style='height: auto;'> </a> </td> <td width='37' style='text-align: center; padding: 0 10px 0 10px;'> <a href='http://www.twitter.com/'> <img src='https://pga.editoraperu.com.pe/image/twitter.png' width='37' height='37' alt='Twitter' border='0' style='height: auto;'> </a> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <!--[if (gte mso 9)|(IE)]> </td> </tr> </table> <![endif]--> </td> </tr> </table> <!--analytics--> <script src='http://code.jquery.com/jquery-1.10.1.min.js' type='text/javascript'></script> </body> </html>"; //***********************Envio de Email al Cliente Produccion Godaddy*************************************** MailAddress mailfrom = new MailAddress("*****@*****.**"); MailAddress mailto = new MailAddress(obCliente.Email.ToString()); MailMessage newmsg = new MailMessage(mailfrom, mailto); //AGREGANDO COPIA A DIEGO PARA SU VALIDACION Y ATENCION MailAddress copy = new MailAddress("*****@*****.**"); newmsg.Bcc.Add(copy); newmsg.Subject = "Tu compra en digitalbrokers.pe"; SmtpClient smtp = new SmtpClient("relay-hosting.secureserver.net", 25); smtp.EnableSsl = false; smtp.UseDefaultCredentials = true; smtp.Credentials = new NetworkCredential("*****@*****.**", "servando"); newmsg.Body = cuerpoEmail; newmsg.IsBodyHtml = true; smtp.Send(newmsg); //***********************FIN Envio de Email al Cliente Produccion Godaddy*************************************** //*****************************Envio de Email Al Cliente con cuenta Google Desarrollo*************************** //GMailer.GmailUsername = "******"; //GMailer.GmailPassword = "******"; ////GMailer.GmailUsername = "******"; ////GMailer.GmailPassword = "******"; //GMailer mailer = new GMailer(); //mailer.ToEmail = obCliente.Email.ToString(); //mailer.Subject = "Tu compra en digitalbrokers.pe"; //mailer.Body = cuerpoEmail; //mailer.IsHtml = true; //mailer.Send(); //*****************************Envio de Email Al Cliente con cuenta Google Desarrollo*************************** if (intRes > 0) { return(Json(new { idCompra = intRes })); } else { return(Json(new { success = false })); } } catch (Exception) { throw; } }