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); }
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); }
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); }
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); }