private string GetValueFromKnownRowByUniqueMark(zCollectedRowsTable currentRow, string uniqueName, int applicationId) { zColumnTable currentColumn = GetColumnByUniqueMark(uniqueName, applicationId); CompetitionDataContext competitionDataBase = new CompetitionDataContext(); zCollectedDataTable currentCollectedData = (from a in competitionDataBase.zCollectedDataTable where a.FK_CollectedRowsTable == currentRow.ID && a.FK_ColumnTable == currentColumn.ID select a).FirstOrDefault(); if (currentCollectedData == null) { return(""); } DataProcess dataProcess = new DataProcess(); dataProcess.ClearTotalUp(); int dType = (int)currentColumn.DataType; if (dataProcess.IsCellReadWrite(dType)) { return(dataProcess.GetReadWriteString(currentColumn, currentCollectedData)); } if (dataProcess.IsCellCheckBox(dType)) { return(dataProcess.GetBoolDataValue(currentColumn, currentCollectedData).ToString()); } if (dataProcess.IsCellDate(dType)) { return(dataProcess.GetDateDataValue(currentColumn, currentCollectedData).ToString()); } if (dataProcess.IsCellReadOnly(dType)) { return(dataProcess.GetReadOnlyString(currentColumn, currentCollectedData, applicationId, currentRow.ID, 0)); } return(""); }