Beispiel #1
0
        /// <summary>
        /// 获取供应商-地接社列表信息集合
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="pageSize">页记录数</param>
        /// <param name="pageIndex">页索引</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="chaXun">查询实体</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.GysStructure.MLBDiJieSheInfo> GetDiJieShes(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.GysStructure.MLBChaXunInfo chaXun)
        {
            if (string.IsNullOrEmpty(companyId))
            {
                return(null);
            }

            bool isOnlySelf = false;

            int[] depts = null;

            depts = GetDataPrivs(EyouSoft.Model.EnumType.PrivsStructure.Menu2.资源管理_地接社, out isOnlySelf);

            var items = dal.GetDiJieShes(companyId, pageSize, pageIndex, ref recordCount, chaXun, isOnlySelf, LoginUserId, depts);

            if (items != null && items.Count > 0)
            {
                var citybll = new EyouSoft.BLL.ComStructure.BComCity();
                foreach (var item in items)
                {
                    item.CPCD = citybll.GetCPCD(companyId, item.CPCD.CountryId, item.CPCD.ProvinceId, item.CPCD.CityId, item.CPCD.DistrictId);
                }
            }

            return(items);
        }
Beispiel #2
0
        /// <summary>
        /// 获取导入客户管理号码集合
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="pageSize">页记录数</param>
        /// <param name="pageIndex">页索引</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="searchInfo">查询信息</param>
        /// <returns></returns>
        public IList<EyouSoft.Model.SmsStructure.MLBDaoRuLxrInfo> GetLxrs(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.SmsStructure.MLBDaoRuLxrSearchInfo searchInfo)
        {
            if (string.IsNullOrEmpty(companyId)) return null;

            var items = dal.GetLxrs(companyId, pageSize, pageIndex, ref recordCount, searchInfo);

            if (items != null && items.Count > 0)
            {
                var citybll = new EyouSoft.BLL.ComStructure.BComCity();
                foreach (var item in items)
                {
                    item.CPCD = citybll.GetCPCD(companyId, item.CountryId, item.ProvinceId, item.CityId, item.DistrictId);
                }
            }
            return items;
        }
Beispiel #3
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void BindSource()
        {
            EyouSoft.BLL.SourceStructure.BSource bSource = new EyouSoft.BLL.SourceStructure.BSource();

            EyouSoft.Model.SourceStructure.MSourceTravel sourceTravel = bSource.GetTravelServiceModel(SiteUserInfo.SourceCompanyInfo.CompanyId);
            if (sourceTravel != null)
            {
                //查询国家、省市区域
                EyouSoft.BLL.ComStructure.BComCity bComCity = new EyouSoft.BLL.ComStructure.BComCity();
                EyouSoft.Model.ComStructure.MCPCC  m        = bComCity.GetCPCD(CurrentUserCompanyID, sourceTravel.SourceModel.CountryId, sourceTravel.SourceModel.ProvinceId, sourceTravel.SourceModel.CityId, sourceTravel.SourceModel.CountyId);
                if (m != null)
                {
                    this.lblCountry.Text = m.CountryName;
                    this.lblProvice.Text = m.ProvinceName;
                    this.lblCity.Text    = m.CityName;
                    this.lblCounty.Text  = m.CountyName;

                    this.lblType.Text = m.CountryName == "中国" ? "国内" : "国外";
                }
                this.lblName.Text = sourceTravel.SourceModel.Name;


                this.lblLicense.Text                  = sourceTravel.SourceModel.LicenseKey;
                this.lblLegalRepresentative.Text      = sourceTravel.SourceTravelModel.LegalRepresentative;
                this.lblLegalRepresentativePhone.Text = sourceTravel.SourceTravelModel.Telephone;
                this.lblAddress.Text                  = sourceTravel.SourceModel.Address;

                this.lblIsSignContract.Text = sourceTravel.SourceModel.IsSignContract == true ? "是" : "否";
                this.lblEffectTime.Text     = sourceTravel.SourceModel.ContractPeriodEnd != null?sourceTravel.SourceModel.ContractPeriodEnd.Value.ToString("yyyy-MM-dd") : string.Empty;

                this.lblFeatureRoute.Text = sourceTravel.SourceTravelModel.Routes;

                this.lblIsSign.Text = sourceTravel.SourceModel.IsPermission == true ? "是" : "否";

                this.lblIsRecommend.Text = sourceTravel.SourceModel.IsRecommend == true ? "是" : "否";

                this.lblIsRebatePolicy.Text = sourceTravel.SourceModel.IsCommission == true ? "是" : "否";

                this.lblRebatePolicy.Text = sourceTravel.SourceModel.UnitPolicy;
            }
        }
