public Hotel_comment_info getdata(string hotelId, string IsReply, string page, string startTime, string endTime) { int currentPage = 1; int.TryParse(page, out currentPage); //List<hotel_info> list = new HotelInfoHelp().getHotlList(""); //string hotelIds = string.Empty; //if (string.IsNullOrEmpty(hotelId)) //{ // foreach (var item in list) // { // if (string.IsNullOrEmpty(hotelId)) // hotelId += item.hotel_id; // else // hotelId += "," + item.hotel_id; // } //} //MobileContractClient client = new MobileContractClient(); //client.ClientCredentials.UserName.UserName = help.StringHelper.appSettings("WCFUserName"); //client.ClientCredentials.UserName.Password = help.StringHelper.appSettings("WCFPassWord"); DateTime s = new HotelInfoHelp().getStartDate(startTime); DateTime e = new HotelInfoHelp().getEndDate(endTime); //var coments = client.GetHotelCommentList(new CommentHParamsDTO() { Hotel_id = hotelId, IsReply = false, currentPage = currentPage, pageSize = HotelInfoHelp.pageSize, StartTime = s, EndTime = e }); List<hotel_info> list; object allpage; Hotel_comment_info ment = new Hotel_comment_info(); ment.CommnetList = ment.getComments(hotelId, IsReply, s, e, currentPage, out allpage, out list); ViewData["hotels"] = list; ViewBag.startTime = s.ToString("yyyy-MM-dd"); ViewBag.endTime = e.ToString("yyyy-MM-dd"); int t = string.IsNullOrEmpty(hotelId) ? 0 : Convert.ToInt32(hotelId); ViewBag.currentHotelId = string.IsNullOrEmpty(hotelId) ?0: Convert.ToInt32(hotelId); ViewBag.allPage = allpage; ViewBag.IsReply = IsReply; ViewBag.curentPage = currentPage == 0 ? currentPage + 1 : currentPage; return ment; }