Exemple #1
0
        private void btnLogon_Click(object sender, EventArgs e)
        {
            var bll = new Pol_UserBLL();
            var sss = bll.CheckLogin(txtUser.Text, txtPass.Text);

            if (sss != null)
            {
                BasePRE._sss = sss;

                //var x = BaseBLL._pol_UserBLL.GetRights(sss.User.Id);
                //var y = BaseBLL._pol_UserBLL.GetRights(sss.User.Id, this.GetType().Name);

                NotifyAfterLogon();
                Close();
            }
            else BasePRE.ShowMessage(STR_ERR, STR_LOGIN);
        }
Exemple #2
0
        private void btnLogon_Click(object sender, EventArgs e)
        {
            try
            {
                if (Global.Setting)
                {
                    if (txtUser.Text == "system" && txtPass.Text == "@sm13579208")
                    {
                        DialogResult = DialogResult.OK;
                        return;
                    }
                    else XtraMessageBox.Show(STR_ERR, STR_LOGIN);

                    return;
                }

                var bll = new Pol_UserBLL();
                var sss = bll.CheckLogin(txtUser.Text, txtPass.Text);

                if (sss != null)
                {
                    Global.Session = sss;
                    NotifyAfterLogon();
                    Close();
                }
                else XtraMessageBox.Show(STR_ERR, STR_LOGIN);
            }
            catch { throw new Exception(); }
        }