コード例 #1
0
 // default constructor
 public DataTableDatabaseHelper(int applicationID, int appPartID, string uri)
 {
     this._applicationID = applicationID;
     this._appPartID = appPartID;
     this._Uri = uri;
     this._webServiceHelper = new DataTableWebServiceHelper(this._applicationID, this._appPartID, this._Uri);
     this._webSchema = this._webServiceHelper.GetTableSchema();
 }
コード例 #2
0
        // method to save current app part data to web service
        public int SaveAppPartDataToWeb(int appPartID)
        {
            // return value
            int retval = 0;

            // get app part object
            AppPart appPart = this.GetAppPart(appPartID);

            // get list of datatable records
            List<DataTableRecord> records = this._appPartDataAdapter.GetAppPartData(appPart.AppPartName);

            // loop through list and post via DataTableWebService
            DataTableWebServiceHelper helper = new DataTableWebServiceHelper(this._applicationID, appPartID, this._baseUri);
            foreach (DataTableRecord record in records)
            {
                helper.SendTableData(record.Columns, record.Values);
            }
            return retval;
        }