Example #1
0
        public List <MetaModels> FetchMetaData(string sSectionName, int id)
        {
            List <MetaModels> _MetaModels = new List <MetaModels>();

            oBuilder    = new SqlConnectionStringBuilder(_connectionString);
            oConnection = new SqlConnection(oBuilder.ConnectionString);
            oDataTable  = new DataTable();

            using (SqlCommand cmd = new SqlCommand())
            {
                try
                {
                    oBuilder     = new SqlConnectionStringBuilder(_connectionString);
                    oConnection  = new SqlConnection(oBuilder.ConnectionString);
                    oDataAdapter = new SqlDataAdapter("Jobs_MasterSelectDataById", oConnection);
                    oDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
                    oDataAdapter.SelectCommand.Parameters.AddWithValue("@SectionName", sSectionName);
                    oDataAdapter.SelectCommand.Parameters.AddWithValue("@SectionId", id);
                    using (oConnection)
                    {
                        oConnection.Open();
                        oDataAdapter.Fill(oDataTable);
                    }
                    foreach (DataRow row in oDataTable.Rows)
                    {
                        MetaModels mm = new MetaModels();
                        mm.Title     = row["FT_NAME"].ToString();
                        mm.Keywords  = row["FT_NAME"].ToString();
                        mm.Descption = row["FT_NAME"].ToString();
                        _MetaModels.Add(mm);
                    }
                }
                catch (Exception ex)
                {
                    ApplicationError.LogErrors(ex);
                    oConnection.Close();
                }
                return(_MetaModels);
            }
        }
 public static void AddParticleEffect(Graphics.ParticleEffect p)
 {
     MetaModels.Add(p.ParticleModel);
 }
 public static void AddEntity(Graphics.Entity e)
 {
     MetaModels.Add((Graphics.Content.MetaModel)e.MainGraphic);
 }