예제 #1
0
        // 2 - ITF znaki / litery

        private void ZatwierdzITFlitery()
        {
            switch (akcja)
            {
            case "D":
                if (grdPozycje.DataContext is itf_litery)
                {
                    var row = new itf_litery();
                    row       = grdPozycje.DataContext as itf_litery;
                    row.id    = PanelITF_db.IdITFlitery();
                    row.opw   = frmLogin.LoggedUser.login;
                    row.czasw = DateTime.Now;
                    row.opm   = frmLogin.LoggedUser.login;
                    row.czasm = DateTime.Now;
                    PanelITF_db.DodajITFlitery(row);
                }
                break;

            case "K":
                if (grdPozycje.DataContext is itf_litery)
                {
                    var row = new itf_litery();
                    row       = grdPozycje.DataContext as itf_litery;
                    row.id    = PanelITF_db.IdITFlitery();
                    row.opw   = frmLogin.LoggedUser.login;
                    row.czasw = DateTime.Now;
                    row.opm   = frmLogin.LoggedUser.login;
                    row.czasm = DateTime.Now;
                    PanelITF_db.DodajITFlitery(row);
                }
                break;

            case "P":
                rowITFlitery.opm   = frmLogin.LoggedUser.login;
                rowITFlitery.czasm = DateTime.Now;
                PanelITF_db.PoprawITFlitery(rowITFlitery);
                break;

            default:
                break;
            }
        }