コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool error = false;
            epErrorMsg.Clear();

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

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

            if (!error)
            {  
                try
                {
                    myDatabase1.changeName(txtboxLname.Text, txtMail.Text);
                    myDatabase1.StoreCSVData(path);
                    btnChange1.BackColor = Color.Chartreuse;
                }
                catch (Exception ex)
                {
                    epErrorMsg.SetError(btnChange1, ex.Message);
                }
            }
        }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     myDatabase.changeName(txtboxLname.Text, txtMail.Text);
     myDatabase.StoreCSVData();
 }