Exemplo n.º 1
0
        /// <summary>
        /// 获取渠道列表
        /// </summary>
        /// <returns></returns>
        public JsonResult drpChannelList()
        {
            DaChannel dal = new DaChannel();
            IList<Channel> channels = dal.getList();

            var result = new CustomJsonResult();
            result.Data = channels;
            return result;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除渠道类别
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        public JsonResult Channel_remove(string id)
        {
            Channel en = new Channel();
            en.id = Convert.ToInt32(id);

            DaChannel dal = new DaChannel();
            var result = new CustomJsonResult();
            result.Data = dal.delete(en);
            return result;
        }
Exemplo n.º 3
0
        public JsonResult Channel_edit(string id, string name, string memo)
        {
            Channel en = new Channel();
            en.id = Convert.ToInt32(id);
            en.name = name;
            en.memo = memo;

            DaChannel dal = new DaChannel();
            var result = new CustomJsonResult();
            result.Data = dal.update(en);
            return result;
        }
Exemplo n.º 4
0
        /// <summary>
        /// 获取渠道类别列表
        /// </summary>
        /// <returns></returns>
        public JsonResult Channel_getList()
        {
            DaChannel dal = new DaChannel();
            IList<Channel> channels = dal.getList();

            var result = new CustomJsonResult();
            result.Data = new { total = channels.Count, rows = channels };
            return result;
        }
Exemplo n.º 5
0
        public JsonResult Channel_add(string name, string memo)
        {
            Channel en = new Channel();
            en.name = name;
            en.memo = memo;

            DaChannel dal = new DaChannel();
            var result = new CustomJsonResult();
            result.Data = dal.add(en);
            return result;
        }