コード例 #1
0
ファイル: MainWindow.cs プロジェクト: rprojetos/SIGOM
    protected void OnBtnLoginClicked(object sender, EventArgs e)
    {
        String path       = System.IO.Directory.GetCurrentDirectory() + "/";
        String dbName     = "sigomDb.db";
        String dbPathFile = path + dbName;
        DbLite dbl        = new DbLite();

        dbl.showMessage(dbPathFile);

        String tableName = "Login";

        etrUser.Text = etrUser.Text.Trim();
        etrPsw.Text  = etrPsw.Text.Trim();

        if ((etrUser.Text != "") && (etrPsw.Text != ""))
        {
            String getData = dbl.dbGetCommand(dbPathFile, tableName, "Nome", "Nome", etrUser.Text);

            if (etrUser.Text == getData)
            {
                getData = dbl.dbGetCommand(dbPathFile, tableName, "Senha", "Senha", etrPsw.Text);
                if (etrPsw.Text == getData)
                {
                    sigom.WorkshopWindow ww = new sigom.WorkshopWindow();
                    ww.Show();
                    this.Destroy();
                }
                else
                {
                    dbl.showMessage("Usuário e/ou Senha incorreto!");
                }
            }
            else
            {
                dbl.showMessage("Usuário e/ou Senha incorreto!");
            }
        }
        else
        {
            dbl.showMessage("Usuário e/ou Senha é obrigatório!");
        }
    }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: rprojetos/SIGOM
    protected void OnBtnOsAbertasClicked(object sender, EventArgs e)
    {
        String        path       = System.IO.Directory.GetCurrentDirectory() + "/";
        String        dbName     = "sigomDb.db";
        String        dbPathFile = path + dbName;
        DbLite        dbl        = new DbLite();
        List <String> getData    = new List <String>();

        String tableName = "OrdemServico";

        getData = dbl.dbGetCommand(dbPathFile, tableName, "numOs", "Status", "ABERTO");

        sigom.fifoService fs = new fifoService(getData);
    }