コード例 #1
0
        /// <summary>
        /// 根据用户MQID获得公司以及当前用户明细信息实体类
        /// </summary>
        /// <param name="userMqId">用户MQID</param>
        /// <returns></returns>
        private EyouSoft.Model.CompanyStructure.CompanyAndUserInfo GetUserCompanyModel(int userMqId)
        {
            if (userMqId <= 0)
            {
                return(null);
            }
            EyouSoft.Model.CompanyStructure.CompanyAndUserInfo modelAll = null;
            string companyid = "";

            EyouSoft.Model.CompanyStructure.CompanyUser user = uIdal.GetModel(userMqId);
            if (user != null)
            {
                modelAll      = new EyouSoft.Model.CompanyStructure.CompanyAndUserInfo();
                companyid     = user.CompanyID;
                modelAll.User = user;
            }
            user = null;
            if (string.IsNullOrEmpty(companyid))
            {
                return(null);
            }

            EyouSoft.Model.CompanyStructure.CompanyDetailInfo company = cIdal.GetModel(companyid);
            if (company != null)
            {
                modelAll.Company = company;
            }
            company = null;

            return(modelAll);
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int MqId = 0;
                if (Request.QueryString["im_username"] != null)
                {
                    int.TryParse(Request.QueryString["im_username"].ToString(), out MqId);
                }
                if (MqId == 0)
                {
                    EyouSoft.Common.Function.MessageBox.Show(this.Page, "alert('未能找到您要查看的用户信息!')");
                    return;
                }
                EyouSoft.Model.CompanyStructure.CompanyAndUserInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(MqId);
                if (model != null)
                {
                    this.Title            = model.User.ContactInfo.ContactName + "的个人详细信息";
                    lblName.Text          = model.User.ContactInfo.ContactName;
                    lblCompanyName.Text   = model.Company.CompanyName;
                    lblUserName.Text      = model.User.UserName;
                    lblContactTel.Text    = model.User.ContactInfo.Tel;
                    lblContactName.Text   = model.User.ContactInfo.ContactName;
                    lblContactFax.Text    = model.User.ContactInfo.Fax;
                    lblContactEmail.Text  = model.User.ContactInfo.Email;
                    lblCompanyInfo.Text   = model.Company.Remark;
                    lblLicense.Text       = model.Company.License;
                    lblContactMobile.Text = model.User.ContactInfo.Mobile;
                    string AreaName = string.Empty;
                    if (model.User.Area != null && model.User.Area.Count > 0)
                    {
                        foreach (EyouSoft.Model.SystemStructure.AreaBase Area in model.User.Area)
                        {
                            AreaName += Area.AreaName + ",";
                        }
                    }
                    lblAreaName.Text = AreaName.TrimEnd(',');
                }

                model = null;
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string shopUrl = string.Empty;
            string mq      = Request.QueryString["mq"];

            if (!string.IsNullOrEmpty(mq) && EyouSoft.Common.Function.StringValidate.IsInteger(mq))
            {
                EyouSoft.Model.CompanyStructure.CompanyUser        user    = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetModel(int.Parse(mq));
                EyouSoft.Model.CompanyStructure.CompanyAndUserInfo company = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(int.Parse(mq));
                if (company != null && company.Company.CompanyRole.RoleItems.Length > 0)
                {
                    shopUrl = EyouSoft.Common.Utils.GetCompanyDomain(company.Company.ID, company.Company.CompanyRole.RoleItems[0]);
                }
                if (!string.IsNullOrEmpty(shopUrl))
                {
                    Response.Write("<script>location.href='" + shopUrl + "';</script>");
                }
                else
                {
                    Response.Write("<script>location.href='" + EyouSoft.Common.Domain.UserPublicCenter + "';</script>");
                }
            }
        }
