Beispiel #1
0
        /// <summary>
        /// Gets all available product categories
        /// </summary>
        public bool GetAllCategories(CategoryDS categoryDS, int from, int count)
        {
            try
            {
                SqlDataReader reader = null;
                try
                {
                    reader = SqlHelper.ExecuteReader(this.ConnectionString,
                                                     CommandType.StoredProcedure,
                                                     "SelectAllCategories");

                    SqlHelperExtension.Fill(reader, categoryDS, "category", from, count);
                    bool ret = reader.Read();
                    reader.Close();

                    return(ret);
                }
                finally
                {
                    if (reader != null)
                    {
                        ((IDisposable)reader).Dispose();
                    }
                }
            }
            catch (Exception e)
            {
                throw new ApplicationException(ResourceManager.GetString("RES_ExceptionCantGetCategories"), e);
            }
        }
Beispiel #2
0
        public override DataSet Clone()
        {
            CategoryDS cln = ((CategoryDS)(base.Clone()));

            cln.InitVars();
            return(cln);
        }
 /// <summary>
 /// Gets all available product categories
 /// </summary>
 public bool GetAllCategories(CategoryDS categoryDS, int from, int count)
 {
     try
     {
         CategoryDALC categoryDALC = new CategoryDALC();
         return(categoryDALC.GetAllCategories(categoryDS, from, count));
     }
     catch (Exception e)
     {
         throw new ApplicationException(ResourceManager.GetString("RES_ExceptionCantGetCategories"), e);
     }
 }