public object Create(ForteScheduleItem forteScheduleItem) { ForteException errCreate = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "Create" }; var response = Requestor.PostString(_url, forteScheduleItem, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errCreate.ForteError.ErrorType = "#ERROR#"; errCreate.ForteError.Message = response; throw errCreate; } else if (!(response.IndexOf("NotFound") == -1)) { errCreate.ForteError.ErrorType = "NotFound"; errCreate.ForteError.Message = response; throw errCreate; } else if (!(response.IndexOf("BadRequest") == -1)) { errCreate.ForteError.ErrorType = "BadRequest"; errCreate.ForteError.Message = response; throw errCreate; } else { return response; } }
public object Create(ForteScheduleItem forteScheduleItem) { ForteException errCreate = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "Create" }; var response = Requestor.PostString(_url, forteScheduleItem, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errCreate.ForteError.ErrorType = "#ERROR#"; errCreate.ForteError.Message = response; throw errCreate; } else if (!(response.IndexOf("NotFound") == -1)) { errCreate.ForteError.ErrorType = "NotFound"; errCreate.ForteError.Message = response; throw errCreate; } else if (!(response.IndexOf("BadRequest") == -1)) { errCreate.ForteError.ErrorType = "BadRequest"; errCreate.ForteError.Message = response; throw errCreate; } else { return(response); } }
public ForteScheduleItem Get() { ForteScheduleItem forteScheduleItem = new ForteScheduleItem(); ForteException errGetAddr = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "Get" }; string response = Requestor.Get(_url, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errGetAddr.ForteError.ErrorType = "#ERROR#"; errGetAddr.ForteError.Message = response; throw errGetAddr; } else if (!(response.IndexOf("NotFound") == -1)) { errGetAddr.ForteError.ErrorType = "NotFound"; errGetAddr.ForteError.Message = response; throw errGetAddr; } else if (!(response.IndexOf("BadRequest") == -1)) { errGetAddr.ForteError.ErrorType = "BadRequest"; errGetAddr.ForteError.Message = response; throw errGetAddr; } else { forteScheduleItem = JsonConvert.DeserializeObject <ForteScheduleItem>(response); return(forteScheduleItem); } }
public ForteScheduleItem Get() { ForteScheduleItem forteScheduleItem = new ForteScheduleItem(); ForteException errGetAddr = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "Get" }; string response = Requestor.Get(_url, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errGetAddr.ForteError.ErrorType = "#ERROR#"; errGetAddr.ForteError.Message = response; throw errGetAddr; } else if (!(response.IndexOf("NotFound") == -1)) { errGetAddr.ForteError.ErrorType = "NotFound"; errGetAddr.ForteError.Message = response; throw errGetAddr; } else if (!(response.IndexOf("BadRequest") == -1)) { errGetAddr.ForteError.ErrorType = "BadRequest"; errGetAddr.ForteError.Message = response; throw errGetAddr; } else { forteScheduleItem = JsonConvert.DeserializeObject<ForteScheduleItem>(response); return forteScheduleItem; } }