예제 #1
0
        public List<Category> GetAllCategory()
        {
            List<Category> catList = new List<Category>();
            try
            {
                CycleCount objCycleCount = new CycleCount();

                DataTable dtcat = objCycleCount.GetAllCategory();

                foreach (DataRow drCat in dtcat.Rows)
                {
                    Category objcat = new Category();
                    objcat.CategoryID = (drCat["CategoryID"].ToString());
                    objcat.DisplayName = drCat["Name"].ToString();
                    catList.Add(objcat);
                }

            }
            catch (Exception ex)
            {
                _log.Error("Error:GetAllCategory:: " + ex.Message + Environment.NewLine + ex.StackTrace);
                ThrowFaultError(ex.Message, 200);
            }
            return catList;
        }