Exemplo n.º 1
0
        static void run()
        {
            frmLogin frmLogin = new frmLogin();
            frmMain frmMain = new frmMain(); ;
            Thread thread = new Thread(frmMain.KhoiTaoUserControl);
            thread.Start();

            if (frmLogin.ShowDialog() == DialogResult.OK)
            {

                frmMain.NhanVien = frmLogin.NhanVien;
                //try
                //{
                Application.Run(frmMain);
                //}
                //catch (Exception) {}
            }
            else
            {
                return;
            }
        }
Exemplo n.º 2
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            if((from tk in Taikhoans.Accounts
             where tk.UserName == txtUserName.Text && tk.Password == txtPass.Text
             select tk).Count()==0)
            {
                MessageBox.Show("Ban nhap sai!");
            }
            else
            {
                frmMain Main = new frmMain();
                Main.Show();
                this.Hide();
            }

            //if (TK.KTDangNhap(txtUserName.Text, txtPass.Text) == true)
            //{
            //    frmMain Main = new frmMain();
            //    Main.Show();
            //    this.Hide();
            //}
            //else
            //    MessageBox.Show("Sai thông tin đăng nhập");
        }
Exemplo n.º 3
0
 public ClientManager(IBGatewayClientConnectionData iBGatewayClientConnectionData, GUI.frmMain frmMain)
 {
     this.iBGatewayClientConnectionData = iBGatewayClientConnectionData;
     this.frmMain = frmMain;
 }
Exemplo n.º 4
0
 private void loginSuccess(int rs, string username)
 {
     main = new frmMain(rs, username);
     main.Show(this);
     MessageBox.Show("Đăng nhập thành công!");
 }
Exemplo n.º 5
0
        private void btnPractice_Click(object sender, RoutedEventArgs e)
        {
            frmMain main_form = (frmMain)((Grid)this.Parent).Parent;

            main_form.SwitchWindow(ContentInMainForm.Practice_FullScreen);
        }