コード例 #4
0
        /// <summary>
        /// 获取 单位列表
        /// </summary>
        private void BindList()
        {
            int opuserId = Utils.GetInt(Request.QueryString["OPUserId"]);

            if (opuserId == 0)
            {
                Response.Clear();
                Response.Write("<span class='errmsg'>错误:[其他平台用户ID]须为有效数字或者您填写的值超出了最大值" + Int32.MaxValue + "</span>");
                Response.End();
            }

            EyouSoft.Model.CompanyStructure.CompanyAndUserInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModelByOPUserID(opuserId);
            if (model != null && model.Company != null && model.User != null)
            {
                InitCompanyInfo(model.Company);
                InitCompanyUserInfo(model.User);
            }
            else
            {
                Response.Clear();
                Response.Write("<span>抱歉!没有相关的公司和用户信息</span>");
                Response.End();
            }
        }
コード例 #5
0
        /// <summary>
        /// 初始化自己的名片信息
        /// </summary>
        private void InitSelfCard()
        {
            EyouSoft.Model.CompanyStructure.CompanyAndUserInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this.SelfMQ);

            if (model == null || model.Company == null || model.User == null)
            {
                return;
            }

            EyouSoft.Model.CompanyStructure.CompanyDetailInfo cInfo = model.Company;
            EyouSoft.Model.CompanyStructure.CompanyUser       uInfo = model.User;

            bool isHighShop = cInfo.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.HighShop);
            bool isPayMQ    = cInfo.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.MQ);

            #region 网店链接
            string selfSideEShop = "<div class=\"{0}\"><a href=\"{1}\" target=\"_blank\"></a></div>";
            EyouSoft.Model.CompanyStructure.CompanyType cType = this.GetCompanyType(cInfo.CompanyRole.RoleItems);

            switch (cType)
            {
            case EyouSoft.Model.CompanyStructure.CompanyType.全部:
            //case EyouSoft.Model.CompanyStructure.CompanyType.地接:
            case EyouSoft.Model.CompanyStructure.CompanyType.组团:
                selfSideEShop = string.Empty;
                break;

            default:
                if (isHighShop)
                {
                    selfSideEShop = string.Format(selfSideEShop, "cardshopgj", Utils.GetCompanyDomain(cInfo.ID, cType));
                }
                else
                {
                    selfSideEShop = string.Format(selfSideEShop, "cardshop", Utils.GetCompanyDomain(cInfo.ID, cType));
                }
                break;
            }

            this.ltrSelfEshop.Text = selfSideEShop;
            #endregion

            #region 企业LOGO、MQ广告
            if (isPayMQ)
            {
                if (this.CheckGrant(TravelPermission.系统设置_单位信息))
                {
                    this.FSelfLogo.FType = IMFrame.WebControls.FType.Logo;

                    if (cInfo.AttachInfo.CompanyLogo != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyLogo.ImagePath))
                    {
                        this.FSelfLogo.HavingImg = true;
                        this.FLogoHeight         = 20;
                    }
                    else
                    {
                        this.FSelfLogo.FHeight   = 60;
                        this.FSelfLogo.HavingImg = false;
                        this.FLogoHeight         = 60;
                    }

                    this.FSelfAd.FType = IMFrame.WebControls.FType.Ad;

                    if (cInfo.AttachInfo.CompanyMQAdv != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyMQAdv.ImagePath))
                    {
                        this.FSelfAd.HavingImg = true;
                        this.FAdHeight         = 20;
                    }
                    else
                    {
                        this.FSelfAd.FHeight   = 105;
                        this.FSelfAd.HavingImg = false;
                        this.FAdHeight         = 105;
                    }
                    if (cInfo.AttachInfo.CompanyMQAdv != null)
                    {
                        this.txtPayMQSelfAdUrl.Text = cInfo.AttachInfo.CompanyMQAdv.ImageLink;
                    }

                    this.phNotPayMQSelfAd.Visible = this.phNotPayMQSelfLogo.Visible = false;
                    this.phPayMQSelfAd.Visible    = this.phPayMQSelfLogo.Visible = this.phFScript.Visible = true;
                }
                else
                {
                    this.phNotPayMQSelfAd.Visible = this.phNotPayMQSelfLogo.Visible = false;
                    this.phPayMQSelfAd.Visible    = this.phPayMQSelfLogo.Visible = this.phFScript.Visible = false;
                }

                if (cInfo.AttachInfo.CompanyLogo != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyLogo.ImagePath))
                {
                    this.ltrSelfLogo.Text = string.Format("<img src=\"{0}\" alt=\"\" width=\"140\" height=\"60\" />", Domain.FileSystem + cInfo.AttachInfo.CompanyLogo.ImagePath);
                }

                if (cInfo.AttachInfo.CompanyMQAdv != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyMQAdv.ImagePath))
                {
                    this.txtSelfCurrentAdImgPath.Value = cInfo.AttachInfo.CompanyMQAdv.ImagePath;
                    this.ltrSelfAd.Text = string.Format("<img src=\"{0}\" alt=\"\" width=\"140\" height=\"85\" />", Domain.FileSystem + cInfo.AttachInfo.CompanyMQAdv.ImagePath);
                }
            }
            else
            {
                if (cInfo.BusinessProperties == EyouSoft.Model.CompanyStructure.BusinessProperties.旅游社)
                {
                    this.IntroductionURL = GetDesPlatformUrl(Domain.UserBackCenter + "/SystemSet/SonUserManage.aspx");

                    // this.phNotPayMQSelfAd.Visible = this.phNotPayMQSelfLogo.Visible = true;
                    this.phNotPayMQSelfAd.Visible = this.phNotPayMQSelfLogo.Visible = false;
                    this.phPayMQSelfAd.Visible    = this.phPayMQSelfLogo.Visible = this.phFScript.Visible = false;
                    this.ltrSelfLogo.Visible      = this.ltrSelfAd.Visible = false;
                }
                else
                {
                    this.FSelfLogo.FType = IMFrame.WebControls.FType.Logo;

                    if (cInfo.AttachInfo.CompanyLogo != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyLogo.ImagePath))
                    {
                        this.FSelfLogo.HavingImg = true;
                        this.FLogoHeight         = 20;
                    }
                    else
                    {
                        this.FSelfLogo.FHeight   = 60;
                        this.FSelfLogo.HavingImg = false;
                        this.FLogoHeight         = 60;
                    }

                    if (cInfo.AttachInfo.CompanyLogo != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyLogo.ImagePath))
                    {
                        this.ltrSelfLogo.Text = string.Format("<img src=\"{0}\" alt=\"\" width=\"140\" height=\"60\" />", Domain.FileSystem + cInfo.AttachInfo.CompanyLogo.ImagePath);
                    }

                    this.phNotPayMQSelfAd.Visible = this.phNotPayMQSelfLogo.Visible = false;
                    this.phPayMQSelfLogo.Visible  = true;
                    this.ltrSelfLogo.Visible      = true;
                    this.phGYSFScript.Visible     = true;

                    this.phFScript.Visible     = false;
                    this.ltrSelfAd.Visible     = false;
                    this.phPayMQSelfAd.Visible = false;
                }
            }
            #endregion

            #region 基本信息
            this.txtSelfCompanyName.Value    = cInfo.CompanyName;
            this.txtSelfContactMobile.Text   = uInfo.ContactInfo.Mobile;
            this.txtSelfContactName.Text     = uInfo.ContactInfo.ContactName;
            this.txtSelfContactTel.Text      = uInfo.ContactInfo.Tel;
            this.rblSelfGender.SelectedIndex = this.rblSelfGender.Items.IndexOf(this.rblSelfGender.Items.FindByValue(((int)uInfo.ContactInfo.ContactSex).ToString()));
            #endregion
        }
