Example #1
0
        /// <summary>
        /// 页面列表
        /// </summary>
        public void SearchData()
        {
            var search     = base.GetSearch();
            var jsonResult = new BllSysFeedback().SearchData(search);

            WriteJsonToPage(jsonResult);
        }
Example #2
0
        //意见反馈
        //[HttpGet]
        public JsonResult Feedback(string userid, string backinfo, string phonetype)
        {
            try
            {
                LogErrorRecord.InfoFormat("参数请求url:{0}", Request.Url);
                LogErrorRecord.InfoFormat("参数参数:userid={0}&backinfo={1}&phonetype={2}", userid, backinfo, phonetype);

                CheckParams(userid, "用户不能为空!");
                CheckParams(backinfo, "反馈不能为空!");
                CheckParams(phonetype, "手机类型不能为空!");

                if (jsonResult.success)
                {
                    BllSysFeedback bllSysFeedback = new BllSysFeedback();
                    ModSysFeedback mod            = new ModSysFeedback();
                    mod.Id         = Guid.NewGuid().ToString();
                    mod.CreateTime = DateTime.Now;
                    mod.BackInfo   = backinfo;
                    mod.PhoneType  = phonetype;
                    mod.Status     = (int)StatusEnum.正常;
                    mod.UserId     = userid;
                    mod.IsAccept   = false;//默认没接受
                    mod.CreaterId  = "";

                    if (bllSysFeedback.Insert(mod) > 0)
                    {
                        jsonResult.msg     = "我们已经收到了您的反馈信息!谢谢您";
                        jsonResult.success = true;
                    }
                    else
                    {
                        jsonResult.msg     = "系统繁忙,请稍后再试!";
                        jsonResult.success = false;
                    }
                }
            }
            catch (Exception ex)
            {
                LogErrorRecord.ErrorFormat("错误日志:{0},请求url:{1}", ex.Message, Request.Url);
                jsonResult.success   = false;
                jsonResult.errorCode = -1;
                jsonResult.msg       = "常异:" + ex.Message;
            }
            return(Json(jsonResult, "application/json", JsonRequestBehavior.AllowGet));
        }
Example #3
0
        /// <summary>
        /// 删除
        /// </summary>
        public void DeleteData(string id)
        {
            var msg = new ModJsonResult();

            try
            {
                int result = new BllSysFeedback().DeleteStatus(id);
                if (result > 0)
                {
                    msg.success = true;
                }
                else
                {
                    msg.success = false;
                    msg.msg     = "操作失败";
                }
            }
            catch (Exception ex)
            {
                msg.msg = "操作失败:" + ex.Message;
            }
            WriteJsonToPage(msg.ToString());
        }