Option Strict On Option Explicit On Imports Extensiones Partial Class Sistemas_RegistroEmpresa Inherits Page #Region "PROPIEDADES" Private Property Nombre As String Get Nombre = ViewState("Nombre").ToString End Get Set(value As String) ViewState("Nombre") = value End Set End Property Private Property RFC As String Get RFC = ViewState("RFC").ToString End Get Set(value As String) ViewState("RFC") = value End Set End Property Private Property Email As String Get Email = ViewState("Email").ToString End Get Set(value As String) ViewState("Email") = value End Set End Property Private Property MetodoPago As String Get MetodoPago = ViewState("MetodoPago").ToString End Get Set(value As String) ViewState("MetodoPago") = value End Set End Property Private Property Liga As String Get Liga = ViewState("Liga").ToString End Get Set(value As String) ViewState("Liga") = value End Set End Property #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1) RegistraScript("$('#mBody').addClass('page-sidebar-closed')") RegistraScript("$('#divMenu').css('display','none')") End If End Sub #Region " GUARDAR " Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Nombre = txtNombre.Text.ToUpper() RFC = TxtRFC.Text.ToUpper() Email = TxtEmail.Text MetodoPago = DdlMetodoPago.SelectedValue Dim objEmpresa As New ClsSisEmpresas() Try If objEmpresa.AddEmpresa(-1, Nombre, "", "", "", "", "", "", RFC, 0, "", "", Email, "CFDi", "", "", "", "", "", "", "", 100, False, False, False, "", False, "", "", "", 0, False, False, False, False, False, False, False, False, False, False, "", "", "", "", "", "", 0, False, "", "", "", "", "", 0, False, "", "", "", 0, 0, 0, 0, 0, 0, 0, 0, "", "", 0, 0, "", "", -1, 0.0D, "", 0, False, 0.0D, "", "", 0, False, 0, 0, False, 0, 0, False, 0, CveMetodoPago:=MetodoPago.ToEntero) Then Alert("Su solicitud ha sido procesada correctamente, en breve recibira un correo para completar el registro.", TipoMensaje.MsgInformacion) Liga = String.Format("sig.adsistemas.mx/Sistemas/WizardRegistro.aspx?P={0}", Encripta(String.Format("CveEmpresa={0}", objEmpresa.CveEmpresa))) EnviaCorreo() RegistraScript("$('#C_DivRegistro').css('display', 'none')") RegistraScript("$('#C_DvFinalizado').css('display', '')") UpRegistro.Update() Else Alert("OCurrió un error al guardar la empresa", TipoMensaje.MsgError) End If Catch ex As Exception OnError("Ocurrió un error al guardar la emrpresa desde registro basico.", ex) Finally objEmpresa.Dispose() End Try End Sub #End Region #Region " ENVIAR CORREO " Protected Sub REVContactoEmail_Load(sender As Object, e As EventArgs) RegistraScript("$('#FirstEmail').addClass('has-error');$('#helpMail').css('color', 'red')") End Sub Protected Sub EnviaCorreo() Dim objMail As New ClsSisMail() Dim body = GeneraCorreo(Nombre) objMail.SendMail(ClsPaginas.EmpresaNotificaciones, Email, "Activación de empresa", body, "") End Sub Private Function GeneraCorreo(Nombre As String) As String Dim strBody As New StringBuilder strBody.Append("") strBody.Append(" ") strBody.Append("") strBody.Append("") strBody.Append("
") strBody.Append("

AD Sistemas Soluciones en TI

") strBody.Append("
") strBody.Append("
") strBody.Append("
") strBody.Append(" Completar Registro") strBody.Append("
") strBody.Append("
") strBody.Append("
") strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") strBody.AppendFormat(" ", Nombre) strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") strBody.Append("", Liga) strBody.Append("") strBody.Append("") strBody.Append("
Fecha: ") strBody.Append(DateTime.Now.ToString("dd/MM/yy")) strBody.Append(" ") strBody.Append("
{0}

") strBody.Append("
Para continuar con el proceso de registro y activación, por favor haga click en la siguiente liga:
") strBody.AppendFormat("Continuar

Le recomendamos tener la siguiente información a la mano:
") strBody.Append("
    ") strBody.Append("
  • Datos Fiscales (Direccion, Contacto, Regimen, Certificados digitales, etc. )
  • ") strBody.Append("
  • Roles/Puestos, Permisos y Usuarios que usaran el SIG )
  • ") strBody.Append("
  • Correos para envío de notificaciones y Para recepción de facturas (si no cuenta con un correo, se le proporcionará uno)
  • ") strBody.Append("
  • Formatos de factura, plantillas de correo y logo
  • ") strBody.Append("
  • Clasificaciones contables, Productos / Servicios y las unidades de medida de éstos
  • ") strBody.Append("
  • Almacenes que se utilizand, y el método de salida de inventario
  • ") strBody.Append("
  • Proveedores, clientes y proyectos de la empresa
  • ") strBody.Append("
") strBody.Append("
") strBody.Append("
") strBody.Append("
") strBody.Append("
") strBody.Append(" ") strBody.Append("") strBody.Append("") Return strBody.ToString End Function #End Region End Class