Пример #1
0
 public FormMain(int id, FormAuth auth)
 {
     InitializeComponent();
     ctx                = new MPEntities();
     authForm           = auth;
     UsernameLabel.Text = (from u in ctx.Users where u.user_id == id select u.username).FirstOrDefault();
 }
Пример #2
0
        // Form load-close

        private void FormAuth_Load(object sender, EventArgs e)
        {
            ctx = new MPEntities();
            ctx.Users.Load();
            this.ActiveControl = SignInLabel;
        }