Exemple #1
0
        protected void btnAddPhim_Click(object sender, EventArgs e)
        {
            PhimBUS pBUS = new PhimBUS();
            //int count = pBUS.SoLuongPhim();
            //string map = "";
            //if (count / 10 == 0)
            //    map = "P00" + count.ToString();
            //else if (count / 100 == 0)
            //    map = "P0" + count.ToString();
            //else
            //    map = "P" + count.ToString();
            PhimDTO ph = new PhimDTO();

            ph.Ten           = tbTenPhim.Text;
            ph.TheLoai       = tbTheLoai.SelectedValue;
            ph.DaoDien       = tbDaoDien.Text;
            ph.DienVien      = tbDienVien.Text;
            ph.GioiHanDoTuoi = Convert.ToInt32(tbGHDT.Text);
            ph.NoiDung       = tbNoiDung.Text;
            ph.NamSanXuat    = Convert.ToInt32(tbNamSX.Text);
            ph.Poster        = tbPoster.Text;
            ph.Trailer       = tbTrailer.Text;
            pBUS.ThemPhim(ph);

            string strBuilder = "<script language='javascript'>alert('" + "Thêm thành công" + "')</script>";

            Response.Write(strBuilder);
            ResetTextBoxes();
            FilGVDanhSachPhim();
        }