예제 #1
0
        public ActionResult DoCancelRebate(string remark)
        {
            MemberModel member  = BaseZdBiz.Load <MemberModel>(this.getAuthMember().id);
            DataBiz     dataBiz = DataBiz.GetInstant();

            /*
             * MemberRewardLogModel rewardLog = new MemberRewardLogModel();
             * rewardLog.memberFk = member.id;
             * rewardLog.remark = remark;
             * rewardLog.moblie = moblie;
             * rewardLog.exchangeType = exchangeType;
             * rewardLog.exchangeStatus = MemberRewardLogModel.EXCHANGE_STATUS_UNEXCHANGE;
             * rewardLog.setPk(rewardLog.createPk());
             * rewardLog.amount = dataBiz.getMemberCurAmount(member);
             * rewardLog.createDate = DateTime.Now;
             * */
            member.rebateInd = BaseModel.IND_N;
            JsResultObject re = BaseZdBiz.Update(member, "");


            if (re.code == JsResultObject.CODE_SUCCESS)
            {
                this.SetResult(JsResultObject.CODE_ALERT, "兑换请求已取消,欢迎随时申请兑换", true);
            }
            else
            {
                this.SetResult(JsResultObject.CODE_ALERT, "兑换取消失败", true);
            }

            return(Redirect(this.getPreUrl()));
        }
