コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
 public bool XoaCTNhap(CTNhapNL ct)
 {
     return(dalctn.XoaCTNhap(ct));
 }
コード例 #5
0
 public bool SuaCTNhap(CTNhapNL ct)
 {
     return(dalctn.SuaCTNhap(ct));
 }
コード例 #6
0
 public bool ThemCTNhap(CTNhapNL ct)
 {
     return(dalctn.ThemCTNhap(ct));
 }