Example #1
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            var micla = new MiClaseMagica.Variables_Globales();

            micla.updateData();
        }
Example #2
0
        private void btncambiosconfig_Click(object sender, EventArgs e)
        {
            if (txtrutaservidor.Text != "" && txtsmtppass.Text != "" && txtsmtpuser.Text != "" && txtsmtpserver.Text != "")
            {
                string s          = "rutaServidor";
                var    tblUsuario = A.Configuraciones.FirstOrDefault(x => x.Idconfig == s);

                if (tblUsuario != null)
                {
                    tblUsuario.Value = txtrutaservidor.Text;
                    A.SaveChanges();
                    lblconex.ForeColor = Color.LimeGreen;
                    lblconex.Text      = "¡Edicion realizada exitosamente!";
                }

                s          = "smtpPass";
                tblUsuario = A.Configuraciones.FirstOrDefault(x => x.Idconfig == s);

                if (tblUsuario != null)
                {
                    tblUsuario.Value = txtsmtppass.Text;
                    A.SaveChanges();
                    lblconex.ForeColor = Color.LimeGreen;
                    lblconex.Text      = "¡Edicion realizada exitosamente!";
                }

                s          = "smtpServer";
                tblUsuario = A.Configuraciones.FirstOrDefault(x => x.Idconfig == s);

                if (tblUsuario != null)
                {
                    tblUsuario.Value = txtsmtpserver.Text;
                    A.SaveChanges();
                    lblconex.ForeColor = Color.LimeGreen;
                    lblconex.Text      = "¡Edicion realizada exitosamente!";
                }

                s          = "smtpUser";
                tblUsuario = A.Configuraciones.FirstOrDefault(x => x.Idconfig == s);

                if (tblUsuario != null)
                {
                    tblUsuario.Value = txtsmtpuser.Text;
                    A.SaveChanges();
                    lblconex.ForeColor = Color.LimeGreen;
                    lblconex.Text      = "¡Edicion realizada exitosamente!";
                }

                s          = "correoCalidad";
                tblUsuario = A.Configuraciones.FirstOrDefault(x => x.Idconfig == s);

                if (tblUsuario != null)
                {
                    tblUsuario.Value = txtcorreocalidad.Text;
                    A.SaveChanges();
                    lblconex.ForeColor = Color.LimeGreen;
                    lblconex.Text      = "¡Edicion realizada exitosamente!";
                }

                var micla = new MiClaseMagica.Variables_Globales();
                micla.updateData();
            }
            else
            {
                lblconex.BackColor = Color.DarkRed;
                lblconex.Text      = "Campos Vacios";
            }
        }