Ejemplo n.º 1
0
 /// <summary>
 ///  更新一条数据
 /// </summary>
 public bool UpdateCustomerCallBack(EyouSoft.Model.CompanyStructure.CustomerCallBackInfo model)
 {
     return(Dal.UpdateCustomerCallBack(model));
 }
Ejemplo n.º 2
0
        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
            }
        }
Ejemplo n.º 3
0
        protected bool HasPermit;//判断是否有权限
        protected void Page_Load(object sender, EventArgs e)
        {
            string method = Utils.GetFormValue("hidMethod");    //操作
            string mtype  = Utils.GetQueryStringValue("mtype"); //获取判断是否是回访内容,都则为投诉

            #region 判断权限
            if (mtype == "visit")
            {
                if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_质量管理_修改回访))
                {
                    HasPermit = true;
                }
            }
            else
            {
                if (CheckGrant(global::Common.Enum.TravelPermission.客户关系管理_质量管理_修改投诉))
                {
                    HasPermit = true;
                }
            }
            #endregion

            int id = Utils.GetInt(Utils.GetQueryStringValue("id"));
            EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer();
            EyouSoft.Model.CompanyStructure.CustomerCallBackInfo backModel = custBll.GetCustomerCallBackModel(id);
            if (method == "save")
            {
                if (backModel == null)
                {
                    backModel = new EyouSoft.Model.CompanyStructure.CustomerCallBackInfo();
                }
                backModel.Time         = ucPeople1.VisistDate;                        //投诉时间
                backModel.CallBacker   = ucPeople1.VisiterName;                       //接待人
                backModel.CustomerName = ucPeople1.ByVisisterCompany;                 //投诉客户
                backModel.CustomerId   = Utils.GetInt(ucPeople1.ByVisisterCompanyId); //投诉客户ID
                backModel.CustomerUser = ucPeople1.ByVisisterName;
                backModel.Remark       = Utils.InputText(txtRemarkP.Value);           //备注
                string showMess = custBll.UpdateCustomerCallBack(backModel)?"数据保存成功!":"数据保存失败!";
                //如果不是客户来访则取投诉意见
                if (mtype == "visit")
                {
                    ucPeople1.IsVisist = true;
                }
                MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.document.location.reload();window.parent.Boxy.getIframeDialog('{1}').hide()", showMess, Utils.GetQueryStringValue("iframeId")));
            }
            else
            {
                if (mtype == "visit")
                {
                    ucPeople1.IsVisist = true;
                }
                if (backModel != null)
                {
                    ucPeople1.VisistDate          = backModel.Time;                  //投诉时间
                    ucPeople1.VisiterName         = backModel.CallBacker;            //接待人
                    ucPeople1.ByVisisterCompany   = backModel.CustomerName;          //投诉客户
                    ucPeople1.ByVisisterCompanyId = backModel.CustomerId.ToString(); //投诉客户ID
                    ucPeople1.ByVisisterName      = backModel.CustomerUser;
                    txtRemarkP.Value = backModel.Remark;                             //备注
                }
                //如果不是来访客户则显示投诉意见
            }
        }