Beispiel #4
0
        /// <summary>
        /// 获取客户单位信息集合
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="pageIndex">页索引</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="crmType">客户单位类型</param>
        /// <param name="searchInfo">查询信息</param>
        /// <returns></returns>
        public IList <Model.CrmStructure.MLBCrmInfo> GetCrms(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.EnumType.CrmStructure.CrmType crmType, EyouSoft.Model.CrmStructure.MLBCrmSearchInfo searchInfo)
        {
            if (string.IsNullOrEmpty(companyId))
            {
                return(null);
            }
            if (crmType == EyouSoft.Model.EnumType.CrmStructure.CrmType.个人会员)
            {
                return(null);
            }

            bool isOnlySelf = false;

            int[] depts = null;

            if (crmType == EyouSoft.Model.EnumType.CrmStructure.CrmType.单位直客)
            {
                depts = GetDataPrivs(EyouSoft.Model.EnumType.PrivsStructure.Menu2.客户管理_单位直客, out isOnlySelf);
            }
            else if (crmType == EyouSoft.Model.EnumType.CrmStructure.CrmType.行客户)
            {
                depts = GetDataPrivs(EyouSoft.Model.EnumType.PrivsStructure.Menu2.客户管理_同行客户, out isOnlySelf);
            }

            var items = dal.GetCrms(companyId, LoginUserId, depts, pageSize, pageIndex, ref recordCount, crmType, searchInfo);

            if (items != null && items.Count > 0)
            {
                var citybll = new EyouSoft.BLL.ComStructure.BComCity();
                foreach (var item in items)
                {
                    item.CPCD = citybll.GetCPCD(companyId, item.CountryId, item.ProvinceId, item.CityId, item.DistrictId);
                }
            }

            return(items);
        }
