private void button1_Click(object sender, EventArgs e) { IOFile counter = new IOFile(); if (counter.DeleteFilm(textBox1.Text)) { label1.Text = "Film " + textBox1.Text.ToUpperInvariant() + " was deleted"; } else { label1.Text = "We do not have such " + textBox1.Text.ToUpperInvariant() + " film"; } }
private void button1_Click(object sender, EventArgs e) { IOFile counter = new IOFile(); if (counter.GetFilmByName(textBox1.Text)) { label1.Text = "We have " + textBox1.Text.ToUpperInvariant() + " film"; } else { label1.Text = "We do not have " + textBox1.Text.ToUpperInvariant() + " film"; } }
private void button1_Click(object sender, EventArgs e) { IOFile counter = new IOFile(); string price = Convert.ToString(counter.GetFilmPrice(textBox1.Text)); if (price.Equals("0")) { label1.Text = "We do not have " + textBox1.Text + " film"; } else { label1.Text = "We have " + textBox1.Text + " film. Its price = " + price; } }
private void button1_Click(object sender, EventArgs e) { IOFile counter = new IOFile(); label1.Text = "We have " + Convert.ToString(counter.CountGenreFromFile(textBox1.Text)) + " films of genre " + textBox1.Text.ToLower(); }
private void writerToolStripMenuItem_Click(object sender, EventArgs e) { IOFile writer = new IOFile(); writer.WriteToFile(); }
private void DisplayFromFile_Load(object sender, EventArgs e) { IOFile display = new IOFile(); label1.Text = display.ReadFromFile(); }
private void button1_Click(object sender, EventArgs e) { IOFile statistics = new IOFile(); label1.Text = statistics.GetStatisticsPerDate(textBox1.Text); }