コード例 #1
0
        private void GetCustInfoByMemberCode(out string msg)
        {
            msg = string.Empty;
            if (!string.IsNullOrEmpty(MemberCode))
            {
                BitAuto.YanFa.Crm2009.Entities.DMSMember model = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(MemberCode);

                if (model != null)
                {
                    BitAuto.YanFa.Crm2009.Entities.CustInfo custinfo = BitAuto.YanFa.Crm2009.BLL.CustInfo.Instance.GetCustInfo(model.CustID);
                    if (custinfo != null)
                    {
                        msg = "{result:'true',CustName:'" + custinfo.CustName + "',CustID:'" + model.CustID + "',PrivinceID:'" + custinfo.ProvinceID + "',CityID:'" + custinfo.CityID + "',CountyID:'" + custinfo.CountyID + "'}";
                    }
                    else
                    {
                        msg = "{result:'false'}";
                    }
                }
                else
                {
                    msg = "{result:'false'}";
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //新车和试驾
                if (Source == "1" || Source == "3")
                {
                    bindNewCarData();
                }
                else if (Source == "2")
                {
                    bindRelpaceCarData();
                }

                //根据经销商id,取名称
                if (DealerId != 0)
                {
                    BitAuto.YanFa.Crm2009.Entities.DMSMember DMSModel = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(DealerId.ToString());
                    if (DMSModel != null)
                    {
                        DealerName = DMSModel.Name;
                        MemberID   = DMSModel.ID.ToString();
                        CustID     = DMSModel.CustID;
                    }
                }
            }
        }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(DealerId))
     {
         Response.Write(@"<script language='javascript'>alert('参数错误!');try {
           window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
     }
     else
     {
         BitAuto.YanFa.Crm2009.Entities.DMSMember DMSModel = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(DealerId);
         if (DMSModel != null)
         {
             string DealerName = DMSModel.Name;
             string MemberID   = DMSModel.ID.ToString();
             string CustID     = DMSModel.CustID;
             Response.Redirect("../../../CustCheck/CrmCustSearch/MemberDetail.aspx?MemberID=" + MemberID + "&CustID=" + CustID);
         }
         else
         {
             Response.Write(@"<script language='javascript'>alert('参数错误!');try {
           window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
         }
     }
 }
コード例 #4
0
 /// <summary>
 /// 根据RecID,初始化核对的会员信息(仅6个字段和4个关键字)
 /// </summary>
 /// <param name="recID">RecID</param>
 /// <returns></returns>
 public BitAuto.YanFa.Crm2009.Entities.DMSMember GetCC_DMSMemberByRecID(int recID)
 {
     BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember = new BitAuto.YanFa.Crm2009.Entities.DMSMember();
     Entities.ProjectTask_AuditContrastInfo   model     = GetProjectTask_AuditContrastInfo(recID);
     if (model != null && model.ContrastType != null &&
         (model.ContrastType.Value == 2 || model.ContrastType.Value == 3) &&
         !string.IsNullOrEmpty(model.ContrastInfoInside))
     {
         return(BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(model.DMSMemberID, model.ContrastInfoInside));
     }
     return(null);
 }
コード例 #5
0
        private void BindMemberList(string custID)
        {
            //正常的会员
            List <BitAuto.YanFa.Crm2009.Entities.DMSMember> list = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(custID);

            if (list != null && list.Count > 0)
            {
                FirstMemberCode = list[0].MemberCode;
                FirstMemberName = list[0].Name;
            }

            foreach (BitAuto.YanFa.Crm2009.Entities.DMSMember m in list)
            {
                Control ctl = this.LoadControl("~/CRMStopCust/UCMember.ascx", m);
                this.PlaceHolder.Controls.Add(ctl);
            }

            //被停用删除的会员 易湃
            string[] deleteMember = DeleteMemberID.Split(';');

            if (deleteMember.Length > 0)
            {
                string[] members = deleteMember[0].Split(',');

                for (int k = 0; k < members.Length; k++)
                {
                    if (members[k] != "")
                    {
                        BitAuto.YanFa.Crm2009.Entities.DMSMember m = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.CCGetDMSMember(members[k], "-1");

                        if (m != null)
                        {
                            Control ctl = this.LoadControl("~/CRMStopCust/UCMember.ascx", m);
                            this.PlaceHolder.Controls.Add(ctl);
                        }
                    }
                }
            }
        }
コード例 #6
0
        private void OrderInfoBind()
        {
            Entities.GroupOrder custBasicInfo = BLL.GroupOrder.Instance.GetGroupOrderCustInfo(RequestTaskID);
            if (custBasicInfo != null)
            {
                int _userID = BLL.Util.GetLoginUserID();
                if (custBasicInfo.AssignUserID == _userID)
                {
                    IsBelong = "1";
                }

                //                if (IsEditTask == "0" && IsBelong == "0")
                //                {
                //                    Response.Write(@"<script language='javascript'>alert('此订单不是您处理的且无管理员查看权限,无法查看。');try {
                //                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                //                                                       }
                //                                                       catch (e) {
                //                                                           window.opener = null; window.open('', '_self'); window.close();
                //                                                       }</script>");
                //                }

                OrderCode = custBasicInfo.OrderCode.ToString();
                DealerID  = custBasicInfo.DealerID.ToString();
                //根据经销商id,取名称
                if (!string.IsNullOrEmpty(DealerID) && DealerID != "0" && DealerID != "-2")
                {
                    BitAuto.YanFa.Crm2009.Entities.DMSMember DMSModel = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(DealerID);
                    if (DMSModel != null)
                    {
                        MemberID = DMSModel.ID.ToString();
                        CustID   = DMSModel.CustID;
                    }
                }
                DealerName = custBasicInfo.DealerName;

                CarSerialName = custBasicInfo.CarMasterName + "-" + custBasicInfo.CarSerialName + "-" + custBasicInfo.CarName;
                if (!string.IsNullOrEmpty(custBasicInfo.WantCarMasterName))
                {
                    wantcarname += custBasicInfo.WantCarMasterName;
                }
                if (!string.IsNullOrEmpty(custBasicInfo.WantCarSerialName))
                {
                    if (!string.IsNullOrEmpty(wantcarname))
                    {
                        wantcarname += "-" + custBasicInfo.WantCarSerialName;
                    }
                    else
                    {
                        wantcarname += custBasicInfo.WantCarSerialName;
                    }
                }
                if (!string.IsNullOrEmpty(custBasicInfo.WantCarName))
                {
                    if (!string.IsNullOrEmpty(wantcarname))
                    {
                        wantcarname += "-" + custBasicInfo.WantCarName;
                    }
                    else
                    {
                        wantcarname += custBasicInfo.WantCarName;
                    }
                }
                if (custBasicInfo.PlanBuyCarTime != -2)
                {
                    planbuycartime = BLL.Util.GetEnumOptText(typeof(Entities.GO_PlanBuyCarTime), Convert.ToInt32(custBasicInfo.PlanBuyCarTime));
                }

                //CreateTime = custBasicInfo.CreateTime.ToString();
                //下单时间
                CreateTime    = custBasicInfo.OrderCreateTime.ToString();
                OrderPrice    = custBasicInfo.OrderPrice.ToString() + "万元";
                IsReturnVisit = BLL.Util.GetEnumOptText(typeof(Entities.IsReturnVisit), (int)custBasicInfo.IsReturnVisit);
                FailReason    = custBasicInfo.FailReason;
                CallRecord    = custBasicInfo.CallRecord;

                if (custBasicInfo.TaskStatus == (int)Entities.GroupTaskStatus.Processed)
                {
                    IsProcessed = "1";
                }
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 页面初次加载
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(TaskID))
                {
                    #region 绑定失败理由
                    BindFailReson();
                    #endregion

                    #region 绑定预计购车时间
                    BindPlanBuyCarTime();
                    #endregion

                    #region 任务不为空

                    int TaskIDInt = 0;
                    if (int.TryParse(TaskID, out TaskIDInt))
                    {
                        #region 任务数据格式正确
                        Entities.GroupOrderTask model = GroupOrderTask.Instance.GetGroupOrderTask(TaskIDInt);
                        if (model != null)
                        {
                            #region 任务存在
                            if (model.TaskStatus == (int)Entities.GroupTaskStatus.NoAllocation || model.TaskStatus == (int)Entities.GroupTaskStatus.Processed)
                            {
                                #region 任务不处于处理状态
                                Response.Write(@"<script language='javascript'>alert('当前任务不处于处理状态,页面将被关闭。');try {
                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                       }
                                                       catch (e) {
                                                           window.opener = null; window.open('', '_self'); window.close();
                                                       }</script>");
                                #endregion
                            }
                            else
                            {
                                #region 任务处于处理状态
                                if (model.AssignUserID != BLL.Util.GetLoginUserID())
                                {
                                    #region 当前人不是处理人
                                    Response.Write(@"<script language='javascript'>alert('您不是该任务的当前处理人,页面将被关闭。');try {
                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                       }
                                                       catch (e) {
                                                           window.opener = null; window.open('', '_self'); window.close();
                                                       }</script>");
                                    #endregion
                                }
                                else
                                {
                                    #region 加载页面
                                    Entities.GroupOrder grouporder = BLL.GroupOrder.Instance.GetGroupOrder(TaskIDInt);
                                    if (grouporder != null)
                                    {
                                        #region 订单存在
                                        //客户名称
                                        CustName = grouporder.CustomerName;
                                        //客户性别
                                        if (grouporder.UserGender == 1)
                                        {
                                            rdoMan.Checked = true;
                                        }
                                        else if (grouporder.UserGender == 2)
                                        {
                                            rdoWomen.Checked = true;
                                        }
                                        //客户电话
                                        CustTel = grouporder.CustomerTel;
                                        //客户城市id
                                        CityID = grouporder.CityID.ToString();

                                        //客户省份ID
                                        ProvinceID = grouporder.ProvinceID.ToString();

                                        //客户省份城市
                                        if (!string.IsNullOrEmpty(grouporder.ProvinceName))
                                        {
                                            LocationName += grouporder.ProvinceName + " ";
                                        }
                                        if (!string.IsNullOrEmpty(grouporder.CityName))
                                        {
                                            LocationName += grouporder.CityName;
                                        }
                                        //大区id
                                        AreaID   = grouporder.AreaID.ToString();
                                        UserName = grouporder.UserName;
                                        //大区名称
                                        //强斐 2014-12-17
                                        BitAuto.YanFa.Crm2009.Entities.AreaInfo info = BLL.Util.GetAreaInfoByPCC(
                                            BitAuto.ISDC.CC2012.Entities.CommonFunction.ObjectToString(grouporder.ProvinceID),
                                            BitAuto.ISDC.CC2012.Entities.CommonFunction.ObjectToString(grouporder.CityID), null);
                                        AreaName = info == null ? "" : info.DistinctName;
                                        //订单ID
                                        OrderID = grouporder.OrderID.ToString();
                                        //订单编号
                                        OrderCode = grouporder.OrderCode.ToString();
                                        //经销商id
                                        DealerID = grouporder.DealerID.ToString();

                                        //根据经销商id,取名称
                                        if (!string.IsNullOrEmpty(DealerID) && DealerID != "0" && DealerID != "-2")
                                        {
                                            BitAuto.YanFa.Crm2009.Entities.DMSMember DMSModel = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(DealerID);
                                            if (DMSModel != null)
                                            {
                                                MemberID = DMSModel.ID.ToString();
                                                CustID   = DMSModel.CustID;
                                            }
                                        }
                                        //经销商名称
                                        DealerName = grouporder.DealerName;
                                        //车款名称
                                        if (!string.IsNullOrEmpty(grouporder.CarMasterName))
                                        {
                                            CarName += grouporder.CarMasterName;
                                        }
                                        if (!string.IsNullOrEmpty(grouporder.CarSerialName))
                                        {
                                            CarName += "-" + grouporder.CarSerialName;
                                        }
                                        if (!string.IsNullOrEmpty(grouporder.CarName))
                                        {
                                            CarName += "-" + grouporder.CarName;
                                        }
                                        //下单时间
                                        DateTime ordertime = System.DateTime.Now;
                                        if (DateTime.TryParse(grouporder.OrderCreateTime.ToString(), out ordertime))
                                        {
                                            OrderTime = ordertime.ToString("yyyy-MM-dd HH:mm:ss");
                                        }
                                        else
                                        {
                                            OrderTime = "";
                                        }
                                        //价格
                                        OrderPrice = grouporder.OrderPrice + "万元";
                                        //是否回访
                                        selReturnVisit.SelectedIndex = selReturnVisit.Items.IndexOf(selReturnVisit.Items.FindByValue(grouporder.IsReturnVisit.ToString()));
                                        Remark = grouporder.CallRecord;
                                        //失败原因
                                        selFailReson.SelectedIndex = selFailReson.Items.IndexOf(selFailReson.Items.FindByValue(grouporder.FailReasonID.ToString()));

                                        //加载意向车型
                                        WantCarBrandID  = grouporder.WantCarMasterID.ToString();
                                        WantCarSerialID = grouporder.WantCarSerialID.ToString();
                                        WantCarID       = grouporder.WantCarID.ToString();
                                        //预计购车时间
                                        if (grouporder.PlanBuyCarTime != -2)
                                        {
                                            dllPlanBuyCarTime.SelectedIndex = dllPlanBuyCarTime.Items.IndexOf(dllPlanBuyCarTime.Items.FindByValue(grouporder.PlanBuyCarTime.ToString()));
                                        }
                                        #endregion
                                    }
                                    else
                                    {
                                        #region 订单不存在
                                        Response.Write(@"<script language='javascript'>alert('该任务对应订单不存在,页面将被关闭。');try {
                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                       }
                                                       catch (e) {
                                                           window.opener = null; window.open('', '_self'); window.close();
                                                       }</script>");
                                        #endregion
                                    }
                                    #endregion
                                }
                                #endregion
                            }
                            #endregion
                        }
                        else
                        {
                            #region 任务不存在
                            Response.Write(@"<script language='javascript'>alert('任务不存在,页面将被关闭。');try {
                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                       }
                                                       catch (e) {
                                                           window.opener = null; window.open('', '_self'); window.close();
                                                       }</script>");
                            #endregion
                        }
                        #endregion
                    }
                    else
                    {
                        #region 格式不正确
                        Response.Write(@"<script language='javascript'>alert('任务的数据格式不正确,页面将被关闭。');try {
                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                       }
                                                       catch (e) {
                                                           window.opener = null; window.open('', '_self'); window.close();
                                                       }</script>");
                        #endregion
                    }
                    #endregion
                }
                else
                {
                    #region 任务为空
                    Response.Write(@"<script language='javascript'>alert('任务不能为空,页面将被关闭。');try {
                                                           window.external.MethodScript('/browsercontrol/closepagereloadppage');
                                                       }
                                                       catch (e) {
                                                           window.opener = null; window.open('', '_self'); window.close();
                                                       }</script>");
                    #endregion
                }
            }
            #endregion
        }
