Exemplo n.º 1
0
        private void button_deleteCategoryRoom_Click(object sender, EventArgs e)
        {
            CategoryRoom categoryRoom = FormToCategoryRoom();

            if (categoryRoom.ID == 0)
            {
                MessageBox.Show("Please choice a CategoryRoom to delete");
            }
            else
            {
                if (MessageBox.Show("Are you sure to delete the categoryRoom: " + categoryRoom.CategoryRoomName + " " + " ? ", "Be Careful", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading) == System.Windows.Forms.DialogResult.Yes)
                {
                    categoryRoom.Delete();
                    Clean_Form();
                    CategoryRoomArrToForm(null);
                }
            }
        }