public Boolean EditPayment(Int32 personId, Int32 paymentId, DateTime newDate, String newCategoryTitle, String newSubCategoryTitle, Decimal newSum) { try { log.Trace("Entered EditPayment"); String newDateStr = CSDateTimeHelper.ConvertDateToString(newDate); String Uri = _dataControllerAdress + $"EditPayment?personId={personId}" + $"&paymentId={paymentId}" + $"&newDateStr={newDateStr}" + $"&newCategoryTitle={newCategoryTitle}" + $"&newSubCategoryTitle={newSubCategoryTitle}" + $"&newSum={newSum}"; log.Trace("URI = {0}", Uri); HttpResponseMessage responce = _client.PutAsync(Uri, null).Result; Boolean res = responce.Content.ReadAsAsync <Boolean>().Result; log.Trace($"Responce recived in EditPayment res = {res}"); return(res); } catch (Exception ex) { log.Error("Some error occure in CDataRecorderProxy.EditPayment. Message: {0}", ex.Message); return(false); } }
public Int32 AddPayment(Int32 personId, DateTime date, String category, String subCategory, Decimal sum) { try { log.Trace("Entered AddPayment"); String dateStr = CSDateTimeHelper.ConvertDateToString(date); String Uri = _dataControllerAdress + $"AddPayment?personId={personId}" + $"&dateStr={dateStr}" + $"&category={category}" + $"&subCategory={subCategory}" + $"&spended={sum}"; log.Trace("URI = {0}", Uri); HttpResponseMessage responce = _client.PostAsync(Uri, null).Result; Int32 res = responce.Content.ReadAsAsync <Int32>().Result; log.Trace($"Responce recived in AddPayment res = {res}"); return(res); } catch (Exception ex) { log.Error("Some error occure in CDataRecorderProxy.AddPayment. Message: {0}", ex.Message); return(0); } }
public Boolean EditPayment(String token, Int32 paymentId, String newDateStr, String newCategoryTitle, String newSubCategoryTitle, Decimal newSum) { log.Trace("Entered BllFacadeForUIController.EditPayment"); DateTime newDate = CSDateTimeHelper.ConvertStringToDate(newDateStr); return(EditPayment(token, paymentId, newDate, newCategoryTitle, newSubCategoryTitle, newSum)); }
public Int32 AddPayment(String token, String dateStr, String category, String subCategory, Decimal spended) { log.Trace("Entered BllFacadeForUIController.AddPayment"); DateTime date = CSDateTimeHelper.ConvertStringToDate(dateStr); return(AddPayment(token, date, category, subCategory, spended)); }
public Int32 AddPayment(String token, DateTime date, String category, String subCategory, Decimal spended) { try { log.Trace("Entered AddPayment"); String dateStr = CSDateTimeHelper.ConvertDateToString(date); String Uri = _dataControllerAdress + $"AddPayment?token={token}" + $"&dateStr={dateStr}" + $"&category={category}" + $"&subCategory={subCategory}" + $"&spended={spended}"; HttpResponseMessage responce = _client.PostAsync(Uri, null).Result; return(responce.Content.ReadAsAsync <Int32>().Result); } catch (Exception ex) { log.Error("Some error occure in CBllFacadeForUIProxy.AddPayment. Message: {0}", ex.Message); return(0); } }
public Boolean EditPayment(String token, Int32 paymentId, DateTime newDate, String newCategoryTitle, String newSubCategoryTitle, Decimal newSum) { try { log.Trace("Entered EditPayment"); String newDateStr = CSDateTimeHelper.ConvertDateToString(newDate); String Uri = _dataControllerAdress + $"EditPayment?token={token}" + $"&paymentId={paymentId}" + $"&newDateStr={newDateStr}" + $"&newCategoryTitle={newCategoryTitle}" + $"&newSubCategoryTitle={newSubCategoryTitle}" + $"&newSum={newSum}"; HttpResponseMessage responce = _client.PutAsync(Uri, null).Result; return(responce.Content.ReadAsAsync <Boolean>().Result); } catch (Exception ex) { log.Error("Some error occure in CBllFacadeForUIProxy.EditPayment. Message: {0}", ex.Message); return(false); } }