예제 #2
0
        public ActionResult DoDeal(int id)
        {
            OrderModel order   = BaseZdBiz.Load <OrderModel>(id);
            DataBiz    dataBiz = DataBiz.GetInstant();

            JsResultObject re = new JsResultObject();

            if (StringUtil.IsIn(order.orderStatus, new string[] { OrderModel.ORDER_STATUS_COMMENTED, OrderModel.ORDER_STATUS_DEAL, OrderModel.ORDER_STATUS_CANCEL }))
            {
                re.code = JsResultObject.CODE_ERROR;
                re.msg  = string.Format("订单{0} 状态为 {1},不能取消"
                                        , order.id
                                        , OrderModel.GetDictOrderStatus()[order.orderStatus]
                                        );
            }
            else
            {
                order.orderStatus = OrderModel.ORDER_STATUS_DEAL;
                re = BaseZdBiz.Update(order, "");
                if (re.code == JsResultObject.CODE_SUCCESS)
                {
                    re.title = "订单处理成功";
                    re.msg   = string.Format("订单:{0} 成交完成", id);
                }
                else
                {
                    re.title = "订单处理失败";
                }
            }
            return(JsonText(re, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public ActionResult ListMemberAccount(string memberId)
        {
            MemberModel member = BaseZdBiz.Load <MemberModel>(memberId);

            ViewData[typeof(MemberModel).Name] = member;
            return(View());
        }
예제 #4
0
        //
        // GET: /Geo/

        public ActionResult Index(string cityName, string geoClId, string geoDId)
        {
            GeoBiz geoBiz = GeoBiz.GetInstant();

            cityName = ObjectUtil.Parse(cityName, "广州");
            GeoModel geo = geoBiz.GetGeoByCityName(cityName);

            if (geo == null)
            {
                geo = geoBiz.GetGeoByCityName("广州");
            }

            GeoLocationModel geoLocation = null;
            PageSeoModel     seo         = PublicBiz.getCurPageSeo();

            this.setPageDesc(string.Format(seo.cityDesc, geo.cityCode, geo.cityName));
            this.setPageKeyWords(string.Format(seo.cityKeywords, geo.cityCode, geo.cityName));
            if (!string.IsNullOrEmpty(geoClId))
            {
                geoLocation = BaseZdBiz.Load <GeoCommercialLocationModel>(Restrictions.Eq("geoFk", geo.id), Restrictions.Eq("locationId", geoClId));
                this.setPageDesc(string.Format(seo.cityClDesc, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
                this.setPageKeyWords(string.Format(seo.cityClKeywords, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
            }
            else if (!string.IsNullOrEmpty(geoDId))
            {
                geoLocation = BaseZdBiz.Load <GeoDistrictsModel>(Restrictions.Eq("geoFk", geo.id), Restrictions.Eq("locationId", geoDId));
                this.setPageDesc(string.Format(seo.cityDDesc, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
                this.setPageKeyWords(string.Format(seo.cityDKeywords, geo.cityCode, geo.cityName, geoLocation.locationId, geoLocation.name));
            }

            ViewData[typeof(GeoLocationModel).Name] = geoLocation;
            ViewData[typeof(GeoModel).Name]         = geo;
            return(View());
        }
예제 #5
0
        public ActionResult DoUnBind(string t)
        {
            MemberModel member = BaseZdBiz.Load <MemberModel>(this.getAuthMember().id);
            string      tName  = "";

            if (t == "weibo")
            {
                tName           = "新浪微博";
                member.weiboUid = string.Empty;
            }
            else if (t == "renren")
            {
                tName            = "人人网";
                member.renrenUid = string.Empty;
            }
            else if (t == "kaixin")
            {
                tName            = "开心网";
                member.kaixinUid = string.Empty;
            }
            BaseZdBiz.Update(member, "");
            WebUtil.SetSessionAttr(typeof(MemberModel).Name, member);
            this.SetResult(JsResultObject.CODE_ALERT, string.Format("成功解除与{0}的绑定", tName), true);
            return(View("Edit"));
        }
예제 #6
0
        public ActionResult DoSetHotBrand(string brandId)
        {
            BrandModel     e       = BaseZdBiz.Load <BrandModel>(brandId);
            DataBiz        dataBiz = DataBiz.GetInstant();
            JsResultObject result  = dataBiz.setHotBrand(e, 0, "");

            return(JsonText(result, JsonRequestBehavior.AllowGet));
        }
예제 #7
0
        public ActionResult DoRecommend(string hotelId)
        {
            HotelModel     hotel   = BaseZdBiz.Load <HotelModel>(hotelId);
            DataBiz        dataBiz = DataBiz.GetInstant();
            JsResultObject result  = dataBiz.recommendHotel(hotel, 0, "");

            return(JsonText(result, JsonRequestBehavior.AllowGet));
        }
예제 #8
0
        public ActionResult DivMemberCommentEdit(int orderId)
        {
            OrderModel       order = BaseZdBiz.Load <OrderModel>(orderId);
            HotelDetailModel hotel = BaseZdBiz.Load <HotelDetailModel>(order.hotelId);

            ViewData[typeof(OrderModel).Name]       = order;
            ViewData[typeof(HotelDetailModel).Name] = hotel;
            return(View());
        }
예제 #9
0
        public ActionResult SaveHotelDetail(string id)
        {
            HotelDetailModel e = BaseZdBiz.Load <HotelDetailModel>(id);

            e = ObjectUtil.Eval <HotelDetailModel>(e, Request.Params, "", "");
            JsResultObject re = BaseZdBiz.SaveOrUpdate(e, "酒店详细信息");

            return(JsonText(re, JsonRequestBehavior.AllowGet));
        }
예제 #10
0
        public ActionResult DoCancel(int orderId)
        {
            MemberModel    member  = this.getAuthMember();
            DataBiz        dataBiz = DataBiz.GetInstant();
            OrderModel     order   = BaseZdBiz.Load <OrderModel>(orderId);
            JsResultObject re      = dataBiz.cancelOrder(order, "", "");

            this.SetResult(re, true);
            IList <OrderModel> orders = BaseZdBiz.List <OrderModel>(Restrictions.Eq("memberFk", member.id));

            ViewData[typeof(OrderModel).Name] = orders;
            return(View("Index"));
        }
예제 #11
0
        public ActionResult DoRebate(string memberId, int rebateAmount, string remark)
        {
            JsResultObject re      = new JsResultObject();
            MemberModel    member  = BaseZdBiz.Load <MemberModel>(memberId);
            DataBiz        dataBiz = DataBiz.GetInstant();

            re = dataBiz.rebateReward(member, rebateAmount, remark);
            if (re.code == JsResultObject.CODE_SUCCESS)
            {
                member.rebateInd = BaseModel.IND_N;
                re = BaseZdBiz.Update(member, "会员");
            }
            return(JsonText(re, JsonRequestBehavior.AllowGet));
        }
예제 #12
0
        public ActionResult DoCancelOrder(int cancelOrderId, string cancelCode, string cancelReason)
        {
            DataBiz        dataBiz = DataBiz.GetInstant();
            OrderModel     order   = BaseZdBiz.Load <OrderModel>(cancelOrderId);
            JsResultObject re      = new JsResultObject();

            if (StringUtil.IsIn(order.orderStatus, new string[] { OrderModel.ORDER_STATUS_COMMENTED, OrderModel.ORDER_STATUS_DEAL }))
            {
                re.code = JsResultObject.CODE_ERROR;
                re.msg  = string.Format("订单{0} 状态为 {1},不能取消"
                                        , order.id
                                        , OrderModel.GetDictOrderStatus()[order.orderStatus]
                                        );
            }
            else
            {
                re = dataBiz.cancelOrder(order, cancelCode, cancelReason);
            }
            return(JsonText(re, JsonRequestBehavior.AllowGet));
        }
예제 #13
0
        public ActionResult DoSubmitToElong(int id)
        {
            OrderModel order = BaseZdBiz.Load <OrderModel>(id);
            //order = WebUtil.Eval(order, "", "");
            JsResultObject re      = new JsResultObject();
            DataBiz        dataBiz = DataBiz.GetInstant();

            if (StringUtil.IsIn(order.orderStatus, new string[] { OrderModel.ORDER_STATUS_COMMENTED, OrderModel.ORDER_STATUS_DEAL }))
            {
                re.code = JsResultObject.CODE_ERROR;
                re.msg  = string.Format("订单{0} 状态为 {1},不能再处理"
                                        , order.id
                                        , OrderModel.GetDictOrderStatus()[order.orderStatus]
                                        );
            }
            else
            {
                re = dataBiz.submitOrder(order, true);
            }
            return(JsonText(re, JsonRequestBehavior.AllowGet));
        }
예제 #14
0
        public ActionResult BrandHotel(string brandId)
        {
            ICriteria icr = BaseZdBiz.CreateCriteria <HotelDetailModel>();

            icr.Add(Restrictions.Eq("brandId", brandId));
            IList <HotelDetailModel> hotels = icr.List <HotelDetailModel>();

            ViewData[typeof(HotelDetailModel).Name] = hotels;

            BrandModel brand = BaseZdBiz.Load <BrandModel>(brandId);

            ViewData[typeof(BrandModel).Name] = brand;
            this.VdHotBookingHotel(10);
            this.VdHotCity(15);
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            //{0}品牌code,{1}:品牌长名,{2}:品牌短名, {3}:拼音
            this.setPageDesc(string.Format(seo.brandHotelDesc, brand.brandID, brand.brandNameLong, brand.brandName, brand.brandPinYin));
            this.setPageKeyWords(string.Format(seo.brandHotelKeywords, brand.brandID, brand.brandNameLong, brand.brandName, brand.brandPinYin));
            return(View());
        }
예제 #15
0
        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());
        }
예제 #16
0
        public ActionResult NewsHotel(string newsId)
        {
            NewsModel news = BaseZdBiz.Load <NewsModel>(newsId);

            ICriteria icr = BaseZdBiz.CreateCriteria <NewsRefHotelModel>();

            icr.Add(Restrictions.Eq("newsId", newsId));
            IList <NewsRefHotelModel> refHotels = icr.List <NewsRefHotelModel>();
            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");
            }
            news.hotelIdArray = StringUtil.UnionArray(ids.ToArray(), ',');

            icr = BaseZdBiz.CreateCriteria <NewsModel>(new PagerObject(1, 5));
            icr.Add(Restrictions.Not(Restrictions.Eq("id", newsId)));
            icr.AddOrder(Order.Desc("deployDate"));
            IList <NewsModel> refNews = icr.List <NewsModel>();

            ViewData["refNews"] = refNews;
            ViewData[typeof(NewsModel).Name] = news;
            this.VdHotCity(15);

            //{0}新闻code,{1}:新闻主题,{2}:新闻日期 ,{3}:新闻内容
            PageSeoModel seo = PublicBiz.getCurPageSeo();

            this.setPageDesc(string.Format(seo.newsHotelDesc, news.id, news.title, news.deployDate.ToShortDateString(), news.context).Substring(0, 228));
            this.setPageKeyWords(string.Format(seo.newsHotelKeywords, news.id, news.title, news.deployDate.ToShortDateString(), news.context));
            return(View());
        }
예제 #17
0
        public ActionResult Tree(string parentId)
        {
            AdminBiz adminBiz = AdminBiz.GetInstant();
            UserModel user = WebUtil.GetSessionAttr<UserModel>(AdminBiz.SESSION_KEY_USER);
            if (user == null)
            {
                //return new List<TreeNodeObject>();
            }

            RoleModel role =BaseZdBiz.Load<RoleModel>(user.roleFk);
            if (role == null)
            {
                //return new List<TreeNodeObject>();
            }

            string[] arrayMenuFk = role.getArrayMenuFk();
            ICriteria icr = BaseZdBiz.CreateCriteria<MenuModel>();
            icr.Add(Restrictions.In("id", arrayMenuFk));
            icr.Add(Restrictions.Eq("status",BaseModel.STATUS_ACTIVATE));
            IList<MenuModel> menus = icr.List<MenuModel>();
            IList<TreeNodeObject> nodes = adminBiz.createTree(menus,parentId);
            return JsonText(nodes,JsonRequestBehavior.AllowGet);
        }