예제 #1
0
 private void BtnReset_Click(object sender, EventArgs e)
 {
     TxtBxUName.Clear();
     TxtBxPwd.Clear();
     TxtBxRPwd.Clear();
     TxtBxFName.Clear();
     TxtBxLName.Clear();
     TxtBxEmail.Clear();
     TxtBxSecQ.Clear();
     TxtBxSecA.Clear();
 }
예제 #2
0
        private void BtnReminder_Click(object sender, EventArgs e)
        {
            Reminder r = new Reminder();

            if (CmBxList.SelectedIndex == -1)
            {
                MessageBox.Show("Please select a mode of reminding you.");
                CmBxList.Focus();
            }
            else if (CmBxList.SelectedIndex == 0)
            {
                if (TxtBxPhNo.Text == null || TxtBxPhNo.Text == "")
                {
                    MessageBox.Show("Please enter your cellphone number to send a message to");
                    TxtBxPhNo.Focus();
                }
                else if (TxtBxPhNo.Text.Length != 10)
                {
                    MessageBox.Show("Invalid Phone number. Please try again");
                    TxtBxPhNo.Focus();
                }
                else
                {
                    if (st == 1)
                    {
                        r.MsgOnly(TxtBxPhNo.Text.ToString(), FName, ShpngLst);
                    }
                    else
                    {
                        r.MsgOnly(TxtBxPhNo.Text.ToString(), FName, TLst);
                    }
                }
            }
            else if (CmBxList.SelectedIndex == 1)
            {
                if (TxtBxEmail.Text == "" || TxtBxEmail.Text == null)
                {
                    MessageBox.Show("Please enter your email id.");
                    TxtBxEmail.Focus();
                }
                else if (!TxtBxEmail.Text.Contains("@") && !TxtBxEmail.Text.Contains("."))
                {
                    MessageBox.Show("Invalid Email id. Please try again.");
                    TxtBxEmail.Focus();
                }
                else
                {
                    if (st == 1)
                    {
                        r.EmailOnly(TxtBxEmail.Text.ToString(), FName, ShpngLst);
                    }
                    else
                    {
                        r.EmailOnly(TxtBxEmail.Text.ToString(), FName, TLst);
                    }
                }
            }
            else if (CmBxList.SelectedIndex == 2)
            {
                if (st == 1)
                {
                    r.EmailAndMsg(TxtBxEmail.Text.ToString(), TxtBxPhNo.Text.ToString(), FName, ShpngLst);
                }
                else
                {
                    r.EmailAndMsg(TxtBxEmail.Text.ToString(), TxtBxPhNo.Text.ToString(), FName, TLst);
                }
            }
        }