Beispiel #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            var user = userLoginRepository.GetByUserAndPassword(txtUser.Text, txtPassword.Text);

            if (user != null)
            {
                Store.ActiveMonth     = Convert.ToInt32(nudMonth.Value);
                Store.ActiveYear      = Convert.ToInt32(nudYear.Value);
                Store.ActiveUser      = user.FullName;
                Store.IsAdministrator = user.IsAdministrator;

                DialogResult = DialogResult.OK;

                userLoginRepository.UpdateLastLogin(user.ID);

                if (frmMain != null)
                {
                    frmMain.Statusbar = "Periode : " + Store.GetMonthName(Store.ActiveMonth)
                                        + " " + Store.ActiveYear + "  |  User : "******"Login gagal, silahkan coba lagi", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }