/// <summary>
        /// evenet handler: login button: for verifying the user entery with the db
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_login_Click(object sender, EventArgs e)
        {
            bool error = false;

            try
            {
                if (!ErrorForTextbox[0])
                {
                    textBox_emaliid.Focus();
                }
                else if (!ErrorForTextbox[1])
                {
                    textBox_password.Focus();
                }
                else
                {
                    byte[] vs = null;
                    int    id = new ClassInteractingWithDB().LoginEmailidPasswordValidation(textBox_emaliid.Text, textBox_password.Text, out vs);
                    // sucessful login
                    if (0 != id)
                    {
                        if (vs != null)
                        {
                            pictureBox_image.Image = Image.FromStream(new MemoryStream(vs));
                        }
                        else
                        {
                            pictureBox_image.Image = pictureBox_image.InitialImage;
                        }
                        OnSucessFullLogin();
                        LoginVal = true;
                    }
                    else
                    {
                        groupBox_gridForm.Visible        = false;
                        groupBox_DB.Visible              = false;
                        label_invalidUserDisplay.Visible = true;
                        textBox_emaliid.Focus();
                        pictureBox_image.Image = pictureBox_image.InitialImage;
                    }
                    ClearTextboxFunction();
                    ClearErrorProviderFunction();
                }
            }
            catch (Exception)
            {
                error = true;
                MessageBox.Show("Application ran into an error");
            }
            finally
            {
                if (error)
                {
                    this.Close();
                }
            }
        }
        /// <summary>
        /// Event handller: for submit button: validate user entry and pass to ClassInteractingWithDB
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_signup_Click(object sender, EventArgs e)
        {
            bool error = false;

            try
            {
                if (!ErrorForTextbox[2])
                {
                    textBox_emailidS.Focus();
                }
                else if (!ErrorForTextbox[3])
                {
                    textBox_passwordS.Focus();
                }
                else if (!ErrorForTextbox[4])
                {
                    textBox_ConfirmPassS.Focus();
                }
                else
                {
                    int id = new ClassInteractingWithDB().SignupEmailIDValidation(textBox_emailidS.Text);
                    // New User
                    if (0 == id)
                    {
                        label_newUserJoin.Visible = false;
                        new EntryForm(textBox_emailidS.Text, textBox_ConfirmPassS.Text).ShowDialog();
                        ClearTextboxFunctionS();
                        textBox_emaliid.Focus();
                        ClearErrorProviderFunctionS();
                    }
                    //Account Exist
                    else
                    {
                        label_newUserJoin.Visible = true;
                        ClearTextboxFunctionS();
                        textBox_emailidS.Focus();
                        ClearErrorProviderFunctionS();
                    }
                }
            }
            catch (Exception)
            {
                error = true;
                MessageBox.Show("Application ran into an error");
            }
            finally
            {
                if (error)
                {
                    this.Close();
                }
            }
        }
        /// <summary>
        /// thread event handler: background worker: for presenting the data stored in the array to combobox
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void backgroundWorker_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            List <KeyValuePair <string, string> > keyValuePairs = new ClassInteractingWithDB().ReteriveEmailIDPassword();

            emailid  = new string[keyValuePairs.Count];
            password = new string[keyValuePairs.Count];
            int i = 0;

            foreach (var element in keyValuePairs)
            {
                emailid[i]  = element.Key;
                password[i] = element.Value;
                i++;
            }
            this.comboBox_SelectedIndexChanged(this, e);
            comboBox.Items.AddRange(emailid);
        }