コード例 #1
0
ファイル: frmPhim.cs プロジェクト: Hiissu/Phimwf
        private void btSuaTTPhim_Click(object sender, EventArgs e)
        {
            if (tbIdPhim.Text != null)
            {
                PhimDTO p = new PhimDTO();
                p.Id          = tbIdPhim.Text;
                p.Ten         = tbTenPhim.Text;
                p.Theloai     = cbTheLoai.Text;
                p.Quocgia     = cbQuocGia.Text;
                p.DiemDanhGia = Convert.ToDouble(tbDiemDanhGia.Text);

                obj.CapNhatTTPhim(p, p.Id);
                MessageBox.Show("Cập nhật thành công.");

                grvPhim.DataSource = obj.HienThiTatCaPhim();
                XoaDuLieuDaNhap();
            }
            else
            {
                MessageBox.Show("Hãy chọn phim cần cập nhật.");
            }
        }