Example #1
0
 private void dlstPtReviews_DeleteCommand(object source, DataListCommandEventArgs e)
 {
     int id = Convert.ToInt32(e.CommandArgument, CultureInfo.InvariantCulture);
     if (e.CommandName == "Delete")
     {
         if (VShopHelper.DeleteFeedBack(id))
         {
             this.ShowMsg("删除成功", true);
             this.BindPtReview();
         }
         else
         {
             this.ShowMsg("删除失败", false);
         }
     }
     else
     {
         FeedBackInfo feedBack = VShopHelper.GetFeedBack(id);
         if (feedBack != null)
         {
             SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
             PayAccount account = new PayAccount(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey);
             NotifyClient client = new NotifyClient(account);
             if (client.UpdateFeedback(feedBack.FeedBackId, feedBack.OpenId))
             {
                 VShopHelper.UpdateFeedBackMsgType(feedBack.FeedBackId, "已处理");
                 this.ShowMsg("处理成功", true);
                 this.BindPtReview();
             }
             else
             {
                 this.ShowMsg("处理失败", false);
             }
         }
     }
 }