Exemplo n.º 1
0
 public NhaXuatBan(NXB nxb)
 {
     MaSoNXB = nxb.masonxb;
     TenNXB = nxb.ten;
     DiaChi = nxb.diachi;
     SoDienThoai = nxb.sodienthoai;
     SoTaiKhoan = nxb.sotaikhoan;
     TrangThai = nxb.trangthai;
     NganHang = nxb.nganhang;
 }
 public static int add(NhaXuatBan nhaxuatban)
 {
     try
     {
         using(EntitiesDataContext db = new EntitiesDataContext())
         {
             var nxb = new NXB
             {
                 ten = nhaxuatban.TenNXB,
                 diachi = nhaxuatban.DiaChi,
                 sodienthoai = nhaxuatban.SoDienThoai,
                 sotaikhoan = nhaxuatban.SoTaiKhoan,
                 nganhang = nhaxuatban.NganHang
             };
             db.NXBs.InsertOnSubmit(nxb);
             db.SubmitChanges();
             return nxb.masonxb;
         }
     }catch(Exception ex)
     {
         Console.WriteLine(ex.Message);
         return 0;
     }
 }
 partial void DeleteNXB(NXB instance);
 partial void UpdateNXB(NXB instance);
 partial void InsertNXB(NXB instance);
Exemplo n.º 6
0
 public PhieuNhap(PHIEUNHAP phieu, NXB nxb)
     : this(phieu)
 {
     NXB = new NhaXuatBan(nxb);
 }
Exemplo n.º 7
0
 public HoaDonNXB(HOADONNXB hoadon, NXB nxb)
     : this(hoadon)
 {
     NXB = new NhaXuatBan(nxb);
 }
Exemplo n.º 8
0
 public Sach(SACH sach, NXB nxb, LINHVUC linhvuc)
     : this(sach, nxb)
 {
     LinhVucSach = new LinhVuc(linhvuc);
 }
Exemplo n.º 9
0
 public Sach(SACH sach,NXB nxb)
     : this(sach)
 {
     NXB = new NhaXuatBan(nxb);
 }
Exemplo n.º 10
0
 public CongNoNXB(CONGNONXB congno, NXB nxb, SACH sach)
     : this(congno,nxb)
 {
     Sach = new Sach(sach);
 }
Exemplo n.º 11
0
 public CongNoNXB(CONGNONXB congno, NXB nxb)
     : this(congno)
 {
     NXB = new NhaXuatBan(nxb);
 }