import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { lobmaster } from './lobmaster';

@Injectable({
  providedIn: 'root'
})
export class LobmasterService {

  baseUrl: string = environment.serviceUrl;

  constructor(private httpClient: HttpClient) { }

  
  Get_all(): Observable<any> {
    return this.httpClient.get<any>(this.baseUrl + 'api/LobApi/Getall', {  observe: 'response' });
  }
  Edit_Lob(data:lobmaster):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/LobApi/Edit_Lob', data,  { observe: 'response' });
  } 
  Active_Lob(data:lobmaster):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/LobApi/Active_Lob', data,  { observe: 'response' });
  }

  Add_Lob(data:lobmaster):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/LobApi/Add_Lob', data,  { observe: 'response' });
  }

  // Get_Loblst(lotid:number,jobid:number,tranid:number): Observable<any> {
  //   return this.httpClient.get<any>(this.baseUrl + 'api/LobApi/Get_Loblst?jobid=' + jobid+'&lotid='
  //   + lotid+'&tranid=' +tranid, {  observe: 'response' });
  // } 
   Get_Loblst(): Observable<any> {
    return this.httpClient.get<any>(this.baseUrl + 'api/LobApi/Get_Loblst', {  observe: 'response' });
  }
}
