public bool XoaCTNhap(CTNhapNL ct) { string[] param = { "@MaPN", "@MaNL" }; object[] values = { ct.MaPhieuNhap, ct.MaNL }; string query = "Delete from tblCTNhapNL where MaPhieuNhap=@MaPN and MaNL=@MaNL"; return(db.ExecuteNonQueryPara(query, param, values)); }
public bool SuaCTNhap(CTNhapNL ct) { string[] param = { "@MaPN", "@MaNL", "@SoLuong", "@DonGia", "@ThanhTien" }; object[] values = { ct.MaPhieuNhap, ct.MaNL, ct.SoLuong, ct.DonGia, ct.ThanhTien }; string query = "Update tblCTNhapNL set SoLuong=@SoLuong, DonGia=@DonGia,ThanhTien=@ThanhTien where MaPhieuNhap=@MaPN and MaNL=@MaNL"; return(db.ExecuteNonQueryPara(query, param, values)); }
public bool ThemCTNhap(CTNhapNL ct) { string[] param = { "@MaPN", "@MaNL", "@TenNL", "@SoLuong", "@DonViTinh", "@DonGia", "@ThanhTien" }; object[] values = { ct.MaPhieuNhap, ct.MaNL, ct.TenNL, ct.SoLuong, ct.DonViTinh, ct.DonGia, ct.ThanhTien }; string query = "Insert into tblCTNhapNL(MaPhieuNhap,MaNL,TenNL,SoLuong,DonViTinh,DonGia,ThanhTien) values (@MaPN,@MaNL,@TenNL,@SoLuong,@DonViTinh,@DonGia,@ThanhTien)"; return(db.ExecuteNonQueryPara(query, param, values)); }
public bool XoaCTNhap(CTNhapNL ct) { return(dalctn.XoaCTNhap(ct)); }
public bool SuaCTNhap(CTNhapNL ct) { return(dalctn.SuaCTNhap(ct)); }
public bool ThemCTNhap(CTNhapNL ct) { return(dalctn.ThemCTNhap(ct)); }