Beispiel #5
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void BindSource()
        {
            EyouSoft.BLL.CrmStructure.BCrm   bCrm = new EyouSoft.BLL.CrmStructure.BCrm();
            EyouSoft.Model.CrmStructure.MCrm mCrm = bCrm.GetInfo(SiteUserInfo.TourCompanyInfo.CompanyId);
            //查询国家、省市区域的
            EyouSoft.BLL.ComStructure.BComCity bComCity = new EyouSoft.BLL.ComStructure.BComCity();
            EyouSoft.Model.ComStructure.MCPCC  m        = bComCity.GetCPCD(CurrentUserCompanyID, mCrm.CountryId, mCrm.ProvinceId, mCrm.CityId, mCrm.CountyId);
            if (m != null)
            {
                this.lblCountry.Text = m.CountryName;
                this.lblProvice.Text = m.ProvinceName;
                this.lblCity.Text    = m.CityName;
                this.lblCounty.Text  = m.CountyName;
            }

            this.lblName.Text                      = mCrm.Name;
            this.lblAddress.Text                   = mCrm.Address;
            this.lblOrganizationCode.Text          = mCrm.OrganizationCode;
            this.lblLegalRepresentative.Text       = mCrm.LegalRepresentative;
            this.lblLegalRepresentativeMobile.Text = mCrm.LegalRepresentativeMobile;
            this.lblLegalRepresentativePhone.Text  = mCrm.LegalRepresentativePhone;
            this.lblLicense.Text                   = mCrm.License;
            this.lblFinancialName.Text             = mCrm.FinancialName;
            this.lblFinancialPhone.Text            = mCrm.FinancialPhone;
            this.lblFinancialMobile.Text           = mCrm.FinancialMobile;

            //查询销售员
            EyouSoft.BLL.ComStructure.BComUser   bUser = new EyouSoft.BLL.ComStructure.BComUser();
            EyouSoft.Model.ComStructure.MComUser user  = bUser.GetModel(mCrm.SellerId, SiteUserInfo.CompanyId);
            if (null != user)
            {
                this.lblSeller.Text = user.UserName;
            }

            this.lblBrevityCode.Text  = mCrm.BrevityCode;
            this.lblRebatePolicy.Text = mCrm.RebatePolicy;
        }
        /// <summary>
        /// init edit info
        /// </summary>
        void InitEditInfo()
        {
            if (string.IsNullOrEmpty(DingDanId))
            {
                return;
            }

            var info = new EyouSoft.BLL.YlStructure.BLiPinKa().GetLiPinKaDingDanInfo(DingDanId);

            if (info == null)
            {
                return;
            }

            ltrDingDanHao.Text       = info.JiaoYiHao;
            ltrLiPinKaMingCheng.Text = info.LiPinKaMingCheng;
            ltrLiPinKaJinE.Text      = info.JinE1.ToString("F2");
            ltrLiPinKaLeiXing.Text   = info.LiPinKaLeiXing.ToString();
            ltrHuiYuanXingMing.Text  = info.HuiYuanXingMing;
            ltrShuLiang.Text         = info.ShuLiang.ToString();
            ltrJinE.Text             = info.JinE.ToString("F2");
            ltrDingDanStatus.Text    = info.DingDanStatus.ToString();
            ltrFuKuanStatus.Text     = info.FuKuanStatus.ToString();
            if (info.IsXuYaoFaPiao)
            {
                ltrFaPiao.Text = "发票抬头:" + info.FaPiaoTaiTou + "<br/>发票明细:" + info.FaPiaoMingXi;

                if (info.FaPiaoPeiSongFangShi == EyouSoft.Model.EnumType.YlStructure.FaPiaoPeiSongFangShi.快递)
                {
                    if (!string.IsNullOrEmpty(info.FaPiaoDiZhiId))
                    {
                        var diZhiInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDiZhiInfo(info.FaPiaoDiZhiId);
                        if (diZhiInfo != null)
                        {
                            var    citybll = new EyouSoft.BLL.ComStructure.BComCity();
                            var    CPCD    = citybll.GetCPCD(CurrentUserCompanyID, diZhiInfo.GuoJiaId, diZhiInfo.ShengFenId, diZhiInfo.ChengShiId, diZhiInfo.XianQuId);
                            string s       = string.Empty;
                            if (CPCD != null)
                            {
                                s = CPCD.CountryName + "-" + CPCD.ProvinceName + "-" + CPCD.CityName + "-" + CPCD.CountyName + "&nbsp;";
                            }

                            ltrPeiSongFangShi.Text = "快递<br/>地址:" + s + diZhiInfo.DiZhi + "&nbsp;邮编:" + diZhiInfo.YouBian + "<br/>收件人:" + diZhiInfo.XingMing + "&nbsp;&nbsp;" + diZhiInfo.DianHua;
                        }
                    }
                }
                else
                {
                    ltrPeiSongFangShi.Text = "自取";
                }
            }
            else
            {
                ltrFaPiao.Text = "无需发票";
            }

            ltrXiaDanShiJian.Text = info.IssueTime.ToString();
            ltrZengYu.Text        = info.ZengYu;

            if (!string.IsNullOrEmpty(info.SlrDiZhiId))
            {
                var diZhiInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDiZhiInfo(info.SlrDiZhiId);
                if (diZhiInfo != null)
                {
                    ltrSlrXingMing.Text = diZhiInfo.XingMing;
                    var    citybll = new EyouSoft.BLL.ComStructure.BComCity();
                    var    CPCD    = citybll.GetCPCD(CurrentUserCompanyID, diZhiInfo.GuoJiaId, diZhiInfo.ShengFenId, diZhiInfo.ChengShiId, diZhiInfo.XianQuId);
                    string s       = string.Empty;
                    if (CPCD != null)
                    {
                        s = CPCD.CountryName + "-" + CPCD.ProvinceName + "-" + CPCD.CityName + "-" + CPCD.CountyName + "&nbsp;";
                    }

                    ltrSlrDiZhi.Text = "地址:" + s + diZhiInfo.DiZhi + "&nbsp;邮编:" + diZhiInfo.YouBian + "<br/>收件人:" + diZhiInfo.XingMing + "&nbsp;&nbsp;" + diZhiInfo.DianHua;
                }
            }

            if (info.DingDanStatus != EyouSoft.Model.EnumType.YlStructure.LiPinKaDingDanStatus.已取消 &&
                info.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款)
            {
                phQuXiao.Visible = true;
            }
        }
