예제 #1
0
        /// <summary>
        /// Initializes a new instance of the LkDataCRUD class.
        /// </summary>
        /// <param name="crudOperationResult">The string result of the CRUD operation execution.</param>
        public LkDataCRUD(string crudOperationResult) : base(crudOperationResult)
        {
            this.TotalItems = StringFunctions.ExtractTotalRecords(crudOperationResult);

            string[] lstIdDicts         = StringFunctions.ExtractRecordsIdDicts(crudOperationResult);
            string[] lstDictionaries    = StringFunctions.ExtractRecordsDicts(crudOperationResult);
            string[] lstCalculatedDicts = StringFunctions.ExtractRecordsCalculatedDicts(crudOperationResult);
            this.LkRecords = new LkItems(lstIdDicts, lstDictionaries, lstCalculatedDicts);

            string[] lstRecords           = StringFunctions.ExtractRecords(crudOperationResult);
            string[] lstRecordIds         = StringFunctions.ExtractRecordIds(crudOperationResult);
            string[] lstOriginalRecords   = StringFunctions.ExtractOriginalRecords(crudOperationResult);
            string[] lstRecordsCalculated = StringFunctions.ExtractRecordsCalculated(crudOperationResult);
            for (int i = 0; i < lstRecordIds.Length; i++)
            {
                string record         = (lstRecords.Length == lstRecordIds.Length ? lstRecords[i] : "");
                string originalRecord = (lstOriginalRecords.Length == lstRecordIds.Length ? lstOriginalRecords[i] : "");
                string calculateds    = (lstRecordsCalculated.Length == lstRecordIds.Length ? lstRecordsCalculated[i] : "");
                LkItem lkRecord       = new LkItem(lstRecordIds[i], record, calculateds, originalRecord);
                this.LkRecords.Add(lkRecord);
            }
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the LkDataCRUD class.
 /// </summary>
 public LkDataCRUD() : base("")
 {
     this.LkRecords  = new LkItems();
     this.TotalItems = 0;
 }