コード例 #1
0
        private string GetDefrayType()
        {
            var result = new DefrayTypeBLL(CurrentUserInfo).Query(null, null);

            if (result != null)
            {
                return(result.Select(it => new { it.DefrayTypeId, it.DefrayTypeName }).ToJSON());
            }
            return("[]");
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        public string GetData()
        {
            var service = new DefrayTypeBLL(new SessionManager().CurrentUserLoginInfo);
            IList <DefrayTypeEntity> list = new List <DefrayTypeEntity>();

            list = service.GetAll().ToList();

            //list.Add(new BillStatusModel() { Id = "1", Description = "货到付款" });
            //list.Add(new BillStatusModel() { Id = "2", Description = "在线支付" });

            string content = string.Empty;

            var jsonData = new JsonData();

            jsonData.totalCount = list.Count.ToString();
            jsonData.data       = list;

            content = jsonData.ToJSON();
            return(content);
        }