using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SQLite; using System.Drawing; using System.IO; using System.Linq; using System.Net; using System.Reflection.Emit; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace CKUERA { public partial class Instalacion : Form { public Instalacion() { InitializeComponent(); } private void Instalacion_Load(object sender, EventArgs e) { //BackColor = Global.ColorSistema; } private void Comenzar_Click(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; try { if (Txt_Tel.Texts.Length > 0) { long a = long.Parse(Txt_Tel.Texts); if (Txt_Tel.Texts.Substring(0, 1) == "0") { MessageBox.Show("Escriba números entero, no debe anteponer cero. Ejemplo: 595980000000"); Txt_Tel.Texts = "595" + Txt_Tel.Texts.Substring(1,Txt_Tel.Texts.Length-1); return; } if (Txt_Tel.Texts.Substring(0, 1) == "+") { MessageBox.Show("Escriba números entero, no debe anteponer +. Ejemplo: 595980000000"); Txt_Tel.Texts = "595" + Txt_Tel.Texts.Substring(1, Txt_Tel.Texts.Length - 1); return; } if (Txt_Tel.Texts.Length < 12) { MessageBox.Show("La cantidad de dígitos deben ser 12. Ej.: 595980000000"); return; } //595985836908 } } catch { Txt_Tel.Texts = ""; } if (Txt_Tel.Texts == "") { Txt_Tel.Select(); return; } if (Txt_nombre.Texts == "") { Txt_nombre.Select(); return; } if (Txt_empresa.Texts == "") { Txt_empresa.Select(); return; } Principal principal = new Principal(); principal.EnviarWhatsApp("ID_INFOSEG", "El *ECV* Caja " + double.Parse(Global.NUM_caja).ToString("000") + " Fue instalado con 10 días de licencia.\n*Serie de Pc:*\n" + Global.serie + "\n*Nombre:* " + Txt_nombre.Texts + "\n*Teléf.:* " + Txt_Tel.Texts + "\n*Comentario:* " + Txt_empresa.Texts, "595994866686"); principal.EnviarWhatsApp("ID_INFOSEG", "El *ECV* Caja " + double.Parse(Global.NUM_caja).ToString("000") + " Fue instalado con 10 días de licencia.\n*Serie de Pc:*\n" + Global.serie + "\n*Nombre:* " + Txt_nombre.Texts + "\n*Teléf.:* " + Txt_Tel.Texts + "\n*Comentario:* " + Txt_empresa.Texts, "595994850808"); principal.EnviarWhatsApp("ID_INFOSEG", "El *ECV* Caja " + double.Parse(Global.NUM_caja).ToString("000") + " Fue instalado con 10 días de licencia.\n*Serie de Pc:*\n" + Global.serie + "\n\n*Muchas Gracias* por instalar nuestro sistema.\nSi necesita asesoría o realizar algunas consultas, estamos atentos en el 595994866686", Txt_Tel.Texts.Trim()); Close(); Cursor = Cursors.Default; } private void Btn_noRecibido_Click(object sender, EventArgs e) { panel1.Left = 321; Comenzar.Text = "Volver a Enviar"; } private void Txt_Tel__TextChanged(object sender, EventArgs e) { label2.Text = "Ingrese el número de teléfono, sin espacio, con el código país, ej.: 595980000000"; label2.ForeColor = Color.Red; } private void Txt_Tel_MouseClick(object sender, MouseEventArgs e) { label2.Text = "Ingrese el número de teléfono, ej.: 595980000000"; label2.ForeColor = Color.Red; } private void Txt_Tel_Leave(object sender, EventArgs e) { label2.Text = "Por favor envíe el mensaje para continuar con la instalación."; label2.ForeColor = Color.DarkSlateBlue; } private void Txt_nombre__TextChanged(object sender, EventArgs e) { label2.Text = "Ingrese su Nombre y Apellido"; label2.ForeColor = Color.Red; } private void Txt_nombre_Click(object sender, EventArgs e) { label2.Text = "Ingrese su Nombre y Apellido"; label2.ForeColor = Color.Red; } private void Txt_nombre_Leave(object sender, EventArgs e) { label2.Text = "Por favor envíe el mensaje para continuar con la instalación."; label2.ForeColor = Color.DarkSlateBlue; } private void Txt_empresa__TextChanged(object sender, EventArgs e) { label2.Text = "Escriba su comentario..."; label2.ForeColor = Color.Red; } private void Txt_empresa_Click(object sender, EventArgs e) { label2.Text = "Escriba su comentario..."; label2.ForeColor = Color.Red; } private void Txt_empresa_Leave(object sender, EventArgs e) { label2.Text = "Por favor envíe el mensaje para continuar con la instalación."; label2.ForeColor = Color.DarkSlateBlue; } } }