示例#1
0
        private void CriarCaixa()
        {
            pictureBoxLoad.Visible = true;
            thread = new Thread(PreencherCaixaThread);
            form1.ExecutarThread(thread);
            this.Activate();

            if (Form1.EmpresaEmail != null)
            {
                if (enumCaixa == EnumCaixa.Caixa)
                {
                    EmailNegocio negocioEmail = new EmailNegocio(Form1.EmpresaEmail, Form1.Empresa.empfantasia);
                    EmailInfo    email        = new EmailInfo
                    {
                        emailAssunto = "Caixa Fechado - " + caixaAbrirInfo.caixaabrirdata.Date.ToShortDateString(),
                        emailMessage = ArrCupom[0],
                        emailTo      = Form1.EmpresaEmail.emailenviar,
                        emailCC      = new string[0],
                        emailCCo     = new string[0],
                        emailAnexo   = new string[0]
                    };

                    negocioEmail.EnviarEmailGmail(email);
                }
            }

            PreencherForm(ArrCupom[0]);
        }
示例#2
0
        private void ButtonEnviar_Click(object sender, EventArgs e)
        {
            if (CampoObrigatorio())
            {
                if (PreencherEmail())
                {
                    negocioEmail = new EmailNegocio(Form1.EmpresaEmail, Form1.Empresa.empfantasia);

                    if (negocioEmail.EnviarEmailGmail(infoEmail))
                    {
                        FormMessage.ShowMessegeWarning("Mensagem enviada por email");
                    }
                }
            }
        }