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 }
/// <summary> /// 初始化 /// </summary> private void PageInit(string id) { EyouSoft.BLL.CrmStructure.BCrmComplaint BLL = new EyouSoft.BLL.CrmStructure.BCrmComplaint(); EyouSoft.Model.CrmStructure.MCrmComplaint model = BLL.GetCrmComplaintModel(id); if (model != null) { this.hidComplaintsId.Value = model.ComplaintsId; this.lbTourCode.Text = model.TourCode; this.lbComplaintsName.Text = model.ComplaintsName; this.lbComplaintsTime.Text = string.Format("{0:yyyy-MM-dd}", model.ComplaintsTime); this.lbComplaintsIdentity.Text = model.ComplaintsIdentity; this.lbComplaintsTel.Text = model.ComplaintsTel; this.lbComplaintsType.Text = model.ComplaintsType; this.lbComplaintsOpinion.Text = model.ComplaintsOpinion; this.lbHandleName.Text = model.HandleName; this.txtHandleName.Text = model.HandleName; this.lbHandleTime.Text = model.HandleTime.HasValue ? model.HandleTime.Value.ToString("yyyy-MM-dd") : ""; this.txtHandleTime.Text = model.HandleTime.HasValue ? model.HandleTime.Value.ToString("yyyy-MM-dd") : ""; this.lbHandleResult.Text = model.HandleOpinion; this.txtHandleResult.Text = model.HandleOpinion; if (model.IsHandle) { handle.Checked = true; } else { nohandle.Checked = true; } this.lbIsHandle.Text = model.IsHandle ? "是" : "否"; } }
/// <summary> /// 保存按钮点击事件执行方法 /// </summary> protected void PageSave() { #region 表单取值 //团队编号 string tourno = Utils.GetFormValue("txt_oneControl"); string tourid = Utils.GetFormValue("txt_TourId"); //投诉人 string complaintor = Utils.GetFormValue(txtComplaintor.UniqueID); //投诉时间 string complaintime = Utils.GetFormValue(txtComplaintime.UniqueID); //投诉人类型 string complaintortype = Utils.GetFormValue(txtComplaintorType.UniqueID); //投诉人电话 string complaintel = Utils.GetFormValue(txtComplainTel.UniqueID); //投诉类型 string complaintype = Utils.GetFormValue(txtComplainType.UniqueID); //投诉已经 string complainremark = Utils.GetFormValue(txtComplainRemark.UniqueID); #endregion #region 表单验证 string msg = ""; if (string.IsNullOrEmpty(tourno) && string.IsNullOrEmpty(tourid)) { msg += "请选择团号!<br/>"; } if (string.IsNullOrEmpty(complaintor)) { msg += "请输入投诉人!<br/>"; } if (string.IsNullOrEmpty(complaintime)) { msg += "请输入投诉时间!<br/>"; } if (string.IsNullOrEmpty(complaintype)) { msg += "请输入投诉类型!<br/>"; } if (!string.IsNullOrEmpty(msg)) { Response.Clear(); Response.Write(UtilsCommons.AjaxReturnJson("0", msg)); Response.End(); } #endregion #region 实体赋值 MCrmComplaint model = new MCrmComplaint(); model.CompanyId = this.SiteUserInfo.CompanyId; model.ComplaintsIdentity = complaintortype; model.ComplaintsName = complaintor; model.ComplaintsOpinion = complainremark; model.ComplaintsTel = complaintel; model.ComplaintsTime = Utils.GetDateTimeNullable(complaintime); model.ComplaintsType = complaintype; model.HandleName = ""; model.IssueTime = DateTime.Now; model.OperatorId = this.SiteUserInfo.UserId; model.TourCode = tourno; model.TourId = tourid; #endregion #region 提交保存 EyouSoft.BLL.CrmStructure.BCrmComplaint BLL = new EyouSoft.BLL.CrmStructure.BCrmComplaint(); int flag = BLL.AddCrmComplaintModel(model, tourno); bool result = flag > 0 ? true : false; msg = result ? "投诉成功!" : "投诉失败!"; Response.Clear(); Response.Write(UtilsCommons.AjaxReturnJson(flag.ToString(), msg)); Response.End(); #endregion }