public HttpResponseMessage UpdateTBAinformationInDB(ContractConsultant cc, IEnumerable <ContractConsultant> CslTBAassignment) { var currentTBA = cc.LocationsAssigned.FirstOrDefault(); HttpResponseMessage result = null; // 17/08/2017 : added the case to unassign a TBA : cc.INITIALS == null // new way: post then if failed put // 5 cases: // new csl , new TBA // new csl , exist TBA // exist csl , new TBA // exist csl , exist TBA // csl null , exist TBA (unassignment) // create consultant if not in DB, ignore TBA creation or update or unassigned if (cc.INITIALS != null) { cc.LocationsAssigned = null; APIuse.PostToWebAPI(compDBapi, "ContractConsultants", cc); } // create or update TBA assignment result = APIuse.PostToWebAPI(compDBapi, "TBALocations", currentTBA); if (!result.IsSuccessStatusCode) { result = APIuse.PutToWebAPI(compDBapi, "TBALocations", currentTBA, currentTBA.CODE); } return(result); }
public virtual async Task ExtractAllBStagesAsync() { // extract all the booking stages string API_Controller = "bstages"; listBStage = await APIuse.GetFromWebAPIAsync <BStage>(compDBapi, API_Controller); }
public virtual void ExtractAllBStages() { // extract all the booking stages string API_Controller = "bstages"; listBStage = APIuse.GetFromWebAPI <BStage>(compDBapi, API_Controller); }
public ActionResult Index() { // Display the Log_Update table on the index view // this table should only be visible by myself and JM IEnumerable <Log_Update> listUpdates = APIuse.Extract_Log_Update(User.Identity.Name); if (listUpdates != null) { ViewData["listUpdates"] = listUpdates; } Dictionary <string, Dictionary <string, string> > CalendarLinksModel = ReturnCalendarLinksModel(); return(View(CalendarLinksModel)); }
public async Task <IEnumerable <ContractConsultant> > GetConsultantsTBAsLocationsAsync() { string API_Controller = "ContractConsultants"; return(await APIuse.GetFromWebAPIAsync <ContractConsultant>(compDBapi, API_Controller)); }
public IEnumerable <ContractConsultant> GetConsultantsTBAsLocations() { string API_Controller = "ContractConsultants"; return(APIuse.GetFromWebAPI <ContractConsultant>(compDBapi, API_Controller)); }