コード例 #6
0
        /// <summary>
        /// 初始化对方的名片信息
        /// </summary>
        private void InitOtherSideCard()
        {
            EyouSoft.Model.CompanyStructure.CompanyAndUserInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this.OtherSideMQ);

            if (model == null || model.Company == null || model.User == null)
            {
                return;
            }

            EyouSoft.Model.CompanyStructure.CompanyDetailInfo cInfo = model.Company;
            EyouSoft.Model.CompanyStructure.CompanyUser       uInfo = model.User;

            bool isHighShop = cInfo.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.HighShop);
            bool isPayMQ    = cInfo.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.MQ);

            #region 网店链接
            string otherSideEShop = "<div class=\"{0}\"><a href=\"{1}\" target=\"_blank\"></a></div>";
            EyouSoft.Model.CompanyStructure.CompanyType cType = this.GetCompanyType(cInfo.CompanyRole.RoleItems);

            switch (cType)
            {
            case EyouSoft.Model.CompanyStructure.CompanyType.全部:
            //case EyouSoft.Model.CompanyStructure.CompanyType.地接:
            case EyouSoft.Model.CompanyStructure.CompanyType.组团:
                otherSideEShop = string.Empty;
                break;

            default:
                otherSideEShop = string.Format(otherSideEShop, isHighShop ? "cardshopgj" : "cardshop", Utils.GetCompanyDomain(cInfo.ID, cType));
                break;
            }

            this.ltrOtherSideEShop.Text = otherSideEShop;
            #endregion

            #region 企业LOGO、主营、MQ广告
            if (isPayMQ)
            {
                string otherSideLogo = string.Empty;
                string otherSideArea = string.Empty;
                string otherSideAd   = string.Empty;

                if (cInfo.AttachInfo.CompanyLogo != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyLogo.ImagePath))
                {
                    otherSideLogo = string.Format("<img src=\"{0}\" width=\"140\" height=\"62\" />", Domain.FileSystem + cInfo.AttachInfo.CompanyLogo.ImagePath);
                }

                if (cInfo.AttachInfo.CompanyMQAdv != null && !string.IsNullOrEmpty(cInfo.AttachInfo.CompanyMQAdv.ImagePath))
                {
                    string s1 = @"<a href=""{0}"" target=""_blank"" id=""otherAdvLink_a""><img src=""{1}""  style=""width:140px; height:140px;""  border=""0"" /></a>";
                    string s2 = @"<img src=""{0}""  style=""width:140px; height:140px;""  border=""0"" />";
                    string s  = string.Empty;
                    if (string.IsNullOrEmpty(cInfo.AttachInfo.CompanyMQAdv.ImageLink))
                    {
                        s = string.Format(s2, Domain.FileSystem + cInfo.AttachInfo.CompanyMQAdv.ImagePath);
                    }
                    else
                    {
                        s = string.Format(s1, cInfo.AttachInfo.CompanyMQAdv.ImageLink, Domain.FileSystem + cInfo.AttachInfo.CompanyMQAdv.ImagePath);
                    }
                    otherSideAd = string.Format(@"<tr id=""other_advtr"" ><td style=""padding-top: 5px;"" align=""center"">{0}</td></tr>", s);

                    string areas = this.GetAreaNames(uInfo.Area);
                    otherSideArea = string.Format("<span title=\"{0}\">{1}</span>", areas, Utils.GetText(areas, 30, true));
                }
                else
                {
                    string areas = this.GetAreaNames(uInfo.Area);
                    otherSideArea = string.Format("<span title=\"{0}\">{1}</span>", areas, Utils.GetText(areas, 60, true));
                }

                this.ltrOtherSideLogo.Text = otherSideLogo;
                this.ltrOtherSideArea.Text = otherSideArea;
                this.ltrOtherSideAd.Text   = otherSideAd;

                this.phOtherSideAreas.Visible = this.phOtherSideLogo.Visible = true;
            }
            else
            {
                this.phOtherSideAreas.Visible = this.phOtherSideLogo.Visible = this.ltrOtherSideAd.Visible = false;
            }
            #endregion

            #region 基本信息
            this.lblOtherSideContactName.Text = uInfo.ContactInfo.ContactName;
            string gender = "";
            switch (uInfo.ContactInfo.ContactSex)
            {
            case EyouSoft.Model.CompanyStructure.Sex.男: gender = "先生"; break;

            case EyouSoft.Model.CompanyStructure.Sex.女: gender = "女士"; break;
            }
            this.lblOtherSideContactGender.Text = gender;
            this.txtOtherSideCompanyName.Value  = cInfo.CompanyName;
            this.ltrOtherSideTelephone.Text     = uInfo.ContactInfo.Tel;
            this.ltrOtherSideMobile.Text        = uInfo.ContactInfo.Mobile;
            #endregion
        }