Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            StickyNotes gotoSn = new StickyNotes(_userid);

            gotoSn.ShowDialog();
            this.Close();
        }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (txtcategory.Text != "")
     {
         gotoclasscategory.category123 = txtcategory.Text;
         gotoclasscategory.userid123   = _userid;
         string existing = gotoclasscategory.insertcategory();
         if (existing == "success")
         {
             MessageBox.Show("Created!");
             StickyNotes gotoclassnotes = new StickyNotes(_userid);
         }
         else
         {
             MessageBox.Show(existing);
         }
     }
     else
     {
         MessageBox.Show("Please Dont leave Category Empty.");
     }
 }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtusername.Text != "" && txtpassword.Text != "")
                {
                    loginobject.Classusername = txtusername.Text;
                    loginobject.Classpassword = txtpassword.Text;

                    bool loginornot = loginobject.checkUser().Item1;
                    if (loginornot == true)
                    {
                        this.Hide();
                        int         userid       = loginobject.checkUser().Item2;
                        StickyNotes notesshowing = new StickyNotes(userid);
                        notesshowing.ShowDialog();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show("Either password or Username is incorrect");
                    }
                }
                else
                {
                    MessageBox.Show("Please Do Not leave the Box Empty.");
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                GC.Collect();
            }
        }