// 5 - ITF Ĺrednice private void ZatwierdzITFsr() { switch (akcja) { case "D": if (grdPozycje.DataContext is itf_sr) { var row = new itf_sr(); row = grdPozycje.DataContext as itf_sr; row.id = PanelITF_db.IdITFsr(); row.opw = frmLogin.LoggedUser.login; row.czasw = DateTime.Now; row.opm = frmLogin.LoggedUser.login; row.czasm = DateTime.Now; PanelITF_db.DodajITFsr(row); } break; case "K": if (grdPozycje.DataContext is itf_sr) { var row = new itf_sr(); row = grdPozycje.DataContext as itf_sr; row.id = PanelITF_db.IdITFsr(); row.opw = frmLogin.LoggedUser.login; row.czasw = DateTime.Now; row.opm = frmLogin.LoggedUser.login; row.czasm = DateTime.Now; PanelITF_db.DodajITFsr(row); } break; case "P": rowITFsr.opm = frmLogin.LoggedUser.login; rowITFsr.czasm = DateTime.Now; PanelITF_db.PoprawITFsr(rowITFsr); break; default: break; } }