Exemplo n.º 1
0
        public ActionResult RemoveExhiRefHotel(string ids, string exhiId)
        {
            string[]       arrayIds = ids.Split(',');
            JsResultObject re       = new JsResultObject();
            ICriteria      icr      = BaseZdBiz.CreateCriteria <ExhiRefHotelModel>();

            icr.Add(Restrictions.Eq("exhiId", exhiId));
            icr.Add(Restrictions.In("hotelId", arrayIds));
            IList <ExhiRefHotelModel> refHotels = icr.List <ExhiRefHotelModel>();

            foreach (ExhiRefHotelModel refHotel in refHotels)
            {
                re.rowNum += BaseZdBiz.Delete(refHotel, "相关酒店").rowNum;
            }
            re.msg = string.Format("成功删除{0}条记录", re.rowNum);

            return(JsonText(re, JsonRequestBehavior.AllowGet));
        }