Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var service = new AuthenticationServices();
            var filter  = new AuthenticationFilter {
                UserName = "******", Password = "******"
            };
            var container = new ContainerAuthentication {
                Filter = filter
            };
            var res = service.Retrieve(container);

            if (res.Status)
            {
                //USER = txtUsername.Text;
                var obj = (MEMBER_LOGON)res.ResultObj;
                var frm = new FrmMain();
                LOGIN    = obj.USERNAME;
                frm.User = obj.USERNAME;
                frm.Show(this);
                this.Hide();

                OnClearScreen();
            }
            else
            {
                MessageBox.Show(res.Message + res.ExceptionMessage);
            }
        }
Exemplo n.º 2
0
        private void btnLogon_Click(object sender, EventArgs e)
        {
            GetComputerInfomation();
            var service = new AuthenticationServices();
            var filter  = new AuthenticationFilter {
                UserName = txtUsername.Text, Password = txtPassword.Text
            };
            var container = new ContainerAuthentication {
                Filter = filter
            };
            var res = service.Retrieve(container);

            if (res.Status)
            {
                //USER = txtUsername.Text;
                var obj = (MEMBER_LOGON)res.ResultObj;
                var frm = new FrmMain();
                LOGIN    = txtUsername.Text;
                ROLE     = res.ResultObj.ROLE;
                frm.User = txtUsername.Text;
                frm.Show(this);
                this.Hide();

                OnClearScreen();
            }
            else
            {
                MessageBox.Show(res.Message + res.ExceptionMessage);
            }
        }