コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {

            bool error = false;
            epErrorMsg.Clear();

            try
            {
                Customer.CheckEmail(txtNewMail.Text);
            }
            catch (Exception ex)
            {
                error = true;
                epErrorMsg.SetError(txtNewMail, ex.Message);
            }

            try
            {
                Customer.CheckEmail(txtOldMail.Text);
            }
            catch (Exception ex)
            {
                error = true;
                epErrorMsg.SetError(txtOldMail, ex.Message);             
            }

            if (!error)
            {
                try
                {
                    myDatabase1.changeEmail(txtOldMail.Text, txtNewMail.Text);
                    myDatabase1.StoreCSVData(path);
                    btnChange2.BackColor = Color.Chartreuse;
                    
                }
                catch (Exception ex)
                {
                    epErrorMsg.SetError(btnChange2, ex.Message); 
                }
            }
        }
コード例 #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     myDatabase1.changeEmail(txtMail.Text, txtNewMail.Text);
     myDatabase1.StoreCSVData();
 }