Exemplo n.º 1
0
 private void Button3_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(textBox2.Text))
     {
         MessageBox.Show("Alanlar boş bırakılamaz. Düzenleyip tekrar deneyiniz.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         groupBox3.Enabled = false;
         Hall hall = HelperHall.GetHallById(Convert.ToInt32(label5.Text));
         hall.Name    = textBox2.Text;
         hall.MovieId = Convert.ToInt32(comboBox2.SelectedValue);
         var a = HelperHall.HallCUD(hall, System.Data.Entity.EntityState.Modified);
         if (a.Item2)
         {
             RefreshTheDatabase();
             textBox1.Clear();
             comboBox2.Text = null;
             MessageBox.Show("Salon düzenlendi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show("Salon düzenlenemedi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            groupBox4.Visible = true;
            groupBox2.Visible = true;
            panel2.Visible    = true;
            Hall hall = HelperHall.GetHallById(Convert.ToInt32(comboBox1.SelectedValue));

            movie = HelperMovie.GetMovieById(hall.MovieId);
            byte[]       imageBytes = Convert.FromBase64String(movie.Banner.ToString());
            MemoryStream ms         = new MemoryStream(imageBytes, 0, imageBytes.Length);

            ms.Write(imageBytes, 0, imageBytes.Length);
            pictureBox8.Image = Image.FromStream(ms, true);
            showtimes         = HelperShowtimes.GetShowtimesByHallIdAndDateAndClock(Convert.ToInt32(comboBox1.SelectedValue), dateTimePicker1.Value, checkedRadioButton);
            RefreshTheSeats();
        }