private void btnLogin_Click(object sender, EventArgs e)
        {
            string userName = null;
            string password = null;

            if (tbxUserName.Text != null)
            {
                userName = tbxUserName.Text;
            }
            if (tbxPassword.Text != null)
            {
                password = tbxPassword.Text;
            }
            Form form = new AddEventForm(userName);

            if (cboDestination.SelectedIndex != 0)
            {
                form = new AdminReturnForm1(userName);
            }

            if (userName != null && password != null)
            {
                if (!mLC.submit(userName, password, form, this))
                {
                    tbxPassword.Text     = "";
                    lblPassError.Visible = true;
                }
            }
        }
 //Put in Add Event btn functionality 
 private void button4_Click(object sender, EventArgs e)
 {
     //show addEvent form
     AddEventForm form = new AddEventForm(mUser);
     form.Show();
     this.Close();
 }
Esempio n. 3
0
        //Put in Add Event btn functionality
        private void button4_Click(object sender, EventArgs e)
        {
            //show addEvent form
            AddEventForm form = new AddEventForm(mUser);

            form.Show();
            this.Close();
        }
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string userName = null;
            string password = null;

            if (tbxUserName.Text != null)
                userName = tbxUserName.Text;
            if (tbxPassword.Text != null)
                password = tbxPassword.Text;
            Form form = new AddEventForm(userName);
            if (cboDestination.SelectedIndex != 0)
                form = new AdminReturnForm1(userName);

            if (userName != null && password != null)
            {
                if (!mLC.submit(userName, password, form, this))
                { 
                    tbxPassword.Text = "";
                    lblPassError.Visible = true;
                }
            }
        }