Beispiel #1
0
 public void SaveAssetNote()
 {
     var assetNote = new AssetNote
     {
         AssetId    = 0,
         ActionDate = DateTime.Now,
         EntryDate  = DateTime.Now,
         Status     = true,
         Subject    = "A new note about this asset",
         Note       = "A Note Here."
     };
     var newAssetNote = Api.AssetNoteRequest.Save(assetNote);
 }
Beispiel #2
0
        public AssetNote Save(AssetNote assetNote)
        {
            var url     = string.Format("AssetNote/Save?apikey={0}&companyid={1}", _apiKey, _companyId);
            var request = new RestRequest(url, Method.POST)
            {
                JsonSerializer = new JsonSerializer()
            };

            request.RequestFormat = DataFormat.Json;
            request.AddBody(assetNote);
            var response = _client.Execute <AssetNote>(request);

            return(response.Data);
        }