private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                SessaoBusiness sessao = new SessaoBusiness();
                dados.Nome             = txtNome.Text;
                dados.Descricao        = txtTexto.Text;
                dados.FaixaEtaria      = cboFaixaEtaria.SelectedItem == null ? "" : cboFaixaEtaria.SelectedItem.ToString();
                dados.InicioFilme      = Convert.ToDateTime(dtpInicioFilme.Value.Year.ToString() + "-" + dtpInicioFilme.Value.Month.ToString() + "-" + dtpInicioFilme.Value.Day.ToString() + " " + cboIniHor.SelectedItem.ToString() + ":" + cboIniMin.SelectedItem.ToString() + ":00");
                dados.FinalFilme       = Convert.ToDateTime(dtpFimFilme.Value.Year.ToString() + "-" + dtpFimFilme.Value.Month.ToString() + "-" + dtpFimFilme.Value.Day.ToString() + " " + cboFimHor.SelectedItem.ToString() + ":" + cboFimMin.SelectedItem.ToString() + ":00");
                dados.DataLancamento   = Convert.ToDateTime(dtpInicioVendas.Value.Year.ToString() + "-" + dtpInicioVendas.Value.Month.ToString() + "-" + dtpInicioVendas.Value.Day.ToString() + " " + cboVendHor.SelectedItem.ToString() + ":" + cboVendMin.SelectedItem.ToString() + ":00");
                dados.NumeroDeCadeiras = lbCadeiras.SelectedItem.ToString() == "3D" ? 40 : 50;

                sessao.InserirSessao(dados);

                frmSessao x = new frmSessao();
                x.Show();
                this.Close();
            }
            catch
            {
                MessageBox.Show("PREENCHA OS DADOS CORRETAMENTE.", "TOPMOVIE - ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void cRIARToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSessao tela = new frmSessao();

            tela.Show();
        }