Example #1
0
        private void PageSave(string doType)
        {
            #region 表单取值
            string complaintsid = Utils.GetFormValue(hidComplaintsId.UniqueID);
            string handlename   = Utils.GetFormValue(txtHandleName.UniqueID);
            string handletime   = Utils.GetFormValue(txtHandleTime.UniqueID);
            string handleresult = Utils.GetFormValue(txtHandleResult.UniqueID);
            bool   ishandle     = Utils.GetFormValue("rbIsHandle") == "handle" ? true : false;;
            #endregion
            #region 数据验证
            string msg = "";
            if (string.IsNullOrEmpty(handlename))
            {
                msg += "-请输入处理人!<br/>";
            }
            if (string.IsNullOrEmpty(handleresult))
            {
                msg += "-请输入处理意见!<br/>";
            }
            if (string.IsNullOrEmpty(handletime))
            {
                msg += "-请输入处理时间!<br/>";
            }
            if (!string.IsNullOrEmpty(msg))
            {
                Response.Clear();
                Response.Write(UtilsCommons.AjaxReturnJson("0", msg));
                Response.End();
            }

            #endregion
            #region 实体赋值
            EyouSoft.BLL.CrmStructure.BCrmComplaint BLL = new EyouSoft.BLL.CrmStructure.BCrmComplaint();
            #endregion
            #region 保存提交
            bool   flag   = BLL.SetComplaintDeal(complaintsid, handlename, Utils.GetDateTime(handletime), handleresult, ishandle);
            string result = flag ? "1" : "0";
            msg = flag ? "投诉处理成功!" : "投诉处理失败!";
            Response.Clear();
            Response.Write(UtilsCommons.AjaxReturnJson(result, msg));
            Response.End();
            #endregion
        }