Example #1
0
        public string GetCategoryType(string userId, int categoryRate)
        {
            UserCategoryTableBLL bll = new UserCategoryTableBLL();

            var lists = bll.GetUserCategoryList(1, categoryRate);

            var results = new List <dynamic>();

            foreach (DataRow row in lists.Rows)
            {
                dynamic model = new ExpandoObject();
                model.value = row["CategoryTypeID"].ToString();
                model.text  = row["CategoryTypeName"].ToString();

                results.Add(model);
            }

            return(Newtonsoft.Json.JsonConvert.SerializeObject(results));
        }