Beispiel #1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtUserName.Text.Trim()) && !string.IsNullOrEmpty(txtPassword.Text.Trim()))
     {
         loginbll._username = txtUserName.Text;
         loginbll._password = txtPassword.Text;
         bool isValidUser = loginbll.CheckUser();
         if (isValidUser)
         {
             this.Hide();
             StickyNoteCharts stickyNoteChart = new StickyNoteCharts(loginbll._username);
             stickyNoteChart.ShowDialog();
             this.Close();
         }
         else
         {
             MessageBox.Show("Either username or password is wrong !!!");
             txtUserName.Clear();
             txtPassword.Clear();
         }
     }
 }
Beispiel #2
0
        private void linkShowCharts_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            StickyNoteCharts chart = new StickyNoteCharts(username);

            chart.ShowDialog();
        }