public IHttpActionResult SetApprovals(int btr_key, int approval_level) { try { TransferActivityRepository ta = new TransferActivityRepository(db); ta.SetApprovalLevels(btr_key, approval_level); return(Ok()); } catch (Exception exError) { return(BadRequest((new Error(0, exError.Message, "SetApprovals").ToString()))); } }
public IHttpActionResult InitializeApprovals() { try { IEnumerable <KeyValuePair <string, string> > queryString = Request.GetQueryNameValuePairs(); int btr_key = HttpUtils.QSIntValue(queryString, "btr_key"); int approval_level = HttpUtils.QSIntValue(queryString, "approval_level"); TransferActivityRepository ta = new TransferActivityRepository(db); ta.SetApprovalLevels(btr_key, approval_level); return(Ok()); } catch (Exception exError) { return(BadRequest((new Error(0, exError.Message, "InitializeApprovals").ToString()))); } }