Exemple #1
0
        /// <summary>
        /// 搜索广告结算列表
        /// </summary>
        /// <returns></returns>
        public JsonResult ADCost_search(string id, string target, string channel, string state, string begin, string end)
        {
            DaADCostAccount dal = new DaADCostAccount();
            IList<ADCost> list = dal.getList(id, target, channel, state, begin, end);

            double money = 0.0;
            foreach (ADCost en in list)
                money += en.money;

            var result = new CustomJsonResult();
            result.dateFormat = "yyyy-MM-dd";
            result.Data = new { total = list.Count, rows = list, money = money };
            return result;
        }
Exemple #2
0
        /// <summary>
        /// 获取广告结算列表
        /// </summary>
        /// <returns></returns>
        public JsonResult ADCost_getList()
        {
            DaADCostAccount dal = new DaADCostAccount();
            IList<ADCost> list = dal.getList();

            double money = 0.0;
            foreach (ADCost en in list)
                money += en.money;

            var result = new CustomJsonResult();
            result.dateFormat = "yyyy-MM-dd";
            result.Data = new { total = list.Count, rows = list, money = money };
            return result;
        }
        public JsonResult ADCostAccount_add(string id, string money, string state, string date, string memo)
        {
            ADCostAccount en = new ADCostAccount();
            en.orderID = id;
            en.money = Convert.ToDouble(money);
            en.state = Convert.ToInt32(state);
            en.date = Convert.ToDateTime(date);
            en.memo = memo;

            DaADCostAccount dal = new DaADCostAccount();
            var result = new CustomJsonResult();
            result.Data = dal.add(en);
            return result;
        }
Exemple #4
0
        /// <summary>
        /// 获取广告结算列表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult Order_getADCostList(string id)
        {
            DaADCostAccount dal = new DaADCostAccount();
            IList<ADCost> list = dal.getList(id);

            var result = new CustomJsonResult();
            result.Data = new { total = list.Count, rows = list };
            return result;
        }