Пример #1
0
        /// <summary>
        /// Gets the related symbol by the diagram id.
        /// </summary>
        /// <param name="id">The diagram id.</param>
        /// <param name="query">The sql query.</param>
        /// <returns>List of Symbol names.</returns>
        private List <string> GetAllRelatedSymbols(int id, string query)
        {
            List <string> ids    = new List <string>();
            IDataReader   reader = db.ExecuteReader(CommandType.Text,
                                                    string.Format(query,
                                                                  id));

            while (reader.Read())
            {
                ids.Add(DataHelper.FixString(reader[0].ToString()));
            }
            reader.Close();
            reader.Dispose();
            return(ids);
        }
 public EntityDTO GetOneEntityByNameAndType(string name, int type)
 {
     return(DataHelper.ExecuteReaderReturnDTO(db, new object[] { DataHelper.FixString(name), type },
                                              GlobalStringResource.Data_GetOneEntityByNameAndType).FirstOrDefault());
 }
 public EntityDTO GetOneEntityByReferenceNumberAndClass(string name, int cls)
 {
     return(DataHelper.ExecuteReaderReturnDTO(db, new object[] { DataHelper.FixString(name), cls },
                                              GlobalStringResource.Data_GetOneEntityByReferenceNumberAndClass).FirstOrDefault());
 }