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