Пример #1
0
    public GBCategoryInfo GetDataById(int gbc_id)
    {
        GBCategoryInfo info   = new GBCategoryInfo();
        IDataReader    reader = db.GetDataById(gbc_id).CreateDataReader();

        if (reader.Read())
        {
            info = GBCategoryInfo.Populate(reader);
        }
        return(info);
    }
Пример #2
0
    public List <GBCategoryInfo> GetDataBySort(int sort)
    {
        List <GBCategoryInfo> infos  = new List <GBCategoryInfo>();
        IDataReader           reader = db.GetDataBySort(sort).CreateDataReader();

        while (reader.Read())
        {
            infos.Add(GBCategoryInfo.Populate(reader));
        }
        return(infos);
    }
Пример #3
0
    public int InsertSorting()
    {
        GBCategoryInfo info   = new GBCategoryInfo();
        IDataReader    reader = db.InsertSorting().CreateDataReader();

        if (reader.Read())
        {
            info = GBCategoryInfo.Populate(reader);
            return(info.gbc_sort + 1);
        }
        return(1);
    }