Beispiel #1
0
        private void btnXacNhan_Click(object sender, EventArgs e)
        {
            string            err        = "";
            Login             lg         = new Login();
            CCancelled        GCancelled = new CCancelled();
            LoginCheck_Result Info       = lg.Log(tbUser.Text, tbPass.Text, ref err);

            if (Info != null && Info.Service == "TopManager")
            {
                for (int i = 0; i < ID_Food.Count; i++)
                {
                    if (Amount[i] > 0)
                    {
                        GCancelled.TransprotDTBillToCancelled(ID_Bill, ID_Food[i], ID_Employee, Amount[i], cbReason.Text, ref err);
                    }
                }
                Status = true;
                this.Close();
            }
            else
            {
                MessageBox.Show("Sai thông tin tài khoản hoặc bạn đang không sử dụng tài khoản của Manager. Vui lòng nhập lại!");
                Status = false;
            }
        }
Beispiel #2
0
        public LoginCheck_Result Log(string User, string Pass, ref string err)
        {
            LoginCheck_Result data = new LoginCheck_Result();

            data = account.Login(User, Pass);
            return(data);
        }
Beispiel #3
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Login             LG      = new Login();
            string            err     = "";
            LoginCheck_Result account = LG.Log(tbUser.Text, tbPass.Text, ref err);

            if (account != null)
            {
                FMenuQuanLy Form2 = new FMenuQuanLy(account.ID, account.Name, account.Service);
                this.Hide();
                Form2.ShowDialog();
                this.Show();
                Form2 = null;
            }
            else
            {
                MessageBox.Show("Không đúng tên người dùng / mật khẩu !!!",
                                "Thông báo");
                tbUser.Focus();
            }
        }
Beispiel #4
0
        public LoginCheck_Result Login(string User, string Pass)
        {
            LoginCheck_Result list = qLy.LoginCheck(User, Pass).SingleOrDefault();

            return(list);
        }