示例#1
0
        private void Login()
        {
            if (_isLogin)
            {
                btnDangNhap.Caption = @"Đăng nhập";
                itemLogin.ImageIndex = 14;
                _isLogin = false;
                Text = @"Quản lý tiệm thuốc";
                CloseMdiForm();


                Refresh();
                GC.RemoveMemoryPressure(GC.GetTotalMemory(false));
                GC.Collect();
            }

            var f = new FrmLogin();
            if (f.ShowDialog() == DialogResult.OK)
            {
                btnDangNhap.Caption = @"Đăng xuất";
                itemLogin.ImageIndex = 13;
                _isLogin = true;

                Text = string.Format("Quản lý tiệm thuốc - [{0}]", User.CurrentUser.UserName);
                EasyFormatter.SetCurrentCulture();
                EasyFormatter.SetFormater(barManager);
                //----------- hardcode chỗ này ^^!
                //var ff = new FrmInvoiceList
                //{
                //    MdiParent = this
                //};
                //ff.Show();
            }
            else
                Application.ExitThread();
        }
示例#2
0
        private void Login()
        {
            if (_isLogin)
            {
                itemLogin.Caption = @"Đăng nhập";
                itemLogin.ImageIndex = 14;
                _isLogin = false;
                Text = @"Quản lý bán hàng EasyPOS";
                CloseMdiForm();
                navBarControl1.OptionsNavPane.NavPaneState = NavPaneState.Collapsed;
                ClearGroupInvoice();

                Refresh();
                GC.RemoveMemoryPressure(GC.GetTotalMemory(false));
                GC.Collect();
            }

            var f = new FrmLogin();
            if (f.ShowDialog() == DialogResult.OK)
            {
                itemLogin.Caption = @"Đăng xuất";
                itemLogin.ImageIndex = 13;
                _isLogin = true;

                navBarControl1.OptionsNavPane.NavPaneState = NavPaneState.Expanded;

                Text = string.Format("Quản lý bán hàng EasyPOS - [{0}]", User.CurrentUser.UserName);
                EasyFormatter.SetCurrentCulture();
                EasyFormatter.SetFormater(barManager);
                //----------- hardcode chỗ này ^^!
                var ff = new FrmInvoiceList();
                ff.MdiParent = this;
                ff.Show();

                InitNavGroupInvoice();
            }
            else
                Application.ExitThread();
        }