public ActionResult Datagrid_del_all() { ExhiModel e = new ExhiModel(); DatagridObject datagrid = createExhiDatagrid(BaseModel.STATUS_DELETE, ""); return(JsonText(datagrid, JsonRequestBehavior.AllowGet)); }
public ActionResult Save() { ExhiModel exhi = new ExhiModel(); exhi.status = BaseModel.STATUS_ACTIVATE; exhi = ObjectUtil.Eval(exhi, Request.Params, "", ""); if (string.IsNullOrEmpty(exhi.id)) { exhi.id = exhi.createPk().ToString(); } JsResultObject result = BaseZdBiz.SaveOrUpdate(exhi, "展会"); return(JsonText(result, JsonRequestBehavior.AllowGet)); }
public static string GetPathExhiHotel(ExhiModel exhi) { string pattern = "{0}{1}"; string filePath = System.Configuration.ConfigurationManager.AppSettings["ZDSL.Webapp.path.Exhi.ExhiHotel"]; filePath = string.Format(filePath, exhi.id); if (IsDebug()) { return(string.Format(pattern, WebUtil.GetWebRootPath(), "/Public/Exhi/ExhiHotel?exhiId=" + exhi.id)); } else { return(string.Format(pattern, WebUtil.GetWebRootPath(), filePath)); } }
public ActionResult ExhiHotel(string exhiId) { ExhiModel exhi = BaseZdBiz.Load <ExhiModel>(exhiId); ICriteria icr = BaseZdBiz.CreateCriteria <ExhiRefHotelModel>(); icr.Add(Restrictions.Eq("exhiId", exhiId)); IList <ExhiRefHotelModel> refHotels = icr.List <ExhiRefHotelModel>(); IList <string> ids = new List <string>(); if (refHotels.Count > 0) { ids = ObjectUtil.GetProList(refHotels, "hotelId"); } else { icr = BaseZdBiz.CreateCriteria <HotelModel>(new PagerObject(1, 10)); icr.Add(Restrictions.Eq("recInd", BaseModel.IND_Y)); IList <HotelModel> hotels = icr.List <HotelModel>(); ids = ObjectUtil.GetProList(hotels, "hotelId"); } exhi.hotelIdArray = StringUtil.UnionArray(ids.ToArray(), ','); icr = BaseZdBiz.CreateCriteria <ExhiModel>(); icr.Add(Restrictions.Eq("geoFk", exhi.geoFk)); icr.Add(Restrictions.Not(Restrictions.Eq("id", exhi.id))); icr.AddOrder(Order.Desc("startDate")); IList <ExhiModel> exhis = icr.List <ExhiModel>(); ViewData["refExhis"] = exhis; ViewData[typeof(ExhiModel).Name] = exhi; this.VdHotCity(15); PageSeoModel seo = PublicBiz.getCurPageSeo(); //{0}展会code,{1}:展会名,{2}:展会地址, {3}:展会时间 ,{4}:行业,{5}:内容 this.setPageDesc(string.Format(seo.exhiHotelDesc, exhi.id, exhi.name, exhi.address, exhi.startDate.ToShortDateString(), exhi.busName, exhi.msg).Substring(0, 228)); this.setPageKeyWords(string.Format(seo.exhiHotelKeywords, exhi.id, exhi.name, exhi.address, exhi.startDate.ToShortDateString(), exhi.busName, exhi.msg)); return(View()); }
public JsResultObject submitComment(ExhiModel comment) { return(new JsResultObject()); }