예제 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (truee && waiting < timetoopen + 1)
            {
                if (waiting == timetoopen)
                {
                    mainform           = new Main_Form();
                    mainform.frm_login = this;
                    var    nv   = (new BLL_NhanVien()).GetObjectFromID(_Login.ReadNV());
                    var    user = (new BLL_User()).GetObjectFromMaNV(nv.MaNV.Trim());
                    string ten  = user == null?nv.TenNV.Trim() : user.TenUser.Trim();

                    mainform.Text = mainform.Text + " (" + ten + " - " + ((new BLL_User()).IsUser(nv.MaNV.Trim()) ? "User)" : "Admin)");
                    mainform._NhanVienLogining = nv;
                    mainform.Show();
                    waiting++;
                }
                else
                {
                    waiting++;
                }
            }
        }