public void InsertIntoCoutries()
        {
            string coutryName = inOut.ReadCoutryName();
            bool   isAdd      = insert.InsertIntoCoutries(coutryName);

            if (isAdd == true)
            {
                inOut.PrintMessage(message.MessageInsertCoutryTrue(coutryName));
            }
            else
            {
                inOut.PrintMessage(message.MessageInsertCoutryFalse(coutryName));
            }
        }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         if (textBox1.Text != string.Empty)
         {
             bool isAdd = controler.InsertIntoCoutries(textBox1.Text);
             if (isAdd)
             {
                 MessageBox.Show(message.MessageInsertCoutryTrue(textBox1.Text));
             }
             else
             {
                 MessageBox.Show(message.MessageInsertCoutryFalse(textBox1.Text));
             }
         }
         else
         {
             MessageBox.Show(MessageApp.EnterCorrectValues);
         }
         Clear();
     }
     else if (radioButton2.Checked)
     {
         if (textBox1.Text != string.Empty && textBox2.Text != string.Empty)
         {
             bool isAdd = controler.InsertIntoTowns(textBox2.Text, textBox1.Text);
             if (isAdd)
             {
                 MessageBox.Show(message.MessageInsertTownTrue(textBox1.Text, textBox2.Text));
             }
             else
             {
                 MessageBox.Show(message.MessageInsertTownFalse(textBox1.Text, textBox2.Text));
             }
         }
         else
         {
             MessageBox.Show(MessageApp.EnterCorrectValues);
         }
         Clear();
     }
 }