Example #1
0
        /// <summary>
        /// 搜索影院投放统计列表
        /// </summary>
        /// <param name="cinema"></param>
        /// <param name="room"></param>
        /// <param name="version"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        public JsonResult Putin_search(string cinema, string room, string version, string begin, string end, string page, string rows)
        {
            DaPutinInfo dal = new DaPutinInfo();
            IList<PutinListItem> list = dal.getList(cinema, room, version, begin, end, page, rows);
            double[] data = dal.getListOfMoney(cinema, room, version, begin, end);

            var result = new CustomJsonResult();
            result.dateFormat = "yyyy-MM-dd";
            result.Data = new { total = Convert.ToInt32(data[0]), rows = list, money = data[1] };
            return result;
        }
Example #2
0
        /// <summary>
        /// 获取影院投放统计列表
        /// </summary>
        /// <returns></returns>
        public JsonResult Putin_getList(string page, string rows)
        {
            DaPutinInfo dal = new DaPutinInfo();
            IList<PutinListItem> list = dal.getList(page, rows);
            double[] data = dal.getListOfMoney();

            var result = new CustomJsonResult();
            result.dateFormat = "yyyy-MM-dd";
            result.Data = new { total = Convert.ToInt32(data[0]), rows = list, money = data[1] };
            return result;
        }
Example #3
0
        /// <summary>
        /// 根据合同编号获取已经投放的影厅列表
        /// </summary>
        /// <param name="contract"></param>
        /// <returns></returns>
        public JsonResult Order_getPutin(string contract)
        {
            DaPutinInfo dal = new DaPutinInfo();
            IList<PutinInfo> list = dal.getListByContract(contract);

            var result = new CustomJsonResult();
            result.Data = new { total = list.Count, rows = list };
            return result;
        }
Example #4
0
        /// <summary>
        /// 根据订单编号获取该订单投放的影厅列表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult Order_getPutinOfOrderList(string id)
        {
            DaPutinInfo dal = new DaPutinInfo();
            IList<PutinInfo> putins = dal.getList(id);

            var result = new CustomJsonResult();
            result.Data = new { total = putins.Count, rows = putins };
            return result;
        }
Example #5
0
        /// <summary>
        /// 添加投放影厅
        /// </summary>
        /// <param name="contract">合同编号</param>
        /// <param name="order">订单编号</param>
        /// <param name="ids">影厅ID,逗号隔开</param>
        /// <returns></returns>
        public JsonResult Order_addPutin(string contract, string order, string ids)
        {
            string[] id = ids.Split(',');

            DaCinemaRoom dal = new DaCinemaRoom();
            IList<CinemaRoom> rooms = dal.getList(id);

            List<PutinInfo> list = new List<PutinInfo>();
            for (int i = 0; i < rooms.Count; i++)
            {
                PutinInfo en = new PutinInfo();
                en.contractID = contract;
                en.orderID = order;
                en.cinemaID = rooms[i].cinemaID;
                en.cinemaRoomID = rooms[i].id;
                en.roomTypeID = rooms[i].typeID;

                list.Add(en);
            }

            DaPutinInfo dal1 = new DaPutinInfo();
            var result = new CustomJsonResult();
            result.Data = dal1.add(list);
            return result;
        }