Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CheckPower(AdminPower.加盟餐馆管理);
         var id   = Convert.ToInt32(Request.QueryString["id"]);
         var data = from shop in ShopBll.GetShops()
                    join feedback in ShopBll.GetShopFeedbacks() on shop.ShopID equals feedback.ShopId
                    where feedback.ShopFeedbackID == id
                    select new { shop, feedback };
         Feedback     = data.First().feedback;
         FeedbackShop = data.First().shop;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 添加餐馆反馈信息
        /// </summary>
        /// <param name="shopId">餐馆 Id</param>
        /// <param name="feedbackcontent">反馈内容</param>
        /// <returns></returns>
        public static bool AddShopFeedback(int shopId, string feedbackcontent)
        {
            var feedback = new Ye_ShopFeedback()
            {
                ShopId          = shopId,
                FeedbackContent = feedbackcontent,
                IsHandled       = false,
                CreateTime      = DateTime.Now,
                HandleAnswer    = "",
                HandledTime     = DateTime.Now
            };

            _entities.Ye_ShopFeedback.Add(feedback);
            return(_entities.SaveChanges() > 0);
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CheckPower(AdminPower.加盟餐馆管理);
         var idstr = Request.QueryString["id"];
         int id;
         if (!int.TryParse(idstr, out id))
         {
             WebUtil.AlertAndRedirect("非法请求", "Default.aspx");
         }
         var data = from shop in ShopBll.GetShops()
                    join feedback in ShopBll.GetShopFeedbacks() on shop.ShopID equals feedback.ShopId
                    where feedback.ShopFeedbackID == id
                    select new { shop, feedback };
         Feedback     = data.First().feedback;
         FeedbackShop = data.First().shop;
     }
 }