private void save_btn_Click(object sender, EventArgs e)
        {
            try
            {
                if (note_textBox.Text != "")
                {
                    Note note = new Note();
                    note.date = firstdateTimePicker.Text;
                    note.userName = userName;
                    note.note = note_textBox.Text;
                    if (account_Bo.setNote(note))
                    {
                        MessageBox.Show("Note entry successfully done");
                        note_textBox.Clear();
                        firstdateTimePicker.ResetText();
                    }
                }
                else
                {
                    MessageBox.Show("Please write something");
                }
            }
            catch
            {

            }
        }
        private void Home_Admin_NotesAndReminder_Load(object sender, EventArgs e)
        {
            setFullScreen();
            setMainPanelPosition();
            setRightOptionPanel();
            right_option_timer.Start();

            try
            {
                Account_BO ab = new Account_BO();
                member = ab.getMember(userName);
                memberFirstNameMetroLabel.Text = member.firstName.ToString();
                memberLastNameMetroLabel.Text = member.lastName.ToString();
                MemoryStream ms = new MemoryStream(member.image);
                pictureBox.Image = Image.FromStream(ms);
            }
            catch
            {

            }
            try
            {
                Note note = new Note();
                note.date = last_dateTimePicker.Text;
                note.userName = userName;
                DataSet ds = account_Bo.getNote(note);
                historyGrid.DataSource = ds.Tables[0];
            }
            catch
            {

            }
        }
        private void last_dateTimePicker_CloseUp(object sender, EventArgs e)
        {
            try
            {
                Note note = new Note();
                note.date = last_dateTimePicker.Text;
                note.userName = userName;
                DataSet ds = account_Bo.getNote(note);
                historyGrid.DataSource = ds.Tables[0];
            }
            catch
            {

            }
        }
 private void delete_button_Click(object sender, EventArgs e)
 {
     try
     {
         Note note = new Note();
         note.date = historyGrid.CurrentRow.Cells[0].Value.ToString();
         note.note = historyGrid.CurrentRow.Cells[1].Value.ToString();
         note.userName = userName;
         if (account_Bo.DeleteNote(note))
         {
             MessageBox.Show("Delete successfully done");
             note.date = last_dateTimePicker.Text;
             note.userName = userName;
             DataSet ds = account_Bo.getNote(note);
             historyGrid.DataSource = ds.Tables[0];
         }
     }
     catch
     {
         MessageBox.Show("Please select a item form grid then click delete");
     }
 }