Example #1
0
 public bool Create(WX_OpinionFeedback model)
 {
     using (DbOperator dbOperator = ConnectionManager.CreateConnection())
     {
         dbOperator.ClearParameters();
         StringBuilder strSql = new StringBuilder();
         strSql.Append("INSERT INTO WX_OpinionFeedback(OpenId,FeedbackContent,CreateTime,CompanyID) VALUES (@OpenId,@FeedbackContent,@CreateTime,@CompanyID);");
         dbOperator.AddParameter("OpenId", model.OpenId);
         dbOperator.AddParameter("FeedbackContent", model.FeedbackContent);
         dbOperator.AddParameter("CreateTime", DateTime.Now);
         dbOperator.AddParameter("CompanyID", model.CompanyID);
         return(dbOperator.ExecuteNonQuery(strSql.ToString()) > 0);
     }
 }
Example #2
0
 public ActionResult SaveProblem(string content)
 {
     try
     {
         if (string.IsNullOrWhiteSpace(content))
         {
             return(PageAlert("ProblemFeedback", "OtherService", new { RemindUserContent = "内容不能为空" }));
         }
         WX_OpinionFeedback model = new WX_OpinionFeedback();
         model.OpenId          = WeiXinUser.OpenID;
         model.FeedbackContent = content;
         model.CompanyID       = WeiXinUser.CompanyID;
         WXOpinionFeedbackServices.Create(model);
         return(PageAlert("ProblemFeedback", "OtherService", new { RemindUserContent = "我们已收到您的反馈信息,我们会尽快对您的问题进行处理" }));
     }
     catch (Exception ex) {
         ExceptionsServices.AddExceptionToDbAndTxt("WeiXinPageError", "保存问题反馈异常", ex, LogFrom.WeiXin);
         return(PageAlert("ProblemFeedback", "OtherService", new { RemindUserContent = "保存反馈信息异常" }));
     }
 }
Example #3
0
        public static bool Create(WX_OpinionFeedback model)
        {
            IOpinionFeedback factory = WXOpinionFeedbackFactory.GetFactory();

            return(factory.Create(model));
        }