private FTjson PnlRightJsonfromFt(FT ft, string operationtype) { var p = new FTjson(); p.operationType = operationtype; p.symbolId = ft.BOSymbol; p.asset = ft.counterccy; p.amount = ft.ValueCCY.ToString(); p.timestamp = ((DateTime) ft.TradeDate).ToString("yyyy-MM-dd HH:mm:ss"); p.comment = ft.Comment; p.internalComment = ft.symbol; return p; }
private void BoReconPostPnL(FT ft, string conStr, BOaccount acc, string token) { FTjson bjson; bjson = PnlLeftJsonfromFt(ft, "PNL SETTLEMENT"); string requestFTload = JsonConvert.SerializeObject(bjson); if (!SendJson(requestFTload, conStr + acc.BOaccountId + "/transaction", token)) { LogTextBox.AppendText("\r\n Error in sending Left side VM to BO for fullid: " + ft.fullid); } bjson = PnlRightJsonfromFt(ft, "PNL SETTLEMENT"); requestFTload = JsonConvert.SerializeObject(bjson); if (!SendJson(requestFTload, conStr + acc.BOaccountId + "/transaction", token)) { LogTextBox.AppendText("\r\n Error in sending Right side VM to BO for fullid: " + ft.fullid); } }