//客户回访/投诉结果方法 #region 成员方法 /// <summary> /// 更新一条数据 /// </summary> public bool UpdateCustomerCallbackResult(EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo model) { return(Dal.UpdateCustomerCallbackResult(model)); }
protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_质量管理_新增回访)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.客户关系管理_质量管理_新增回访, true); return; } string method = Utils.GetFormValue("hidMethod");//操作 ucPeople1.IsVisist = true; ucPeople1.isRequiredVisiterName = true; ucPeople1.VisiterName = SiteUserInfo.ContactInfo.ContactName; if (method == "save") { #region 添加客户回访 string showMess = "数据保存成功!"; bool result = false; EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer(); EyouSoft.Model.CompanyStructure.CustomerCallBackInfo custVisistModel = new EyouSoft.Model.CompanyStructure.CustomerCallBackInfo(); List <EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo> resultList = new List <EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo>(); EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo infoModel = new EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo { Car = (byte)ucContent1.LevelCar, DepartureTime = ucContent1.LeaveDate, Guide = (byte)ucContent1.LevelGuideService, Hotel = (byte)ucContent1.LevelHotelCondition, Journey = (byte)ucContent1.LevelTravel, meals = (byte)ucContent1.LevelFood, RouteID = Utils.GetInt(ucContent1.RouteId), RouteName = ucContent1.RouteName, Shopping = (byte)ucContent1.LevelShopping, Spot = (byte)ucContent1.LevelLandScape, Remark = ucContent1.Remark }; resultList.Add(infoModel); custVisistModel.CustomerCallBackResultInfoList = resultList; custVisistModel.Time = ucPeople1.VisistDate; custVisistModel.CompanyId = CurrentUserCompanyID; custVisistModel.CallBacker = ucPeople1.VisiterName; custVisistModel.CustomerName = ucPeople1.ByVisisterCompany; //被访客户 custVisistModel.CustomerId = Utils.GetInt(ucPeople1.ByVisisterCompanyId); //被访客户ID custVisistModel.CustomerUser = ucPeople1.ByVisisterName; //被访人 custVisistModel.Remark = Utils.InputText(txtRemarkP.Value); //备注 custVisistModel.IsCallBack = EyouSoft.Model.EnumType.CompanyStructure.CallBackType.回访; result = custBll.AddCustomerCallBack(custVisistModel); if (!result) { showMess = "数据保存失败!"; } if (result) { MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/CRM/customerservice/CustomerVisit.aspx';window.parent.Boxy.getIframeDialog('{1}').hide()", showMess, Utils.GetQueryStringValue("iframeId"))); } else { MessageBox.ShowAndRedirect(this, "数据保存失败!", this.Request.Url.ToString()); } #endregion } }
protected bool hasPermit;//是否有修改权限 protected void Page_Load(object sender, EventArgs e) { string method = Utils.GetFormValue("hidMethod"); //操作 string mtype = Utils.GetQueryStringValue("mtype"); //获取判断是否是回访内容,都则为投诉 int id = Utils.GetInt(Utils.GetQueryStringValue("id")); #region 判断权限 if (mtype == "visit") { if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_质量管理_修改回访)) { hasPermit = true;//是否显示保存按钮 } } else { if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_质量管理_修改投诉)) { hasPermit = true;//是否显示保存按钮 } } #endregion EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer();//客户bll //投诉或回访结果 IList <EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo> resultList = custBll.GetCustomerCallbackResultList(id); EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo infoModel = null;//投诉或回访实体 if (resultList != null) { infoModel = resultList.FirstOrDefault(); } if (method == "save") { #region 保存投诉或回访 if (infoModel == null) { infoModel = new EyouSoft.Model.CompanyStructure.CustomerCallBackResultInfo(); } infoModel.Car = (byte)ucContent1.LevelCar; infoModel.DepartureTime = ucContent1.LeaveDate; infoModel.Guide = (byte)ucContent1.LevelGuideService; infoModel.Hotel = (byte)ucContent1.LevelHotelCondition; infoModel.Journey = (byte)ucContent1.LevelTravel; infoModel.meals = (byte)ucContent1.LevelFood; infoModel.RouteID = Utils.GetInt(ucContent1.RouteId); infoModel.RouteName = ucContent1.RouteName; infoModel.Shopping = (byte)ucContent1.LevelShopping; infoModel.Spot = (byte)ucContent1.LevelLandScape; infoModel.CustomerCareforId = id; infoModel.Remark = ucContent1.Remark; //如果不是客户来访则取投诉意见 if (mtype == "visit") { ucContent1.IsVisist = true; //保存投诉 } string showMess = custBll.UpdateCustomerCallbackResult(infoModel) ? "数据保存成功!" : "数据保存失败!"; MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.Boxy.getIframeDialog('{1}').hide()", showMess, Utils.GetQueryStringValue("iframeId"))); #endregion } else { #region 初始化投诉或回访结果 if (infoModel != null) { ucContent1.LevelCar = infoModel.Car; //车辆安排 ucContent1.LevelFood = infoModel.meals; //餐饮 ucContent1.LevelGuideService = infoModel.Guide; //导游 ucContent1.LevelHotelCondition = infoModel.Hotel; //酒店 ucContent1.LevelLandScape = infoModel.Spot; //景点 ucContent1.LevelShopping = infoModel.Shopping; //购物安排 ucContent1.LevelTravel = infoModel.Journey; //行程 ucContent1.RouteId = infoModel.RouteID.ToString(); //线路ID ucContent1.RouteName = infoModel.RouteName; //线路名称 ucContent1.Remark = infoModel.Remark; //备注 ucContent1.LeaveDate = infoModel.DepartureTime; //出团时间 //如果不是来访客户则显示投诉意见 } if (mtype == "visit") { ucContent1.IsVisist = true; } #endregion } }