Exemplo n.º 1
0
        /// <summary>
        /// 获取影厅列表
        /// </summary>
        /// <param name="id">影院ID</param>
        /// <returns></returns>
        public JsonResult Order_getCinemaRoomList(string id)
        {
            DaCinemaRoom dal = new DaCinemaRoom();
            IList<CinemaRoom> rooms = dal.getList(id);

            var result = new CustomJsonResult();
            result.Data = new { total = rooms.Count, rows = rooms };
            return result;
        }
Exemplo n.º 2
0
        /// <summary>
        /// 根据影院ID获取影厅列表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult drpCinemaRoomList(string id)
        {
            DaCinemaRoom dal = new DaCinemaRoom();
            IList<CinemaRoom> rooms = dal.getList(id);

            var result = new CustomJsonResult();
            result.Data = rooms;
            return result;
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
0
        /// <summary>
        /// 搜索影厅列表
        /// </summary>
        /// <param name="cinema">影院名称</param>
        /// <returns></returns>
        public JsonResult CinemaRoom_search(string cinema)
        {
            DaCinemaRoom dal = new DaCinemaRoom();
            var result = new CustomJsonResult();

            if (cinema.Trim() != "")
                result.Data = dal.getList(cinema);
            else
                result.Data = dal.getList();

            return result;
        }
Exemplo n.º 5
0
        /// <summary>
        /// 删除影厅
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult CinemaRoom_remove(string id)
        {
            CinemaRoom en = new CinemaRoom();
            en.id = Convert.ToInt32(id);

            DaCinemaRoom dal = new DaCinemaRoom();
            var result = new CustomJsonResult();
            result.Data = dal.delete(en);
            return result;
        }
Exemplo n.º 6
0
        public JsonResult CinemaRoom_edit(string id, string name, string cinema, string type, string memo)
        {
            CinemaRoom en = new CinemaRoom();
            en.id = Convert.ToInt32(id);
            en.room = name;
            en.cinemaID = Convert.ToInt32(cinema);
            en.typeID = Convert.ToInt32(type);
            en.memo = memo;

            DaCinemaRoom dal = new DaCinemaRoom();
            var result = new CustomJsonResult();
            result.Data = dal.update(en);
            return result;
        }
Exemplo n.º 7
0
        public JsonResult CinemaRoom_add(string room, string cinemaID, string typeID, string memo)
        {
            CinemaRoom en = new CinemaRoom();
            en.room = room;
            en.cinemaID = Convert.ToInt32(cinemaID);
            en.typeID = Convert.ToInt32(typeID);
            en.memo = memo;

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