Example #1
0
        private void btnThanhLy_Click(object sender, EventArgs e)
        {
            string masach = cbdsms.Text;
            TLSach tls    = new TLSach();

            tls.MaSach      = cbdsms.Text;
            tls.TenSach     = txtTenSach.Text;
            tls.LyDoThanhLy = cbLyDo.Text;
            tl.saveThanhLySach(tls);
            sm.removeSach(masach);
            ReLoadForm();
        }
Example #2
0
        private void btnSua_Click(object sender, EventArgs e)
        {
            string masach = txtMaSach.Text;
            Sach   s      = new Sach();

            s.MaSach        = txtMaSach.Text;
            s.TenSach       = txtTenSach.Text;
            s.TacGia        = txtTacGia.Text;
            s.TheLoai       = cbTheLoai.Text;
            s.NamXuatBan    = cbNamXuatBan.Text;
            s.NhaXuatBan    = txtNhaXuatBan.Text;
            s.NgayNhap      = dtNgayNhap.Text;
            s.TriGia        = txtTriGia.Text;
            s.NguoiTiepNhan = cbNguoiTiepNhan.Text;
            sm.removeSach(masach);
            sm.saveSach(s);
            ReLoadForm();
        }