/// <summary> /// ī�װ�� ������ �����´�. /// </summary> /// <returns></returns> public static CategoryModel GetMyCategorys(Type type) { SqlParameter[] param = { CreateInParam("@PeridoNewIcon", SqlDbType.Int,4, Blog.BlogManager.GetInstance().BlogBaseModel.BlogModel.PeridoNewIcon) }; SqlCommand cmd = GetSpCommand("UBI_GetMyCategorys", param); try { SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection); CategoryModel model = CreateCategoryModelFactory( type ); while (reader.Read()) { CategoryModel item = new CategoryModel(); item.CategoryID = (int)reader["CategoryID"]; item.CategoryTitle = reader["CategoryTitle"].ToString(); item.CategoryLCode = (int)reader["CategoryLCode"]; item.CategoryMCode = (int)reader["CategoryMCode"]; item.CategoryGroup = (int)reader["CategoryGroup"]; item.CategoryStep = (int)reader["CategoryStep"]; item.CategoryOrder = (int)reader["CategoryOrder"]; item.ArticleCount = (int)reader["ArticleCount"]; item.NewIcon = (bool)reader["NewIcon"]; model.Add(item); item = null; } return model; } catch (Exception ex) { throw new UmcDataException("UBI_GetMyCategorys ���ν��� ȣ���� ����", ex.Message); } finally { ReleaseCommand(cmd); } }
public void Add(CategoryModel model) { items.Add(model); }