示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            BLL.Security valida = new BLL.Security();
            Models.Loja  loja   = valida.CarregaDadosSalvos();

            txtCodLoja.Text = loja.MasterID.ToString();
        }
示例#2
0
        private void sairToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            BLL.Security valida = new BLL.Security();
            valida.ApagaDadosLoja();

            Logar f = new Logar();

            f.Show();
            this.Visible = false;
        }
示例#3
0
        private void LogarLoja(string user, string pass)
        {
            BLL.Security valida  = new BLL.Security();
            int          retorno = valida.checkStore(user, pass);

            if (retorno == 0)
            {
                MessageBox.Show("Dados incorretos digite novamente", "Ops", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                codLoja = retorno;
                Form1 f = new Form1();
                f.Show();
                this.Visible = false;
            }
        }
示例#4
0
        private static void LogarLoja()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            BLL.Security valida  = new BLL.Security();
            Models.Loja  loja    = valida.CarregaDadosSalvos();
            int          retorno = 0;

            if (loja.Email != "")
            {
                retorno = valida.checkStore(loja.Email, loja.Senha);
            }

            if (retorno == 0)
            {
                Application.Run(new Logar());
            }
            else
            {
                Application.Run(new Form1());
            }
        }