Exemplo n.º 1
0
        private void btnSuaSanPham_Click(object sender, EventArgs e)
        {
            if (dataGridViewQlSanPham.SelectedRows.Count > 0)
            {
                SanPham_DTO sp = (SanPham_DTO)dataGridViewQlSanPham.SelectedRows[0].DataBoundItem;
                sp.TenSP   = txtTenSanPham.Text;
                sp.LoaiSP  = txtLoaiSanPham.Text;
                sp.DonGia  = decimal.Parse(txtDonGia.Text);
                sp.NgayTao = dateTimeNgayTapSP.Value;


                SanPham_BUS spBus = new SanPham_BUS();
                spBus.SuaThongTinSanPham(sp);
                MessageBox.Show("Đã Sửa 1 Sản Phẩm ");
                LoadDSSP();
                ResetSP();
            }
        }