コード例 #8
0
        public void DeleteMemberInfo()
        {
            int id = -1;

            if (MemberID != "")
            {
                if (int.TryParse(MemberID, out id))
                {
                    Entities.ProjectTask_DMSMember member = BLL.ProjectTask_DMSMember.Instance.GetProjectTask_DMSMember(id);
                    if (member != null)
                    {
                        BitAuto.YanFa.Crm2009.Entities.DMSMember dmsMember = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(new Guid(member.OriginalDMSMemberID));
                        if (dmsMember != null)
                        {
                            if (dmsMember.SyncStatus == (int)BitAuto.YanFa.Crm2009.Entities.EnumDMSSyncStatus.Rejected)
                            {
                                BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.Delete(dmsMember.ID.ToString());
                                BLL.ProjectTask_DMSMember.Instance.ProjectTask_DMSMemberDelete(id);
                                string content = string.Format("为【{0}(ID:{1})】删除会员【{2}(ID:{3})】成功。", dmsMember.CustName, dmsMember.CustID,
                                                               dmsMember.Name, dmsMember.MemberCode);
                                BitAuto.YanFa.SysRightManager.Common.LogInfo.Instance.InsertLog(ConfigurationUtil.GetAppSettingValue("MemberLogModuleID"), (int)BitAuto.YanFa.SysRightManager.Common.LogInfo.ActionType.Delete, content);
                            }
                            else
                            {
                                throw new Exception("只有打回的会员才能删除!");
                            }
                        }
                    }
                }
                else
                {
                    throw new Exception("会员ID无法转换为int类型");
                }
            }

            //车商通会员删除
            if (OriginalCSTRecID != string.Empty)
            {
                BitAuto.YanFa.Crm2009.Entities.CstMember cstMember = BitAuto.YanFa.Crm2009.BLL.CstMember.Instance.GetCstMemberModel(OriginalCSTRecID);
                int ID = BLL.ProjectTask_CSTMember.Instance.GetIDByCSTRecID(OriginalCSTRecID);
                if (cstMember != null)
                {
                    if (cstMember.SyncStatus == (int)BitAuto.YanFa.Crm2009.Entities.EnumCSTSyncStatus.Rejected)
                    {
                        BitAuto.YanFa.Crm2009.BLL.CstMember.Instance.Delete(cstMember.ID.ToString()); //删除CRM车商通会员信息
                        BLL.ProjectTask_CSTMember.Instance.ProjectTask_CSTMemberDelete(ID);           //删除CC车商通会员信息
                        string content = string.Format("为【{0}(ID:{1})】删除会员【{2}(ID:{3})】成功。", cstMember.CustName, cstMember.CustID,
                                                       cstMember.FullName, cstMember.VendorCode);
                        BitAuto.YanFa.SysRightManager.Common.LogInfo.Instance.InsertLog(ConfigurationUtil.GetAppSettingValue("MemberLogModuleID"), (int)BitAuto.YanFa.SysRightManager.Common.LogInfo.ActionType.Delete, content);
                    }
                    else
                    {
                        throw new Exception("只有打回的会员才能删除!");
                    }
                }
                else
                {
                    throw new Exception("删除失败");
                }
            }
        }
