예제 #1
0
        /// <summary>
        /// 获取广告费结算对象列表
        /// </summary>
        /// <returns></returns>
        public JsonResult drpADTargetList()
        {
            DaADCostTarget dal = new DaADCostTarget();
            IList<ADCostTarget> targets = dal.getList();

            var result = new CustomJsonResult();
            result.Data = targets;
            return result;
        }
예제 #2
0
        /// <summary>
        /// 获取广告费结算对象列表
        /// </summary>
        /// <returns></returns>
        public JsonResult ADCost_getList()
        {
            DaADCostTarget dal = new DaADCostTarget();
            IList<ADCostTarget> targets = dal.getList();

            var result = new CustomJsonResult();
            result.Data = new { total = targets.Count, rows = targets };
            return result;
        }
예제 #3
0
        public JsonResult ADCost_add(string name, string memo)
        {
            ADCostTarget en = new ADCostTarget();
            en.target = name;
            en.memo = memo;

            DaADCostTarget dal = new DaADCostTarget();
            var result = new CustomJsonResult();
            result.Data = dal.add(en);
            return result;
        }
예제 #4
0
        public JsonResult ADCost_edit(string id, string name, string memo)
        {
            ADCostTarget en = new ADCostTarget();
            en.id = Convert.ToInt32(id);
            en.target = name;
            en.memo = memo;

            DaADCostTarget dal = new DaADCostTarget();
            var result = new CustomJsonResult();
            result.Data = dal.update(en);
            return result;
        }
예제 #5
0
        /// <summary>
        /// 删除广告费结算对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult ADCost_remove(string id)
        {
            ADCostTarget en = new ADCostTarget();
            en.id = Convert.ToInt32(id);

            DaADCostTarget dal = new DaADCostTarget();
            var result = new CustomJsonResult();
            result.Data = dal.delete(en);
            return result;
        }