public int UpdateDataCT(ChiTietPhieuMuon CTPYC) { SqlParameter[] para = { new SqlParameter("@maphieu", CTPYC.MaPM), new SqlParameter("@masach", CTPYC.MaSach), new SqlParameter("@soluong", CTPYC.SoLuong), }; return(conn.ExcuteSQL("SuaCTPM", para)); }
public int SuaCTPM(ChiTietPhieuMuon pm) { SqlParameter[] para = { new SqlParameter("MaPM", pm.MaPM), new SqlParameter("MaSach", pm.MaSach), new SqlParameter("NgayMuon", pm.NgayMuon), new SqlParameter("NgayTra", pm.NgayTra), new SqlParameter("TienPhat", pm.TienPhat) }; return(_connect.ExcuteSQL("SP_SuaCTPM", para)); }
public bool Them(ChiTietPhieuMuon pChiTietPhieuMuon) { try { string sql = string.Format("INSERT INTO ChiTietPhieuMuon " + "VALUES ('{0}','{1}')", pChiTietPhieuMuon.MaSach, pChiTietPhieuMuon.MaPhieuMuon); SqlCommand cmd = new SqlCommand(sql, _sqlConn); cmd.Connection.Open(); cmd.ExecuteNonQuery(); cmd.Connection.Close(); return(true); } catch { return(false); } }
private void detach_ChiTietPhieuMuons(ChiTietPhieuMuon entity) { this.SendPropertyChanging(); entity.ChiTietSach = null; }
partial void DeleteChiTietPhieuMuon(ChiTietPhieuMuon instance);
partial void UpdateChiTietPhieuMuon(ChiTietPhieuMuon instance);
partial void InsertChiTietPhieuMuon(ChiTietPhieuMuon instance);
private void attach_ChiTietPhieuMuons(ChiTietPhieuMuon entity) { this.SendPropertyChanging(); entity.PhieuMuonSach = this; }