public void CreateMovementRecord(MovementRecordForDetail movementRecord)
        {
            List <MovementRecordForDetail> movementRecords = GetMovementRecords();

            movementRecords.Add(movementRecord);
            SaveMovementRecords(movementRecords);
        }
        public static MovementRecordModel Convert(this MovementRecordForDetail mr)
        {
            if (mr == null)
            {
                return(null);
            }

            return(new MovementRecordModel
            {
                Name = mr.Name,
                Date = mr.Date,
                Weight = mr.Weight
            });
        }
Esempio n. 3
0
        public void CreateMovementRecord(MovementRecordForDetail movementRecord)
        {
            DataManagement api = new DataManagement(URL_BASE);

            Dictionary <string, string> header = new Dictionary <string, string>
            {
                { "Authorization", "Bearer " + Token }
            };

            Dictionary <string, object> userData = new Dictionary <string, object>
            {
                { "name", movementRecord.Name },
                { "date", movementRecord.Date },
                { "weight", movementRecord.Weight }
            };

            var content = new StringContent(JsonConvert.SerializeObject(userData), Encoding.UTF8, "application/json");

            api.SendPost("/movementRecords", content, header);
        }
 public void CreateMovementRecord(MovementRecordForDetail movementRecord)
 {
     this._wsWodBoard.CreateMovementRecord(movementRecord);
 }