Пример #1
0
    public List <ProductSubFormatInfo> UpdateSorting(int p_id, int psf_sorting)
    {
        List <ProductSubFormatInfo> infos = new List <ProductSubFormatInfo>();
        IDataReader reader = db.UpdateSubFormatSorting(p_id, psf_sorting).CreateDataReader();

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

        if (reader.Read())
        {
            info = ProductSubFormatInfo.Populate(reader);
        }
        return(info);
    }
Пример #3
0
    public List <ProductSubFormatInfo> GetFormatWithProduct(int p_id)
    {
        List <ProductSubFormatInfo> infos = new List <ProductSubFormatInfo>();
        IDataReader reader = db.GetFormatWithProduct(p_id).CreateDataReader();

        while (reader.Read())
        {
            infos.Add(ProductSubFormatInfo.Populate(reader));
        }
        return(infos);
    }
Пример #4
0
    public int GetFormatInsertSorting(int p_id)
    {
        int check = 1;
        ProductSubFormatInfo info   = new ProductSubFormatInfo();
        IDataReader          reader = db.GetSubformatInsertSorting(p_id).CreateDataReader();

        if (reader.Read())
        {
            info  = ProductSubFormatInfo.Populate(reader);
            check = info.psf_sorting + 1;
        }
        return(check);
    }