Example #1
0
        public void Insert(AccountPairModel pair)
        {
            try
            {
                _sql.StartTransaction("AccountingConnStr");

                _sql.SaveDataInTransaction("dbo.spAccountPairs_Insert", pair);
            }
            catch (System.Exception)
            {
                _sql.RollBackTransaction();
                throw;
            }
        }
Example #2
0
 public async Task <bool> Post(AccountPairModel pair)
 {
     using (HttpResponseMessage response = await _apiService.ApiClient.PostAsJsonAsync("/api/AccountPairs", pair))
     {
         if (response.IsSuccessStatusCode)
         {
             return(true);
         }
         else
         {
             var error = response.ReasonPhrase;
             return(false);
         }
     }
 }
Example #3
0
 public void Post([FromBody] AccountPairModel pair)
 {
     _data.Insert(pair);
 }