コード例 #9
0
        public void SubmitMemberInfo()
        {
            //车易通信息提交
            Entities.ProjectTask_DMSMember member = null;
            Validate(true, out member);
            if (member != null)
            {
                if (BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.IsExistsByAbbrName(member.OriginalDMSMemberID, member.Abbr, 1))
                {
                    throw new Exception("此会员简称在Crm库中已存在");
                }
                else
                {
                    Guid memberGuid = new Guid(member.OriginalDMSMemberID);
                    BitAuto.YanFa.Crm2009.Entities.DMSMember dmsMember = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(memberGuid);
                    dmsMember.Abbr            = member.Abbr;
                    dmsMember.BrandGroupID    = member.BrandGroupID;
                    dmsMember.BrandIds        = member.BrandIDs;
                    dmsMember.BrandNames      = member.BrandNames;
                    dmsMember.CityID          = member.CityID;
                    dmsMember.CompanyWebSite  = member.CompanyWebSite;
                    dmsMember.ContactAddress  = member.ContactAddress;
                    dmsMember.CountyID        = member.CountyID;
                    dmsMember.Email           = member.Email;
                    dmsMember.EnterpriseBrief = member.EnterpriseBrief;
                    dmsMember.Fax             = member.Fax;
                    dmsMember.TrafficInfo     = member.TrafficInfo;
                    dmsMember.Remarks         = member.Remarks;
                    dmsMember.ProvinceID      = member.ProvinceID;
                    dmsMember.Postcode        = member.Postcode;
                    dmsMember.Phone           = member.Phone;
                    dmsMember.Name            = member.Name;
                    dmsMember.MemberType      = member.MemberType;
                    dmsMember.Remarks         = member.Remarks;
                    dmsMember.SerialIds       = member.SerialIds;
                    dmsMember.SerialNames     = member.SerialIds;

                    dmsMember.MapCoordinateList.Add(new BitAuto.YanFa.Crm2009.Entities.DMSMapCoordinate(
                                                        memberGuid, BitAuto.YanFa.Crm2009.Entities.Constants.Constant.MapProviderName,
                                                        member.Longitude, member.Lantitude)
                                                    );
                    if (dmsMember.SyncStatus == (int)BitAuto.YanFa.Crm2009.Entities.EnumDMSSyncStatus.Rejected)
                    {
                        string content = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetUpdateContent(dmsMember, "{0}由【{1}】修改为【{2}】", ',');
                        content = string.Format("为【{0}(ID:{1})】修改会员【{2}(ID:{3})】{4}。",
                                                dmsMember.CustName, dmsMember.CustID, member.Name, member.MemberCode,
                                                content.Length > 0 ? ":" + content : string.Empty);
                        BitAuto.YanFa.SysRightManager.Common.LogInfo.Instance.InsertLog(ConfigurationUtil.GetAppSettingValue("MemberLogModuleID"), (int)BitAuto.YanFa.SysRightManager.Common.LogInfo.ActionType.Update, content);
                        BLL.ProjectTask_DMSMember.Instance.InsertOrUpdate(member);      //保存cc会员信息
                        dmsMember.SyncStatus = (int)BitAuto.YanFa.Crm2009.Entities.EnumDMSSyncStatus.ApplyFor;
                        BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.Update(dmsMember); //保存crm会员信息
                        BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.InsertSyncLog(memberGuid, (int)BitAuto.YanFa.Crm2009.Entities.EnumDMSSyncStatus.ApplyFor, "申请成功(呼叫中心二次审核)", BLL.Util.GetLoginUserID(), DateTime.Now);
                    }
                    else
                    {
                        throw new Exception("此会员不可提交到crm中,因为此会员不是打回状态");
                    }
                }
            }

            //车商通信息提交
            BitAuto.YanFa.Crm2009.Entities.CstMember cstMember = null;
            string Brands = "";

            //Crm2009.Entities.CSTMember_Brand modelBrand = null;
            BitAuto.YanFa.Crm2009.Entities.CSTLinkMan cstLinkMan = null;
            ValidateCSTMember(true, out cstMember, out Brands, out cstLinkMan);


            if (cstMember != null)
            {
                if (cstMember.SyncStatus == (int)BitAuto.YanFa.Crm2009.Entities.EnumCSTSyncStatus.Rejected)
                {
                    //当CstMemberID字段有值时,更新交通信息的接口 12.6.4注释
                    //if (cstMember.CstMemberID != Entities.Constants.Constant.INT_INVALID_VALUE && cstMember.CstMemberID != 0)
                    //{
                    //    //更新车商通信息接口
                    //    string msg = "";
                    //    int[] arrBrand = null;
                    //    //主营品牌
                    //if (Brands != "")
                    //{
                    //    string[] ids = Brands.Split(',');
                    //    arrBrand = new int[ids.Length];
                    //    for (int i = 0; i < ids.Length; i++)
                    //    {
                    //        arrBrand[i] = Convert.ToInt32(ids[i].ToString());
                    //    }
                    //}
                    //       bool result = BitAuto.YanFa.DMSInterface.CstMemberServiceHandler.UpdateTranstarUserInfo(cstMember.CstMemberID, cstMember.FullName, cstMember.ShortName,
                    //cstMember.VendorClass, cstMember.SuperId, cstMember.ProvinceID, cstMember.CityID, out msg);
                    //if (result == false)
                    //{
                    //    throw new Exception(msg);
                    //}
                    //}

                    string content = BitAuto.YanFa.Crm2009.BLL.CstMember.Instance.GetUpdateContent(cstMember, cstLinkMan, "{0}由【{1}】修改为【{2}】", ',');
                    content = string.Format("为【{0}(ID:{1})】修改会员【{2}(ID:{3})】{4}。",
                                            cstMember.CustName, cstMember.CustID, cstMember.FullName, cstMember.VendorCode,
                                            content.Length > 0 ? ":" + content : string.Empty);
                    BitAuto.YanFa.SysRightManager.Common.LogInfo.Instance.InsertLog(ConfigurationUtil.GetAppSettingValue("MemberLogModuleID"), (int)BitAuto.YanFa.SysRightManager.Common.LogInfo.ActionType.Update, content);

                    cstMember.SyncStatus = (int)BitAuto.YanFa.Crm2009.Entities.EnumCSTSyncStatus.ApplyFor;
                    BitAuto.YanFa.Crm2009.BLL.CstMember.Instance.UpdateCstMember(cstMember);//保存crm车商通会员信息

                    //插入开通日志
                    cstMember.CreateTime = DateTime.Now;
                    BitAuto.YanFa.Crm2009.BLL.CSTMemberSyncLog.Instance.AddSynclog(cstMember.CSTRecID, cstMember.SyncStatus, "申请成功(呼叫中心二次审核)", cstMember.CreateUserID, cstMember.CreateTime);

                    //更新Crm车商通主营品牌信息 12.6.4注释
                    //if (Brands != "")
                    //{
                    //    string[] brandID = Brands.Split(',');
                    //    Crm2009.BLL.CSTMember_Brand.Instance.DeleteByCSTRecID(cstMember.CSTRecID);
                    //    for (int i = 0; i < brandID.Length; i++)
                    //    {
                    //        if (brandID[i] != "")
                    //        {
                    //            Crm2009.Entities.CSTMember_Brand modelBrand = new Crm2009.Entities.CSTMember_Brand();
                    //            modelBrand.CSTRecID = cstMember.CSTRecID;
                    //            modelBrand.CreateTime = DateTime.Now;
                    //            modelBrand.BrandID = int.Parse(brandID[i]);
                    //            Crm2009.BLL.CSTMember_Brand.Instance.Add(modelBrand);
                    //        }
                    //    }
                    //}

                    BitAuto.YanFa.Crm2009.BLL.CSTLinkMan.Instance.Update(cstLinkMan);//保存crm车商通会员联系人信息
                }
                else
                {
                    throw new Exception("此车商通会员不可提交到crm中,因为此车商通会员不是打回状态");
                }
            }
        }
コード例 #10
0
        private EnumResult VefiyCustData(CustBussiness info, out Entities.CallRecord_ORIG orig, out BitAuto.YanFa.Crm2009.Entities.DMSMember member)
        {
            orig   = null;
            member = null;

            if (string.IsNullOrEmpty(info.CustName))
            {
                return(EnumResult.CustNameEmpty);
            }
            int sex = 0;

            if (info.Sex != string.Empty && !int.TryParse(info.Sex, out sex))
            {
                return(EnumResult.SexPatternError);
            }
            else if (info.Sex == string.Empty)
            {
                info.Sex = "1";
            }
            else if (sex > 2 || sex < 1)
            {
                return(EnumResult.SexPatternError);
            }
            if (info.Tels == null)
            {
                return(EnumResult.CustTelEmpty);
            }
            else if (info.Tels.Length == 0)
            {
                return(EnumResult.CustTelEmpty);
            }
            else if (info.Tels.Length > 2)
            {
                return(EnumResult.CustTelPatternError);
            }
            //Regex reTel = new Regex(@"(^0[0-9]{2,3}[0-9]{7,8}$)|(^13[0-9]{9}$)|(^15[0-9]{9}$)|(^18[0-9]{9}$)|(^19[0-9]{9}$)|(^14[0-9]{9}$)|(^400\d{7}$)");
            foreach (string str in info.Tels)
            {
                if (!BLL.Util.IsTelephoneAnd400Tel(str))
                {
                    return(EnumResult.CustTelPatternError);
                }
            }

            int  temp     = 0;
            long templong = 0;

            if (string.IsNullOrEmpty(info.CallID))
            {
                return(EnumResult.CallIDEmpty);
            }
            else if (!long.TryParse(info.CallID, out templong))
            {
                return(EnumResult.CallIDPatternError);
            }
            else
            {
                orig = BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGByCallID(long.Parse(info.CallID));
                if (orig == null)
                {
                    return(EnumResult.CallIDNotExist);
                }
                else
                {
                    info.CreateUserID = orig.CreateUserID.ToString();
                }
            }
            if (string.IsNullOrEmpty(info.BusinessID))
            {
                return(EnumResult.BusinessIDEmpty);
            }
            if (string.IsNullOrEmpty(info.BGID))
            {
                return(EnumResult.BGIDEmpty);
            }
            if (!int.TryParse(info.BGID, out temp))
            {
                return(EnumResult.BGIDPatternError);
            }
            if (string.IsNullOrEmpty(info.SCID))
            {
                return(EnumResult.SCIDEmpty);
            }
            if (!int.TryParse(info.SCID, out temp))
            {
                return(EnumResult.SCIDPatternError);
            }
            if (!string.IsNullOrEmpty(info.MemberCode))
            {
                member = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(info.MemberCode);
                if (member == null)
                {
                    return(EnumResult.MemberCodeError);
                }
            }
            return(EnumResult.Success);
        }