Beispiel #7
0
        private void Bind()
        {
            if (!string.IsNullOrEmpty(EyouSoft.Common.Utils.GetQueryStringValue("crmId")))
            {
                EyouSoft.Model.CrmStructure.MCrm crmModel = crmBll.GetInfo(EyouSoft.Common.Utils.GetQueryStringValue("crmId"));
                if (crmBll != null)
                {
                    lblAddress.Text     = crmModel.Address;
                    lblBrevityCode.Text = crmModel.BrevityCode;
                    lblAmountOwed.Text  = crmModel.AmountOwed.ToString("C");
                    EyouSoft.Model.ComStructure.MCPCC cpccModel = cityBll.GetCPCD(crmModel.CompanyId, crmModel.CountryId, crmModel.ProvinceId, crmModel.CityId, crmModel.CountyId);
                    lblCity.Text                      = cpccModel.CityName;
                    lblCountry.Text                   = cpccModel.CountryName;
                    lblCounty.Text                    = cpccModel.CountyName;
                    lblProvince.Text                  = cpccModel.ProvinceName;
                    lblDeadline.Text                  = crmModel.Deadline.ToString();
                    lblFinancialMobile.Text           = crmModel.FinancialMobile;
                    lblFinancialName.Text             = crmModel.FinancialName;
                    lblFinancialPhone.Text            = crmModel.FinancialPhone;
                    lblIsSignContract.Text            = (!crmModel.IsSignContract) ? "否" : "是";
                    lblLegalRepresentative.Text       = crmModel.LegalRepresentative;
                    lblLegalRepresentativeMobile.Text = crmModel.LegalRepresentativeMobile;
                    lblLegalRepresentativePhone.Text  = crmModel.LegalRepresentativePhone;
                    lblLicense.Text                   = crmModel.License;
                    lblName.Text                      = crmModel.Name;
                    lblOrganizationCode.Text          = crmModel.OrganizationCode;
                    //lblRebatePolicy.Text = crmModel.RebatePolicy;
                    lblSellerId.Text = crmModel.SellerName;
                    if (crmModel.BankList != null && crmModel.BankList.Count > 0)
                    {
                        rptBank.DataSource = crmModel.BankList;
                        rptBank.DataBind();
                    }
                    else
                    {
                        phYinHangZhangHuEmpty.Visible = true;
                    }

                    if (crmModel.LinkManList != null && crmModel.LinkManList.Count > 0)
                    {
                        for (int i = 0; i < crmModel.LinkManList.Count; i++)
                        {
                            EyouSoft.Model.ComStructure.MComUser userModel = userBll.GetModel(crmModel.LinkManList[i].UserId, base.SiteUserInfo.CompanyId);
                            string html = string.Empty;
                            if (userModel != null)
                            {
                                html = string.Format("<table cellspacing='0' cellpadding='0' border='0' width='100%' class='pp-tableclass'><tr class='pp-table-title'><th height='23' align='center'>帐号</th><th align='center'>密码</th><th height='23' align='center'>状态</th></tr><tr ><td align='center'>{0}</td><td align='center'>{1}</td><td align='center'>{2}</td></tr></table>", userModel.UserName, userModel.Password, userModel.UserStatus.ToString());
                                userListString.Add(crmModel.LinkManList[i].UserId, html);
                            }
                        }

                        rptLinkMan.DataSource = crmModel.LinkManList;
                        rptLinkMan.DataBind();
                    }
                    if (crmModel.AttachModel != null)
                    {
                        filename = crmModel.AttachModel.Name;
                        filepath = crmModel.AttachModel.FilePath;
                    }
                }
            }
        }