/// <summary> /// get the content of product datas from DB to List of ProductElement-s /// </summary> /// <param name="mode">mode of method - true = active / false = deleted</param> /// <returns>list of product-elements</returns> public List <ProductFullRow> getProductsFullList(bool mode) { mdi.openConnection(); List <string[]> tableContent; if (mode) { tableContent = mdi.executeQueryGetStringArrayListOfRows(queryProductsFullTableAct); } else { tableContent = mdi.executeQueryGetStringArrayListOfRows(queryProdtsFullTableDeleted); } mdi.closeConnection(); try { productQuantityList = new List <ProductFullRow>(); foreach (string[] record in tableContent) { productQuantityList.Add(fullRecordToListProdFullElem(record)); } return(productQuantityList); } catch (Exception e) { throw new ErrorServiceCreateDataList("Termékek adtlista megalkotása sikertelen (ModProdList): " + e.Message); } }
/// <summary> /// collects the usrRightGroups from DB in string[] /// </summary> /// <returns>result of collection</returns> public List <string[]> collectTheUserRightGroups() { mdi.openConnection(); List <string[]> result = mdi.executeQueryGetStringArrayListOfRows(queryOfCollectTheUserRightGroups); mdi.closeConnection(); if (result == null) { throw new ErrorServiceCreateDataList("Adatok gyűjtés sikertelen (ModRightRead)"); } else { return(result); } }
/// <summary> /// reads in the active requests /// </summary> /// <returns>Kist of RecordActive container</returns> public List <RequestRecordActive> getActiveRequests() { mdi.openConnection(); List <string[]> result = mdi.executeQueryGetStringArrayListOfRows(queryGetRequestsActive); resultUsers = mdi.executeQueryGetStringArrayListOfRows(queryGetThePoolOfUsersWhoModifyedRecord); mdi.closeConnection(); List <RequestRecordActive> rows = new List <RequestRecordActive>(); try { foreach (string[] rec in result) { rows.Add(convertNormRecord(rec)); } } catch (Exception e) { throw new ErrorServiceCreateDataList("Kérések adatlista megalkotása sikertelen (ModReqNorm) " + e.Message); } return(rows); }
/// <summary> /// fill up the pool of users to define, who is the lates modifier of the diff records /// </summary> private void getTheUserPoolForTableFilling() { mdi.openConnection(); poolOfUsers = mdi.executeQueryGetStringArrayListOfRows(queryToGetTheUserPool); mdi.closeConnection(); }