コード例 #11
0
        private void BindInfo()
        {
            #region 根据类型绑定联系记录控件
            //1新车,3试驾modify by qizq 2013-7-19
            if (Source == "1" || Source == "3")
            {
                //新车订单
                Entities.OrderNewCar newCarModel = BLL.OrderNewCar.Instance.GetOrderNewCar(long.Parse(TID));
                if (newCarModel != null)
                {
                    #region 绑定新车订单

                    this.ddlNewBrand  = newCarModel.CarMasterID.ToString();
                    this.ddlNewSerial = newCarModel.CarSerialID.ToString();
                    this.ddlNewName   = newCarModel.CarTypeID.ToString();
                    ///this.ddlNewCarColor.Value = newCarModel.CarColor;
                    this.ddlCarTypeID = newCarModel.CarTypeID.ToString();
                    nowColor          = newCarModel.CarColor;

                    //经销商
                    this.hidNewCarDMSmemberCode.Value = newCarModel.DMSMemberCode;
                    //名称
                    this.txtNewDealer.Value = newCarModel.DMSMemberName;

                    this.labNewsRemark.InnerText   = newCarModel.OrderRemark;
                    this.labNewCreatTime.InnerText = DateTime.Parse(newCarModel.OrderCreateTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                    this.txtNewCallRecord.Value    = newCarModel.CallRecord;
                    //经销商iD
                    if (newCarModel.DealerID != Constant.INT_INVALID_VALUE)
                    {
                        if (int.TryParse(newCarModel.DealerID.ToString(), out DealerId))
                        {
                        }
                    }
                    #region 隐藏域

                    this.hidDMSCode.Value = newCarModel.DMSMemberCode;
                    this.hidDMSName.Value = newCarModel.DMSMemberName;
                    //this.hidDMSLevel.Value = newCarModel.hidDMSLevel;
                    //this.hidDMSAddress.Value = newCarModel.hidDMSAddress;
                    //this.hidDMSTel.Value = newCarModel.hidDMSTel;
                    //this.hidDMSCity.Value = newCarModel.hidDMSCity;

                    #endregion

                    #endregion
                }
            }
            else if (Source == "2")
            {
                //置换订单
                Entities.OrderRelpaceCar replaceCarModel = BLL.OrderRelpaceCar.Instance.GetOrderRelpaceCar(long.Parse(TID));
                if (replaceCarModel != null)
                {
                    #region 绑定置换订单信息

                    this.ddlWantBrand    = replaceCarModel.CarMasterID.ToString();
                    this.ddlWantSerial   = replaceCarModel.CarSerialID.ToString();
                    this.ddlWantName     = replaceCarModel.CarTypeID.ToString();
                    this.ddlCarTypeID    = replaceCarModel.RepCarTypeId.ToString();
                    this.ddlRecCarTypeID = replaceCarModel.CarTypeID.ToString();
                    nowColor             = replaceCarModel.ReplacementCarColor;
                    relColor             = replaceCarModel.CarColor;

                    //经销商
                    this.hidWantDMSMemberCode.Value = replaceCarModel.DMSMemberCode;
                    // //名称
                    this.txtWantDealer.Value = replaceCarModel.DMSMemberName;

                    this.dllOldBrand  = replaceCarModel.RepCarMasterID.ToString();
                    this.dllOldSerial = replaceCarModel.RepCarSerialID.ToString();
                    this.dllOldName   = replaceCarModel.RepCarTypeId.ToString();

                    this.dllOldColor.Value     = replaceCarModel.ReplacementCarColor;
                    this.dllRegDateYear.Value  = replaceCarModel.ReplacementCarBuyYear.ToString();
                    this.dllRegDateMonth.Value = replaceCarModel.ReplacementCarBuyMonth.ToString();
                    //省份

                    Province = replaceCarModel.RepCarProvinceID.ToString();
                    City     = replaceCarModel.RepCarCityID.ToString();
                    County   = replaceCarModel.RepCarCountyID.ToString();

                    this.txtMileage.Value            = replaceCarModel.ReplacementCarUsedMiles.ToString();
                    this.txtProSellPrice.Value       = replaceCarModel.SalePrice.ToString();
                    this.labWantRemark.InnerText     = replaceCarModel.OrderRemark;
                    this.labWantCreateTime.InnerText = DateTime.Parse(replaceCarModel.OrderCreateTime.ToString()).ToString("yyyy-MM-dd HH:mm:ss");
                    this.txtReplaceCallRecord.Value  = replaceCarModel.CallRecord;

                    this.hidDMSCode.Value = replaceCarModel.DMSMemberCode;
                    this.hidDMSName.Value = replaceCarModel.DMSMemberName;

                    //经销商iD
                    if (replaceCarModel.DealerID != Constant.INT_INVALID_VALUE)
                    {
                        if (int.TryParse(replaceCarModel.DealerID.ToString(), out DealerId))
                        {
                        }
                    }

                    #endregion
                }
            }
            //根据经销商id,取名称
            if (DealerId != 0)
            {
                BitAuto.YanFa.Crm2009.Entities.DMSMember DMSModel = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(DealerId.ToString());
                if (DMSModel != null)
                {
                    DealerName = DMSModel.Name;
                    MemberID   = DMSModel.ID.ToString();
                    CustID     = DMSModel.CustID;
                }
            }

            #endregion
        }
コード例 #12
0
        /// <summary>
        /// 插入到审核对照表,类型为:会员信息变化,若会员有变化,则生成记录
        /// </summary>
        /// <param name="recid">表ProjectTask_AuditContrastInfo主键</param>
        /// <param name="cC_DMSMember">呼叫中心会员实体</param>
        /// <param name="DMSMember">CRM系统会员实体</param>
        /// <returns></returns>
        public void UpdateMemberInfo(int recid, Entities.ProjectTask_DMSMember cc_DMSMember, BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember)
        {
            if (cc_DMSMember != null && DMSMember != null && !string.IsNullOrEmpty(DMSMember.MemberCode))
            {
                //判断会员除去4个字段,是否有过更改
                if (cc_DMSMember.Phone != DMSMember.Phone ||
                    cc_DMSMember.Fax != DMSMember.Fax ||
                    cc_DMSMember.CompanyWebSite != DMSMember.CompanyWebSite ||
                    cc_DMSMember.Email != DMSMember.Email ||
                    cc_DMSMember.Postcode != DMSMember.Postcode ||
                    cc_DMSMember.ContactAddress != DMSMember.ContactAddress
                    //cc_DMSMember.TrafficInfo != DMSMember.TrafficInfo ||
                    //cc_DMSMember.EnterpriseBrief != DMSMember.EnterpriseBrief ||
                    //cc_DMSMember.Remarks != DMSMember.Remarks
                    )
                {
                    int result = WebService.DealerInfoServiceHelper.Instance.UpdateDealerInfo(int.Parse(DMSMember.MemberCode),
                                                                                              cc_DMSMember.ContactAddress, cc_DMSMember.Postcode,
                                                                                              cc_DMSMember.Phone, cc_DMSMember.Fax,
                                                                                              cc_DMSMember.CompanyWebSite, cc_DMSMember.Email);
                    string resultStr     = string.Empty;
                    int    disposeStatus = 1;//已处理
                    switch (result)
                    {
                    case 0:
                        resultStr     = "更新失败";
                        disposeStatus = 2;    //未修改
                        break;

                    case 1:
                        resultStr = "更新成功";
                        break;

                    case -1:
                        resultStr     = "该经销商在DMS中不存在";
                        disposeStatus = 2;    //未修改
                        break;

                    case -2:
                        resultStr     = "该经销商不是免费或者导入的";
                        disposeStatus = 2;    //未修改
                        break;

                    case -3:
                        resultStr     = "该免费经销商已经有排期";
                        disposeStatus = 2;    //未修改
                        break;

                    case -4:
                        resultStr     = "销售电话格式不正确";
                        disposeStatus = 2;    //未修改
                        break;

                    case -5:
                        resultStr     = "传真格式不正确";
                        disposeStatus = 2;    //未修改
                        break;

                    default:
                        resultStr     = "其他异常";
                        disposeStatus = 2;    //未修改
                        break;
                    }
                    Entities.ProjectTask_AuditContrastInfo model = BLL.ProjectTask_AuditContrastInfo.Instance.GetProjectTask_AuditContrastInfo(recid);
                    if (model != null)
                    {
                        model.Remark        = resultStr;
                        model.DisposeTime   = DateTime.Now;
                        model.DisposeStatus = disposeStatus;
                        BLL.ProjectTask_AuditContrastInfo.Instance.Update(model);
                    }
                }
            }
        }
コード例 #13
0
        /// <summary>
        /// 插入到审核对照表,类型为:会员主营品牌变化,则生成记录
        /// </summary>
        /// <param name="cc_DMSMember">呼叫中心会员实体</param>
        /// <param name="DMSMember">CRM系统会员实体</param>
        /// <returns>返回插入记录主键ID</returns>
        public int InsertByDMSMemberBrandChange(Entities.ProjectTask_DMSMember cc_DMSMember, BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember)
        {
            int recid = -1;

            if (cc_DMSMember != null && DMSMember != null)
            {
                Entities.ProjectTask_AuditContrastInfo model = new Entities.ProjectTask_AuditContrastInfo();
                model.PTID          = cc_DMSMember.PTID;
                model.DMSMemberID   = DMSMember.ID.ToString();
                model.CustID        = DMSMember.CustID;
                model.CreateTime    = DateTime.Now;
                model.CreateUserID  = BLL.Util.GetLoginUserID();
                model.ExportStatus  = 0; //0-未导出,1-已导出
                model.DisposeStatus = 0; //未处理

                string contrastInfoInside = string.Empty;
                string contrastInfo       = string.Empty;

                //判断会员类型字段是否有过更改
                if (!BLL.Util.IsEqualsByStringArray(cc_DMSMember.BrandIDs, DMSMember.BrandIds))
                {
                    model.ContrastType  = 6;
                    contrastInfoInside += "BrandIDs:('" + Util.EscapeString(DMSMember.BrandIds) + "','" + Util.EscapeString(cc_DMSMember.BrandIDs) + "'),";
                    contrastInfo       += "会员主营品牌由:" + DMSMember.BrandNames +
                                          ",改为:" + cc_DMSMember.BrandNames + ",";
                    contrastInfoInside = contrastInfoInside.TrimEnd(',');
                    contrastInfo       = contrastInfo.TrimEnd(',');

                    if (contrastInfoInside != string.Empty &&
                        contrastInfo != string.Empty)
                    {
                        model.ContrastInfoInside = contrastInfoInside;
                        model.ContrastInfo       = contrastInfo;
                        if (string.IsNullOrEmpty(DMSMember.MemberCode)) //是否会员开通成功
                        {
                            model.DisposeStatus = 1;                    //已处理
                            model.DisposeTime   = DateTime.Now;
                        }
                        Insert(model);
                    }
                }
                contrastInfoInside = string.Empty;
                contrastInfo       = string.Empty;
            }
            return(recid);
        }
コード例 #14
0
 /// <summary>
 /// 获得会员除去4个字段的对照文本信息
 /// </summary>
 /// <param name="cc_DMSMember"></param>
 /// <param name="DMSMember"></param>
 /// <param name="contrastInfoInside"></param>
 /// <param name="contrastInfo"></param>
 private void GetDMSMemberContrastByPart2(Entities.ProjectTask_DMSMember cc_DMSMember, BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember, ref string contrastInfoInside, ref string contrastInfo)
 {
     if (cc_DMSMember.Phone != DMSMember.Phone)
     {
         contrastInfoInside += "Phone:('" + Util.EscapeString(DMSMember.Phone) + "','" + Util.EscapeString(cc_DMSMember.Phone) + "'),";
         contrastInfo       += "易湃会员电话由:" + DMSMember.Phone + ",改为:" + cc_DMSMember.Phone + ",";
     }
     if (cc_DMSMember.Fax != DMSMember.Fax)
     {
         contrastInfoInside += "Fax:('" + Util.EscapeString(DMSMember.Fax) + "','" + Util.EscapeString(cc_DMSMember.Fax) + "'),";
         contrastInfo       += "易湃会员传真由:" + DMSMember.Fax + ",改为:" + cc_DMSMember.Fax + ",";
     }
     if (cc_DMSMember.CompanyWebSite != DMSMember.CompanyWebSite)
     {
         contrastInfoInside += "CompanyWebSite:('" + Util.EscapeString(DMSMember.CompanyWebSite) + "','" + Util.EscapeString(cc_DMSMember.CompanyWebSite) + "'),";
         contrastInfo       += "易湃会员公司网址由:" + DMSMember.CompanyWebSite + ",改为:" + cc_DMSMember.CompanyWebSite + ",";
     }
     if (cc_DMSMember.Email != DMSMember.Email)
     {
         contrastInfoInside += "Email:('" + Util.EscapeString(DMSMember.Email) + "','" + Util.EscapeString(cc_DMSMember.Email) + "'),";
         contrastInfo       += "易湃会员Email由:" + DMSMember.Email + ",改为:" + cc_DMSMember.Email + ",";
     }
     if (cc_DMSMember.Postcode != DMSMember.Postcode)
     {
         contrastInfoInside += "Postcode:('" + Util.EscapeString(DMSMember.Postcode) + "','" + Util.EscapeString(cc_DMSMember.Postcode) + "'),";
         contrastInfo       += "易湃会员邮编由:" + DMSMember.Postcode + ",改为:" + cc_DMSMember.Postcode + ",";
     }
     if (cc_DMSMember.ContactAddress != DMSMember.ContactAddress)
     {
         contrastInfoInside += "ContactAddress:('" + Util.EscapeString(DMSMember.ContactAddress) + "','" + Util.EscapeString(cc_DMSMember.ContactAddress) + "'),";
         contrastInfo       += "易湃会员销售地址由:" + DMSMember.ContactAddress + ",改为:" + cc_DMSMember.ContactAddress + ",";
     }
     contrastInfoInside = contrastInfoInside.TrimEnd(',');
     contrastInfo       = contrastInfo.TrimEnd(',');
 }
コード例 #15
0
 /// <summary>
 /// 获得会员4个字段的对照文本信息
 /// </summary>
 /// <param name="cc_DMSMember"></param>
 /// <param name="DMSMember"></param>
 /// <param name="contrastInfoInside"></param>
 /// <param name="contrastInfo"></param>
 private void GetDMSMemberContrastByPart1(Entities.ProjectTask_DMSMember cc_DMSMember, BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember, ref string contrastInfoInside, ref string contrastInfo)
 {
     if (cc_DMSMember.Name != DMSMember.Name)
     {
         contrastInfoInside += "Name:('" + Util.EscapeString(DMSMember.Name) + "','" + Util.EscapeString(cc_DMSMember.Name) + "'),";
         contrastInfo       += "易湃会员名称由:" + DMSMember.Name + ",改为:" + cc_DMSMember.Name + ",";
     }
     if (cc_DMSMember.Abbr != DMSMember.Abbr)
     {
         contrastInfoInside += "Abbr:('" + Util.EscapeString(DMSMember.Abbr) + "','" + Util.EscapeString(cc_DMSMember.Abbr) + "'),";
         contrastInfo       += "易湃会员简称由:" + DMSMember.Abbr + ",改为:" + cc_DMSMember.Abbr + ",";
     }
     if (cc_DMSMember.ProvinceID != DMSMember.ProvinceID)
     {
         contrastInfoInside += "ProvinceID:('" + Util.EscapeString(DMSMember.ProvinceID) + "','" + Util.EscapeString(cc_DMSMember.ProvinceID) + "'),";
         contrastInfo       += "易湃会员所属省份由:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(DMSMember.ProvinceID) +
                               ",改为:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(cc_DMSMember.ProvinceID) + ",";
     }
     if (cc_DMSMember.CityID != DMSMember.CityID)
     {
         contrastInfoInside += "CityID:('" + Util.EscapeString(DMSMember.CityID) + "','" + Util.EscapeString(cc_DMSMember.CityID) + "'),";
         contrastInfo       += "易湃会员所属城市由:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(DMSMember.CityID) +
                               ",改为:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(cc_DMSMember.CityID) + ",";
     }
     if (cc_DMSMember.CountyID != DMSMember.CountyID)
     {
         contrastInfoInside += "CountyID:('" + Util.EscapeString(DMSMember.CountyID) + "','" + Util.EscapeString(cc_DMSMember.CountyID) + "'),";
         contrastInfo       += "易湃会员所属区县由:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(DMSMember.CountyID) +
                               ",改为:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(cc_DMSMember.CountyID) + ",";
     }
     if (cc_DMSMember.MemberType != DMSMember.MemberType)
     {
         contrastInfoInside += "MemberType:('" + Util.EscapeString(DMSMember.MemberType) + "','" + Util.EscapeString(cc_DMSMember.MemberType) + "'),";
         contrastInfo       += "易湃会员类型由:" + GetMemberType(DMSMember.MemberType) +
                               ",改为:" + GetMemberType(cc_DMSMember.MemberType) + ",";
     }
     contrastInfoInside = contrastInfoInside.TrimEnd(',');
     contrastInfo       = contrastInfo.TrimEnd(',');
 }
コード例 #16
0
        /// <summary>
        /// 插入到审核对照表,类型为:会员信息变化,若会员有变化,则生成记录
        /// </summary>
        /// <param name="cC_DMSMember">呼叫中心会员实体</param>
        /// <param name="DMSMember">CRM系统会员实体</param>
        /// <returns>返回插入记录主键ID</returns>
        public int InsertByDMSMemberChange(Entities.ProjectTask_DMSMember cc_DMSMember, BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember, out bool isChange)
        {
            int recid = -1;

            isChange = false;
            if (cc_DMSMember != null && DMSMember != null)
            {
                Entities.ProjectTask_AuditContrastInfo model = new Entities.ProjectTask_AuditContrastInfo();
                model.PTID         = cc_DMSMember.PTID;
                model.DMSMemberID  = DMSMember.ID.ToString();
                model.CustID       = DMSMember.CustID;
                model.CreateTime   = DateTime.Now;
                model.CreateUserID = BLL.Util.GetLoginUserID();
                model.ExportStatus = 0;//0-未导出,1-已导出

                string contrastInfoInside = string.Empty;
                string contrastInfo       = string.Empty;

                //判断会员4个字段是否有过更改
                if (cc_DMSMember.Name != DMSMember.Name ||
                    cc_DMSMember.Abbr != DMSMember.Abbr ||
                    cc_DMSMember.ProvinceID != DMSMember.ProvinceID ||
                    cc_DMSMember.CityID != DMSMember.CityID ||
                    cc_DMSMember.CountyID != DMSMember.CountyID ||
                    cc_DMSMember.MemberType != DMSMember.MemberType)
                {
                    model.ContrastType = 2;

                    GetDMSMemberContrastByPart1(cc_DMSMember, DMSMember,
                                                ref contrastInfoInside, ref contrastInfo);
                    if (contrastInfoInside != string.Empty &&
                        contrastInfo != string.Empty)
                    {
                        model.ContrastInfoInside = contrastInfoInside;
                        model.ContrastInfo       = contrastInfo;
                        if (string.IsNullOrEmpty(DMSMember.MemberCode)) //是否会员开通成功
                        {
                            model.DisposeStatus = 1;                    //已处理
                            model.DisposeTime   = DateTime.Now;
                        }
                        else
                        {
                            model.DisposeStatus = 0;//未处理
                            model.DisposeTime   = null;
                        }
                        isChange = true;
                        Insert(model);
                    }
                }
                contrastInfoInside = string.Empty;
                contrastInfo       = string.Empty;

                //判断会员除去4个字段,是否有过更改
                if (cc_DMSMember.Phone != DMSMember.Phone ||
                    cc_DMSMember.Fax != DMSMember.Fax ||
                    cc_DMSMember.CompanyWebSite != DMSMember.CompanyWebSite ||
                    cc_DMSMember.Email != DMSMember.Email ||
                    cc_DMSMember.Postcode != DMSMember.Postcode ||
                    cc_DMSMember.ContactAddress != DMSMember.ContactAddress
                    //cc_DMSMember.TrafficInfo != DMSMember.TrafficInfo ||
                    //cc_DMSMember.EnterpriseBrief != DMSMember.EnterpriseBrief ||
                    //cc_DMSMember.Remarks != DMSMember.Remarks
                    )
                {
                    model.ContrastType = 3;

                    GetDMSMemberContrastByPart2(cc_DMSMember, DMSMember,
                                                ref contrastInfoInside, ref contrastInfo);
                    if (contrastInfoInside != string.Empty &&
                        contrastInfo != string.Empty)
                    {
                        model.ContrastInfoInside = contrastInfoInside;
                        model.ContrastInfo       = contrastInfo;
                        if (string.IsNullOrEmpty(DMSMember.MemberCode)) //是否会员开通成功
                        {
                            model.DisposeStatus = 1;                    //已处理
                            model.DisposeTime   = DateTime.Now;
                        }
                        else
                        {
                            model.DisposeStatus = 0;//未处理
                            model.DisposeTime   = null;
                        }
                        recid = Insert(model);
                    }
                }
            }
            return(recid);
        }
コード例 #17
0
        //add by qizhiqiang 2012-4-25根据已开通易湃会员与cc 中的不用,生成变更信息
        /// <summary>
        /// 根据已开通易湃会员字段信息与CC中的不同,生成变更信息
        /// </summary>
        /// <param name="cc_DMSMember"></param>
        /// <param name="DMSMember"></param>
        /// <param name="contrastInfoInside"></param>
        /// <param name="contrastInfo"></param>
        private void GetDMSMemberContrastByOpenedDMSMember(Entities.ProjectTask_DMSMember cc_DMSMember, BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember, ref string contrastInfoInside, ref string contrastInfo)
        {
            if (!BLL.Util.IsEqualsByStringArray(cc_DMSMember.BrandIDs, DMSMember.BrandIds))
            {
                contrastInfoInside += "BrandIDs:('" + Util.EscapeString(DMSMember.BrandIds) + "','" + Util.EscapeString(cc_DMSMember.BrandIDs) + "'),";
                contrastInfo       += "易湃会员主营品牌由:" + DMSMember.BrandNames +
                                      ",改为:" + cc_DMSMember.BrandNames + ",";
            }
            if (cc_DMSMember.Name != DMSMember.Name)
            {
                contrastInfoInside += "Name:('" + Util.EscapeString(DMSMember.Name) + "','" + Util.EscapeString(cc_DMSMember.Name) + "'),";
                contrastInfo       += "易湃会员名称由:" + DMSMember.Name + ",改为:" + cc_DMSMember.Name + ",";
            }
            if (cc_DMSMember.Abbr != DMSMember.Abbr)
            {
                contrastInfoInside += "Abbr:('" + Util.EscapeString(DMSMember.Abbr) + "','" + Util.EscapeString(cc_DMSMember.Abbr) + "'),";
                contrastInfo       += "易湃会员简称由:" + DMSMember.Abbr + ",改为:" + cc_DMSMember.Abbr + ",";
            }
            if (cc_DMSMember.ProvinceID != DMSMember.ProvinceID)
            {
                contrastInfoInside += "ProvinceID:('" + Util.EscapeString(DMSMember.ProvinceID) + "','" + Util.EscapeString(cc_DMSMember.ProvinceID) + "'),";
                contrastInfo       += "易湃会员所属省份由:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(DMSMember.ProvinceID) +
                                      ",改为:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(cc_DMSMember.ProvinceID) + ",";
            }
            if (cc_DMSMember.CityID != DMSMember.CityID)
            {
                contrastInfoInside += "CityID:('" + Util.EscapeString(DMSMember.CityID) + "','" + Util.EscapeString(cc_DMSMember.CityID) + "'),";
                contrastInfo       += "易湃会员所属城市由:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(DMSMember.CityID) +
                                      ",改为:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(cc_DMSMember.CityID) + ",";
            }
            if (cc_DMSMember.CountyID != DMSMember.CountyID)
            {
                contrastInfoInside += "CountyID:('" + Util.EscapeString(DMSMember.CountyID) + "','" + Util.EscapeString(cc_DMSMember.CountyID) + "'),";
                contrastInfo       += "易湃会员所属区县由:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(DMSMember.CountyID) +
                                      ",改为:" + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(cc_DMSMember.CountyID) + ",";
            }
            if (cc_DMSMember.MemberType != DMSMember.MemberType)
            {
                contrastInfoInside += "MemberType:('" + Util.EscapeString(DMSMember.MemberType) + "','" + Util.EscapeString(cc_DMSMember.MemberType) + "'),";
                contrastInfo       += "易湃会员类型由:" + GetMemberType(DMSMember.MemberType) +
                                      ",改为:" + GetMemberType(cc_DMSMember.MemberType) + ",";
            }

            if (cc_DMSMember.Phone != DMSMember.Phone)
            {
                contrastInfoInside += "Phone:('" + Util.EscapeString(DMSMember.Phone) + "','" + Util.EscapeString(cc_DMSMember.Phone) + "'),";
                contrastInfo       += "易湃会员电话由:" + DMSMember.Phone + ",改为:" + cc_DMSMember.Phone + ",";
            }
            if (cc_DMSMember.Fax != DMSMember.Fax)
            {
                contrastInfoInside += "Fax:('" + Util.EscapeString(DMSMember.Fax) + "','" + Util.EscapeString(cc_DMSMember.Fax) + "'),";
                contrastInfo       += "易湃会员传真由:" + DMSMember.Fax + ",改为:" + cc_DMSMember.Fax + ",";
            }
            if (cc_DMSMember.CompanyWebSite != DMSMember.CompanyWebSite)
            {
                contrastInfoInside += "CompanyWebSite:('" + Util.EscapeString(DMSMember.CompanyWebSite) + "','" + Util.EscapeString(cc_DMSMember.CompanyWebSite) + "'),";
                contrastInfo       += "易湃会员公司网址由:" + DMSMember.CompanyWebSite + ",改为:" + cc_DMSMember.CompanyWebSite + ",";
            }
            if (cc_DMSMember.Email != DMSMember.Email)
            {
                contrastInfoInside += "Email:('" + Util.EscapeString(DMSMember.Email) + "','" + Util.EscapeString(cc_DMSMember.Email) + "'),";
                contrastInfo       += "易湃会员Email由:" + DMSMember.Email + ",改为:" + cc_DMSMember.Email + ",";
            }
            if (cc_DMSMember.Postcode != DMSMember.Postcode)
            {
                contrastInfoInside += "Postcode:('" + Util.EscapeString(DMSMember.Postcode) + "','" + Util.EscapeString(cc_DMSMember.Postcode) + "'),";
                contrastInfo       += "易湃会员邮编由:" + DMSMember.Postcode + ",改为:" + cc_DMSMember.Postcode + ",";
            }
            if (cc_DMSMember.ContactAddress != DMSMember.ContactAddress)
            {
                contrastInfoInside += "ContactAddress:('" + Util.EscapeString(DMSMember.ContactAddress) + "','" + Util.EscapeString(cc_DMSMember.ContactAddress) + "'),";
                contrastInfo       += "易湃会员销售地址由:" + DMSMember.ContactAddress + ",改为:" + cc_DMSMember.ContactAddress + ",";
            }
            if (cc_DMSMember.TrafficInfo != DMSMember.TrafficInfo)
            {
                contrastInfoInside += "TrafficInfo:('" + Util.EscapeString(DMSMember.TrafficInfo) + "','" + Util.EscapeString(cc_DMSMember.TrafficInfo) + "'),";
                contrastInfo       += "易湃会员交通信息由:" + DMSMember.TrafficInfo + ",改为:" + cc_DMSMember.TrafficInfo + ",";
            }
            if (cc_DMSMember.EnterpriseBrief != DMSMember.EnterpriseBrief)
            {
                contrastInfoInside += "EnterpriseBrief:('" + Util.EscapeString(DMSMember.EnterpriseBrief) + "','" + Util.EscapeString(cc_DMSMember.EnterpriseBrief) + "'),";
                contrastInfo       += "易湃会员企业简介由:" + DMSMember.EnterpriseBrief + ",改为:" + cc_DMSMember.EnterpriseBrief + ",";
            }
            if (cc_DMSMember.Remarks != DMSMember.Remarks)
            {
                contrastInfoInside += "Remarks:('" + Util.EscapeString(DMSMember.Remarks) + "','" + Util.EscapeString(cc_DMSMember.Remarks) + "'),";
                contrastInfo       += "易湃会员备注由:" + DMSMember.Remarks + ",改为:" + cc_DMSMember.Remarks + ",";
            }

            if (!BLL.Util.IsEqualsByStringArray(cc_DMSMember.SerialIds, DMSMember.SerialIds))
            {
                contrastInfoInside += "SerialIds:('" + Util.EscapeString(DMSMember.SerialIds) + "','" + Util.EscapeString(cc_DMSMember.SerialIds) + "'),";
                contrastInfo       += "易湃会员附属子品牌由:" + DMSMember.SerialNames +
                                      ",改为:" + cc_DMSMember.SerialNames + ",";
            }
        }
コード例 #18
0
        //add by qizhiqiang 2012-4-25
        /// <summary>
        /// 插入到审核对照表,类型为:已开通车易通信息变更,则生成记录
        /// </summary>
        /// <param name="cc_DMSMember">呼叫中心会员实体</param>
        /// <param name="DMSMember">CRM系统会员实体</param>
        /// <returns>返回插入记录主键ID</returns>
        public int InsertByOpenedDMSMemberChange(Entities.ProjectTask_DMSMember cc_DMSMember, BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember)
        {
            int recid = -1;

            if (cc_DMSMember != null && DMSMember != null)
            {
                Entities.ProjectTask_AuditContrastInfo model = new Entities.ProjectTask_AuditContrastInfo();
                model.PTID          = cc_DMSMember.PTID;
                model.DMSMemberID   = DMSMember.ID.ToString();
                model.CustID        = DMSMember.CustID;
                model.CreateTime    = null;
                model.CreateUserID  = BLL.Util.GetLoginUserID();
                model.ExportStatus  = 0; //0-未导出,1-已导出
                model.DisposeStatus = 0; //未处理

                string contrastInfoInside = string.Empty;
                string contrastInfo       = string.Empty;

                //已开通有排期车易通信息变更
                model.ContrastType = 9;

                //判断是否修改地图
                IsEqualsByMapList(cc_DMSMember.Lantitude, cc_DMSMember.Longitude, DMSMember.MapCoordinateList, ref contrastInfoInside, ref contrastInfo);


                if (!BLL.Util.IsEqualsByStringArray(cc_DMSMember.BrandIDs, DMSMember.BrandIds) ||
                    cc_DMSMember.Name != DMSMember.Name ||
                    cc_DMSMember.Abbr != DMSMember.Abbr ||
                    cc_DMSMember.ProvinceID != DMSMember.ProvinceID ||
                    cc_DMSMember.CityID != DMSMember.CityID ||
                    cc_DMSMember.CountyID != DMSMember.CountyID ||
                    cc_DMSMember.MemberType != DMSMember.MemberType ||
                    cc_DMSMember.Phone != DMSMember.Phone ||
                    cc_DMSMember.Fax != DMSMember.Fax ||
                    cc_DMSMember.CompanyWebSite != DMSMember.CompanyWebSite ||
                    cc_DMSMember.Email != DMSMember.Email ||
                    cc_DMSMember.Postcode != DMSMember.Postcode ||
                    cc_DMSMember.ContactAddress != DMSMember.ContactAddress ||
                    cc_DMSMember.TrafficInfo != DMSMember.TrafficInfo ||
                    cc_DMSMember.EnterpriseBrief != DMSMember.EnterpriseBrief ||
                    cc_DMSMember.Remarks != DMSMember.Remarks ||
                    !BLL.Util.IsEqualsByStringArray(cc_DMSMember.SerialIds, DMSMember.SerialIds)
                    )
                {
                    GetDMSMemberContrastByOpenedDMSMember(cc_DMSMember, DMSMember,
                                                          ref contrastInfoInside, ref contrastInfo);
                }
                if (contrastInfoInside != string.Empty &&
                    contrastInfo != string.Empty)
                {
                    contrastInfoInside = contrastInfoInside.TrimEnd(',');
                    contrastInfo       = contrastInfo.TrimEnd(',');

                    model.ContrastInfoInside = contrastInfoInside;
                    model.ContrastInfo       = contrastInfo;
                    //if (string.IsNullOrEmpty(DMSMember.MemberCode))//是否会员开通成功
                    //{
                    //    model.DisposeStatus = 1;//已处理
                    //    model.DisposeTime = DateTime.Now;
                    //}
                    Insert(model);
                }
            }
            return(recid);
        }
コード例 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string memberId            = string.Empty;
                string originalDMSMemberID = string.Empty;
                if (this.Member != null)
                {
                    originalDMSMemberID = MemberID.ToString();
                    memberId            = Member.MemberID.ToString();

                    this.tfMemberName.Value = Member.Name;
                    this.tfMemberAbbr.Value = Member.Abbr;
                    string[] splitPhone = BLL.Util.GetSplitStrArray(Member.Phone);
                    if ((!string.IsNullOrEmpty(Member.Phone)) && splitPhone.Length > 1)
                    {
                        for (int i = 0; i < splitPhone.Length && i < 3; i++)
                        {
                            (this.FindControl("tfPhone" + (i + 1)) as HtmlInputText).Value = splitPhone[i];
                        }
                    }
                    else
                    {
                        this.tfPhone1.Value = Member.Phone;
                    }
                    this.tfBrand.Value     = Member.BrandIDs;
                    this.tfBrandName.Value = Member.BrandNames;

                    this.InitialProvinceID = Member.ProvinceID;
                    this.InitialCityID     = Member.CityID;
                    this.InitialCountyID   = Member.CountyID;

                    this.tfAddress.Value = Member.ContactAddress;
                    this.Lat             = Member.Lantitude;
                    this.Lng             = Member.Longitude;

                    string[] splitFax = BLL.Util.GetSplitStrArray(Member.Fax);
                    if ((!string.IsNullOrEmpty(Member.Fax)) && splitFax.Length > 0)
                    {
                        for (int i = 0; i < splitFax.Length && i < 2; i++)
                        {
                            (this.FindControl("tfFax" + (i + 1)) as HtmlInputText).Value = splitFax[i];
                        }
                    }
                    else
                    {
                        this.tfFax1.Value = Member.Fax;
                    }

                    this.tfCompanyWebSite.Value = Member.CompanyWebSite;
                    this.tfEmail.Value          = Member.Email;
                    this.tfZipcode.Value        = Member.Postcode;

                    this.txtSerialIds.Value = Member.SerialIds;
                    this.txtSerial.Value    = Member.SerialNames;

                    this.tfTrafficInfo.Value     = Member.TrafficInfo;
                    this.tfEnterpriseBrief.Value = Member.EnterpriseBrief;
                    this.tfNotes.Value           = Member.Remarks;

                    this.selMemberType.Value = Member.MemberType;

                    if (!string.IsNullOrEmpty(Member.OriginalDMSMemberID))
                    {
                        originalDMSMemberID = Member.OriginalDMSMemberID;
                        BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(new Guid(Member.OriginalDMSMemberID));
                        if (DMSMember != null)
                        {
                            if (DMSMember.Cooperated == 1)
                            {
                                string temp = "";
                                //易湃会员
                                DataTable dtCYT = BitAuto.YanFa.Crm2009.BLL.CYTMember.Instance.GetCYTMemberLastByMemberCode(DMSMember.MemberCode, -1);
                                if (dtCYT != null && dtCYT.Rows.Count > 0)
                                {
                                    dtCYT.DefaultView.Sort = "createtime Desc";
                                    foreach (DataRow item in dtCYT.DefaultView.ToTable().Rows)
                                    {
                                        temp += (Convert.ToDateTime(item["begintime"]).ToString("yyyy-MM-dd")
                                                 + "至" + Convert.ToDateTime(item["endtime"]).ToString("yyyy-MM-dd") + "<br/>");
                                    }
                                    temp = temp.Substring(0, temp.LastIndexOf("<br/>") > 0 ? temp.LastIndexOf("<br/>") : 0);
                                }
                                this.spanMemberCooperated.InnerHtml = temp;
                            }
                            else if (DMSMember.Cooperated <= 0)
                            {
                                this.spanMemberCooperated.InnerText = "无排期";
                            }
                            else if (DMSMember.CooperateStatus == 1 || DMSMember.CooperateStatus == 2)//销售+试用
                            {
                                this.spanMemberCooperated.InnerText = "合作中";
                            }

                            if (!string.IsNullOrEmpty(DMSMember.MemberCode))
                            {
                                int memberCode = 0;
                                if (int.TryParse(DMSMember.MemberCode, out memberCode))
                                {
                                    DealerInfoServiceHelper soapClient = new DealerInfoServiceHelper();
                                    DataSet ds = soapClient.GetDealer400(memberCode);
                                    if (ds.Tables[0].Rows.Count > 0)
                                    {
                                        span400.InnerText = ds.Tables[0].Rows[0][2].ToString();
                                    }
                                }
                            }
                        }
                    }
                }
                //if (IsShowSurvey)
                //{
                //    Control ctl = this.LoadControl("~/CustInfo/EditVWithCalling/UCEditSurvey.ascx", this.TaskID, originalDMSMemberID, memberId);
                //    this.PlaceSurvey.Controls.Add(ctl);
                //}
            }
        }
コード例 #20
0
        //private void BindQuestionnaireInfo()
        //{
        //    repeaterQ.DataSource = BLL.CC_Questionnaire.Instance.GetCC_Questionnaire(string.Empty, "CreateTime");
        //    repeaterQ.DataBind();
        //}

        //protected void repeaterQ_ItemDataBound(Object Sender, RepeaterItemEventArgs e)
        //{
        //    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        //    {
        //        int qustID = int.Parse(DataBinder.Eval(e.Item.DataItem, "QustID").ToString().Trim());
        //        Repeater rOpt = e.Item.FindControl("repeaterOpt") as Repeater;
        //        rOpt.DataSource = BLL.CC_QuestionnairOption.Instance.GetCC_QuestionnairOption(" QustID=" + qustID, "CreateTime");
        //        rOpt.DataBind();
        //    }
        //}

        //protected string IsCheck(string custId, string optId)
        //{
        //    string result = string.Empty;
        //    Entities.CC_TaskQuestionnaire taskQ = BLL.CC_TaskQuestionnaire.Instance.GetCC_TaskQuestionnaire(OriginalDMSMemberID, int.Parse(custId), 1);
        //    if (taskQ != null)
        //    {
        //        if (taskQ.QustOptID == int.Parse(optId))
        //        {
        //            result = "checked=true;";
        //        }
        //    }

        //    return result;
        //}
        //protected string GetQustDescript( string custId)
        //{
        //    string result = string.Empty;
        //    Entities.CC_TaskQuestionnaire taskQ = BLL.CC_TaskQuestionnaire.Instance.GetCC_TaskQuestionnaire(OriginalDMSMemberID, int.Parse(custId), 1);
        //    if (taskQ != null)
        //    {
        //        result = taskQ.Description;
        //    }

        //    return result;
        //}
        #endregion

        private void LoadMemberInfo()
        {
            Control ctl;
            Control ct2;
            int     memberId = -1;

            if (int.TryParse(MemberID, out memberId))
            {
                //车易通
                Entities.ProjectTask_DMSMember m = BLL.ProjectTask_DMSMember.Instance.GetProjectTask_DMSMember(memberId);
                //4-19 正式测试注释去掉
                if (m != null)
                {
                    if (m.Status != -1)
                    {
                        OriginalDMSMemberID = m.OriginalDMSMemberID;
                        if (OriginalDMSMemberID != "")
                        {
                            BitAuto.YanFa.Crm2009.Entities.DMSMember dmsM = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(new Guid(m.OriginalDMSMemberID));
                            if (dmsM != null)
                            {
                                if (dmsM.SyncStatus != (int)BitAuto.YanFa.Crm2009.Entities.EnumDMSSyncStatus.Rejected)
                                {
                                    btnDisplay = "style='display:none;'";
                                    ctl        = this.LoadControl("~/CustInfo/DetailV/UCMember.ascx", m);
                                }
                                else
                                {
                                    btnDisplay = "style='display:block;'";
                                    ctl        = this.LoadControl("~/CustInfo/EditVWithCalling/UCEditMember.ascx", m);
                                }
                                this.PlaceHolder.Controls.Add(ctl);
                            }
                            else
                            {
                                btnDisplay = "style='display:none;'";
                            }
                        }
                    }
                }

                //车商通
                Entities.ProjectTask_CSTMember mcst = BLL.ProjectTask_CSTMember.Instance.GetProjectTask_CSTMember(memberId);
                if (mcst != null)
                {
                    if (mcst.Status != -1)
                    {
                        OriginalCSTRecID = mcst.OriginalCSTRecID;
                        if (OriginalCSTRecID != "")
                        {
                            BitAuto.YanFa.Crm2009.Entities.CstMember cstM = BitAuto.YanFa.Crm2009.BLL.CstMember.Instance.GetCSTMember(OriginalCSTRecID);
                            if (cstM != null)
                            {
                                if (cstM.SyncStatus != (int)BitAuto.YanFa.Crm2009.Entities.EnumCSTSyncStatus.Rejected)
                                {
                                    btnDisplay = "style='display:none;'";
                                    ct2        = this.LoadControl("~/CustInfo/DetailV/UCCstMember.ascx", cstM);
                                }
                                else
                                {
                                    btnDisplay = "style='display:block;'";
                                    ct2        = this.LoadControl("~/CustInfo/EditVWithCalling/UCEditSndCstMember.ascx", cstM);
                                }
                                this.CSTPlaceHolder.Controls.Add(ct2);
                            }
                            else
                            {
                                btnDisplay = "style='display:none;'";
                            }
                        }
                    }
                }
            }
        }
コード例 #21
0
        private void BindMemberDDL(List <Entities.ProjectTask_DMSMember> ccmemberList, List <Entities.ProjectTask_CSTMember> cc_cstmemberList)
        {
            ddlMember.DataTextField  = "Name";
            ddlMember.DataValueField = "BindID";
            DataTable dt    = new DataTable();
            DataTable dtcyt = BLL.Util.ListToDataTable(ccmemberList);

            dt.Columns.Add("Name", typeof(string));
            dt.Columns.Add("BindID", typeof(string));
            if (dtcyt != null)
            {
                foreach (DataRow dr in dtcyt.Rows)
                {
                    DataRow drlist = dt.NewRow();
                    string  OriginalDMSMemberID = dr["OriginalDMSMemberID"].ToString().Trim();
                    string  membercode          = string.Empty;
                    drlist["Name"] = dr["name"].ToString();
                    if (!string.IsNullOrEmpty(OriginalDMSMemberID))
                    {
                        BitAuto.YanFa.Crm2009.Entities.DMSMember memberModel = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(new Guid(OriginalDMSMemberID));
                        if (memberModel != null)
                        {
                            membercode = memberModel.MemberCode;
                            //1为车易通
                            drlist["BindID"] = memberModel.ID + "|" + membercode + "|" + "1";
                        }
                        else
                        {
                            drlist["BindID"] = dr["MemberID"] + "|" + "|" + "1";
                        }
                    }
                    else
                    {
                        drlist["BindID"] = dr["MemberID"] + "|" + "|" + "1";
                    }
                    dt.Rows.Add(drlist);
                }
            }
            if (cc_cstmemberList != null && cc_cstmemberList.Count > 0)
            {
                DataTable dtcst = BLL.Util.ListToDataTable(cc_cstmemberList);
                if (dtcst != null)
                {
                    foreach (DataRow dr in dtcst.Rows)
                    {
                        DataRow drlist = dt.NewRow();
                        drlist["Name"] = dr["FULLName"].ToString();
                        string OriginalCstRecID = dr["originalcstRecid"].ToString().Trim();
                        if (!string.IsNullOrEmpty(OriginalCstRecID) && OriginalCstRecID.Length > 0)
                        {
                            BitAuto.YanFa.Crm2009.Entities.CstMember cstmemberModel = BitAuto.YanFa.Crm2009.BLL.CstMember.Instance.GetCstMemberModel(OriginalCstRecID);
                            //2为车商通
                            if (cstmemberModel != null)
                            {
                                string membercode = string.Empty;
                                if (cstmemberModel.CstMemberID.ToString() != "0" && cstmemberModel.CstMemberID.ToString() != "-2")
                                {
                                    membercode = cstmemberModel.CstMemberID.ToString();
                                }

                                drlist["BindID"] = cstmemberModel.CSTRecID + "|" + membercode + "|" + "2";
                            }
                            else
                            {
                                drlist["BindID"] = dr["ID"] + "|" + "|" + "2";
                            }
                        }
                        else
                        {
                            drlist["BindID"] = dr["ID"] + "|" + "|" + "2";
                        }
                        dt.Rows.Add(drlist);
                    }
                }
            }
            ddlMember.DataSource = dt;
            ddlMember.DataBind();
            ddlMember.Items.Insert(0, new ListItem("选择会员", "-1"));
        }
コード例 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string originalDMSMemberID = string.Empty;
                if (this.Member != null)
                {
                    originalDMSMemberID           = Member.MemberID.ToString();
                    this.spanMemberName.InnerText = Member.Name;
                    this.spanMemberAbbr.InnerText = Member.Abbr;
                    this.spanPhone.InnerText      = Member.Phone;

                    this.spanBrandName.InnerText = Member.BrandNames;

                    string area = "";
                    if (!string.IsNullOrEmpty(this.Member.ProvinceID))
                    {
                        area += BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(this.Member.ProvinceID);
                    }
                    if (!string.IsNullOrEmpty(this.Member.CityID))
                    {
                        area += " " + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(this.Member.CityID);
                    }
                    if (!string.IsNullOrEmpty(this.Member.CountyID))
                    {
                        area += " " + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(this.Member.CountyID);
                    }
                    this.spanArea.InnerText = area;

                    this.spanAddress.InnerText = Member.ContactAddress;

                    this.Lat = Member.Lantitude;
                    this.Lng = Member.Longitude;
                    //if (Member.MemberType == "1")
                    //{
                    //    spanMemberType.InnerText = "4S";
                    //}
                    //else if (Member.MemberType == "2")
                    //{
                    //    spanMemberType.InnerText = "特许经销商";
                    //}
                    //else if (Member.MemberType == "3")
                    //{
                    //    spanMemberType.InnerText = "综合店";
                    //}
                    //else if (Member.MemberType == "4")
                    //{
                    //    spanMemberType.InnerText = "车易达";
                    //}
                    //else if (Member.MemberType == "5")
                    //{
                    //    spanMemberType.InnerText = "二手车中心";
                    //}
                    spanMemberType.InnerText          = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetMemberTypeText(Member.MemberType);
                    this.spanFax.InnerText            = Member.Fax;
                    this.spanCompanyWebSite.InnerText = Member.CompanyWebSite;
                    this.spanEmail.InnerText          = Member.Email;
                    this.spanZipcode.InnerText        = Member.Postcode;

                    this.spanSerial.InnerText = Member.SerialNames;

                    this.spanTrafficInfo.InnerText     = Member.TrafficInfo;
                    this.spanEnterpriseBrief.InnerText = Member.EnterpriseBrief;
                    this.spanNotes.InnerText           = Member.Remarks;

                    if (!string.IsNullOrEmpty(Member.OriginalDMSMemberID))
                    {
                        originalDMSMemberID = Member.OriginalDMSMemberID;
                        BitAuto.YanFa.Crm2009.Entities.DMSMember DMSMember = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(new Guid(Member.OriginalDMSMemberID));
                        if (DMSMember != null)
                        {
                            if (DMSMember.Cooperated == 1 && DMSMember.CooperateStatus == 0)
                            {
                                this.spanMemberCooperated.InnerText = "有排期";
                            }
                            else if (DMSMember.Cooperated <= 0)
                            {
                                this.spanMemberCooperated.InnerText = "无排期";
                            }
                            else if (DMSMember.CooperateStatus == 1 || DMSMember.CooperateStatus == 2)//销售+试用
                            {
                                this.spanMemberCooperated.InnerText = "合作中";
                            }
                            if (!string.IsNullOrEmpty(DMSMember.MemberCode))
                            {
                                int memberCode = 0;
                                if (int.TryParse(DMSMember.MemberCode, out memberCode))
                                {
                                    DealerInfoServiceHelper soapClient = new DealerInfoServiceHelper();
                                    DataSet ds = soapClient.GetDealer400(memberCode);
                                    if (ds.Tables[0].Rows.Count > 0)
                                    {
                                        span400.InnerText = ds.Tables[0].Rows[0][2].ToString();
                                    }
                                }
                            }
                        }
                    }
                    //int AnswerCount = BLL.CC_TaskQuestionnaire.Instance.GetMaxAnswerCount(originalDMSMemberID);
                    //if (AnswerCount != 0)
                    //{
                    //    Control ctl = this.LoadControl("~/CustInfo/EditVWithCalling/UCCurrentSurvey.ascx", Member.TID, originalDMSMemberID);
                    //    this.PlaceSurvey.Controls.Add(ctl);
                    //}
                }
            }
        }