Esempio n. 1
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            SachDTO s = new SachDTO();

            s.MaSach        = txtMaSach.Text;
            s.TenSach       = txtTenSach.Text;
            s.MaDauSach     = cbbDauSach.SelectedValue.ToString();
            s.TenTacGia     = txtTacGia.Text;
            s.MaTheLoai     = cbbDauSach.SelectedValue.ToString();
            s.TenNhaXuatBan = txtNhaXuatBan.Text;
            s.NamXuatBan    = Int32.Parse(txtNamXuatBan.Text);
            s.SoLuong       = Convert.ToInt32(txtSoLuong.Text);
            s.DonGia        = Convert.ToDecimal(txtGiaTien.Text);
            s.SachHiem      = chkSachHiem.Checked ? true : false;
            sachBUS.Editbook(s);
            MessageBox.Show(Constrant.SuaThanhCong, Constrant.ThongBao, MessageBoxButtons.OK, MessageBoxIcon.Information);
            frmBooks_Load(sender, e);
        }