public void InsertIntoRooms()
        {
            string type   = inOut.ReadRoomType();
            string number = inOut.ReadRoomNumber();
            bool   isAdd  = insert.InsertIntoRooms(type, number);

            if (isAdd == true)
            {
                inOut.PrintMessage(message.MessageInsertRoomTrue(type));
            }
            else
            {
                inOut.PrintMessage(message.MessageInsertRoomFalse(type));
            }
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            InsertControler insert  = new InsertControler();
            MessageApp      message = new MessageApp();

            if (textBox1.Text.Length == 3)

            {
                bool isAdd = insert.InsertIntoRooms(comboBox1.Text, textBox1.Text);
                if (isAdd)
                {
                    MessageBox.Show(message.MessageInsertRoomTrue(comboBox1.Text));
                }
                else
                {
                    MessageBox.Show(MessageApp.EnterCorrectValues);
                }
            }
            else
            {
                MessageBox.Show(MessageApp.EnterCorrectValues);
            }
        }