Ejemplo n.º 1
0
        public void Update_ThanhTien(string MaNhap)
        {
            NhapSach nhapSach = new NhapSach();

            nhapSach = data.NhapSaches.SingleOrDefault(u => u.MaNhap == MaNhap);

            nhapSach.ThanhTien = TinhThanhTien(MaNhap);
        }
Ejemplo n.º 2
0
        public bool _NhapSach(NhapSachDTO nhapSachDTO)
        {
            try
            {
                NhapSach nhapSach = new NhapSach();
                nhapSach.MaNhap    = nhapSachDTO.MaNhap;
                nhapSach.MaNV      = nhapSachDTO.MaNV;
                nhapSach.NgayNhap  = nhapSachDTO.NgayNhap;
                nhapSach.ThanhTien = 0;
                nhapSach.TrangThai = true;
                data.NhapSaches.Add(nhapSach);
                data.SaveChanges();


                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }