Пример #1
0
 private void TestCreateCrossSheetReference()
 {
     xref = new CrossSheetReference();
     xref.SourceSheetId = sheetB.Id.Value;
     xref.StartColumnId = sheetB.Columns[0].Id.Value;
     xref.EndColumnId   = sheetB.Columns[0].Id.Value;
     xref.StartRowId    = sheetB.Rows[0].Id.Value;
     xref.EndRowId      = sheetB.Rows[0].Id.Value;
     xref = smartsheet.SheetResources.CrossSheetReferenceResources.CreateCrossSheetReference(sheetA.Id.Value, xref);
 }
Пример #2
0
        private void TestGetCrossSheetReference()
        {
            Sheet sheet = smartsheet.SheetResources.GetSheet(sheetA.Id.Value, new List <SheetLevelInclusion> {
                SheetLevelInclusion.CROSS_SHEET_REFERENCES
            }, null, null, null, null, null, null);

            Assert.IsTrue(sheet.CrossSheetReferences.Count == 1);

            CrossSheetReference _xref = smartsheet.SheetResources.CrossSheetReferenceResources.GetCrossSheetReference(sheetA.Id.Value, sheet.CrossSheetReferences[0].Id.Value);
        }
Пример #3
0
 /// <summary>
 /// <para>Creates a cross-sheet reference in the given sheet.</para>
 /// <para>Mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/crosssheetreferences</para>
 /// </summary>
 /// <param name="sheetId"> the Id of the sheet </param>
 /// <param name="crossSheetReference"> the cross-sheet reference </param>
 /// <returns> the cross-sheet reference </returns>
 /// <exception cref="System.InvalidOperationException"> if any argument is null or an empty string </exception>
 /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
 /// <exception cref="AuthorizationException"> if there is any problem with the REST API authorization (access token) </exception>
 /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
 /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due to rate limiting) </exception>
 /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
 public virtual CrossSheetReference CreateCrossSheetReference(long sheetId, CrossSheetReference crossSheetReference)
 {
     return(this.CreateResource <CrossSheetReference>("sheets/" + sheetId + "/crosssheetreferences", typeof(CrossSheetReference),
                                                      crossSheetReference));
 }