示例#1
0
        public List<DDDClass.ActivityChangeInfo> DriversActivityChangeInfo(int dataBlockId)
        {
            SQLDB_Records sqldbRecords = new SQLDB_Records(connectionString);
            List<string> DriversActivityChangeInfo_getted = new List<string>();
            List<DDDClass.ActivityChangeInfo> DriversActivityChangeInfo = new List<DDDClass.ActivityChangeInfo>();

            string paramName = "ef_driver_activity_data.activityDailyRecords.activityChangeInfo";
            DDDClass.ActivityChangeInfo activityChangeInfo;
            System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding(); // конвертация строки в массив байт

            byte[] _bytes;

            sqldbRecords.OpenConnection();
            DriversActivityChangeInfo_getted = sqldbRecords.Get_AllParamsArray(dataBlockId, paramName);
            sqldbRecords.CloseConnection();

            foreach (string activity in DriversActivityChangeInfo_getted)
            {
                if (activity != "It's parent array")
                {
                    _bytes = encoding.GetBytes(activity);
                    activityChangeInfo = new DDDClass.ActivityChangeInfo(_bytes);
                    DriversActivityChangeInfo.Add(activityChangeInfo);
                }
            }
            return DriversActivityChangeInfo;
        }