private SortingEntities1 _ctx; // konekcija s bazom public Form1(bool guest, User korisnik, SortingEntities1 ctx) { InitializeComponent(); elements = new ElementList(this, Width / 2); ResizeRedraw = true; DoubleBuffered = true; this.guest = guest; this.korisnik = korisnik; _ctx = ctx; lblUser.Text = guest ? "Guest" : korisnik.username; }
public SortTest(SortingEntities1 ctx, User korisnik) { InitializeComponent(); this._ctx = ctx; this.korisnik = korisnik; }
public AdminPage(SortingEntities1 ctx) { InitializeComponent(); _ctx = ctx; dgvUsers.DataSource = _ctx.Users.ToList(); }
SortingEntities1 _ctx; // konekcija s bazom public Login() { InitializeComponent(); _ctx = new SortingEntities1(); }