Exemple #1
0
        /// <summary>
        /// 返回资讯相关链接
        /// </summary>
        /// <param name="AreaName">区域名</param>
        /// <param name="AreaId">区域ID</param>
        /// <param name="ScenicId">景区ID</param>
        /// <returns></returns>
        protected string getInfoAboutHref(object AreaName, object AreaId, object ScenicId, object CompanyId)
        {
            string str = string.Empty;

            EyouSoft.BLL.CompanyStructure.CompanyInfo companyBLL = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
            CompanyDetailInfo companyModel = companyBLL.GetModel(Convert.ToString(CompanyId));

            if (null != companyModel)
            {
                if (companyModel.CompanyRole.HasRole(CompanyType.地接) || companyModel.CompanyRole.HasRole(CompanyType.专线))
                {
                    if (!string.IsNullOrEmpty(Convert.ToString(AreaName)))
                    {
                        //2012-02-10 14:10信息来源:楼 链接到组团菜单中的"旅游线路库"
                        str = string.Format(@"<a href='javascript:void(0)' onclick=""topTab.open('{0}','资讯相关',{{}})"" class='font12_grean' title='{1}'>【{1}】</a>", EyouSoft.Common.Domain.UserBackCenter + "/teamservice/linelibrarylist.aspx?lineId=" + AreaId, Utils.GetText2(Eval("AreaName").ToString(), 6, true));
                    }
                }
                else if (companyModel.CompanyRole.HasRole(CompanyType.景区))
                {
                    EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Convert.ToString(ScenicId));
                    if (null != Area)
                    {
                        str = string.Format(@"<a href=""{0}"" target=""_blank"" class='font12_grean' title='{1}'>【{1}】</a>", EyouSoft.Common.Domain.UserPublicCenter + "/ScenicManage/NewScenicDetails.aspx?ScenicId=" + Area.ScenicId, Utils.GetText2(Area.ScenicName, 6, true));
                    }
                }
            }
            return(str);
        }
Exemple #2
0
        /// <summary>
        /// 获取子系统信息,仅取WEBMASTER修改子系统时使用的数据
        /// </summary>
        /// <param name="sysId">系统编号</param>
        /// <returns></returns>
        public Model.SysStructure.MSysInfo GetSysInfo(int sysId)
        {
            if (sysId < 1)
            {
                return(null);
            }

            Model.SysStructure.MSysInfo sysInfo = dal.GetSysInfo(sysId);

            if (sysInfo != null)
            {
                int companyId = dal.GetCompanyIdBySysId(sysId);
                EyouSoft.BLL.CompanyStructure.CompanyInfo companybll = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
                sysInfo.CompanyInfo = companybll.GetModel(companyId, sysId);
                companybll          = null;

                EyouSoft.BLL.CompanyStructure.CompanyUser userbll = new EyouSoft.BLL.CompanyStructure.CompanyUser();
                sysInfo.AdminInfo = userbll.GetAdminModel(companyId);
                userbll           = null;

                EyouSoft.BLL.CompanyStructure.Department departmentbll = new EyouSoft.BLL.CompanyStructure.Department();
                sysInfo.DepartmentInfo = departmentbll.GetModel(dal.GetHeadOfficeIdByCompanyId(companyId));
                departmentbll          = null;

                EyouSoft.BLL.CompanyStructure.CompanySetting settingbll = new EyouSoft.BLL.CompanyStructure.CompanySetting();
                sysInfo.Setting = settingbll.GetSetting(companyId);
                settingbll      = null;

                EyouSoft.BLL.SysStructure.SystemDomain domainbll = new EyouSoft.BLL.SysStructure.SystemDomain();
                sysInfo.Domains = domainbll.GetDomains(sysId);
                domainbll       = null;

                if (sysInfo.ModuleIds == null || sysInfo.ModuleIds.Length < 1)
                {
                    sysInfo.ModuleIds = new int[] { -1 };
                }

                if (sysInfo.PartIds == null || sysInfo.PartIds.Length < 1)
                {
                    sysInfo.PartIds = new int[] { -1 };
                }

                if (sysInfo.PermissionIds == null || sysInfo.PermissionIds.Length < 1)
                {
                    sysInfo.PermissionIds = new int[] { -1 };
                }
            }

            return(sysInfo);
        }
Exemple #3
0
        /// <summary>
        /// 绑定欠款信息
        /// </summary>
        private void InitBindMsg()
        {
            EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer();//客户资料bll
            //已欠款金额
            decimal debtAmount = 0;
            //最高欠款金额
            decimal maxDebtAmount = 0;

            custBll.GetCustomerDebt(CurrentUserCompanyID, out debtAmount, out maxDebtAmount);
            if (debtAmount >= maxDebtAmount)
            {
                lblMsg.Text = "您已超过最高欠款额度,请结账后再继续预订,咨询电话:";
                EyouSoft.BLL.CompanyStructure.CompanyInfo   companyBll = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
                EyouSoft.Model.CompanyStructure.CompanyInfo infoModel  = companyBll.GetModel(SiteUserInfo.CompanyID, SiteUserInfo.SysId);//公司信息实体

                if (infoModel != null)
                {
                    lblMsg.Text += infoModel.ContactTel.ToString();//电话
                }
            }
        }
Exemple #4
0
        protected void initData(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return;
            }
            IPeerNews BLL   = BPeerNews.CreateInstance();
            MPeerNews Model = BLL.GetPeerNews(id);

            if (null == Model)
            {
                return;
            }
            this.lbTitle.Text = Model.Title;//标 题
            //资讯相关
            EyouSoft.BLL.CompanyStructure.CompanyInfo companyBLL = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
            CompanyDetailInfo companyModel = companyBLL.GetModel(Model.CompanyId);

            if (null != companyModel)
            {
                string strAboutInfo = string.Empty;
                if (companyModel.CompanyRole.HasRole(CompanyType.地接) || companyModel.CompanyRole.HasRole(CompanyType.专线))
                {
                    if (!string.IsNullOrEmpty(Model.AreaName))
                    {
                        //2012-02-10 14:10信息来源:楼 链接到组团菜单中的"旅游线路库"
                        strAboutInfo = string.Format(@"<a href='javascript:void(0)' onclick=""topTab.open('{0}','资讯相关',{{}})"" class='font12_grean' title='{1}'>{1}</a>", EyouSoft.Common.Domain.UserBackCenter + "/teamservice/linelibrarylist.aspx?lineId=" + Model.AreaId, Model.AreaName);
                    }
                }
                else if (companyModel.CompanyRole.HasRole(CompanyType.景区))
                {
                    EyouSoft.Model.ScenicStructure.MScenicArea Area = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetModel(Model.ScenicId);
                    if (null != Area)
                    {
                        strAboutInfo = string.Format("<a href='{0}' target='_blank'>{1}</a>", EyouSoft.Common.Domain.UserPublicCenter + "/ScenicManage/NewScenicDetails.aspx?ScenicId=" + Area.ScenicId, Area.ScenicName);
                    }
                }
                this.lbRoute.Text = strAboutInfo.Length > 0 ? strAboutInfo : "暂无";
            }
            this.lbCompany.Text = Model.CompanyName;                                //发布企业
            this.lbType.Text    = Convert.ToString(Model.TypeId);                   //类别
            this.lbTime.Text    = string.Format("{0:yyyy-MM-dd}", Model.IssueTime); //发布时间
            this.lbContent.Text = Model.Content;                                    //内容
            IList <MPeerNewsAttachInfo> lst = Model.AttachInfo;
            StringBuilder strPic            = new StringBuilder();
            StringBuilder strFile           = new StringBuilder();

            if (null != lst && lst.Count > 0)
            {
                for (int i = 0; i < lst.Count; i++)
                {
                    switch (lst[i].Type)
                    {
                    case AttachInfoType.图片:
                        strPic.AppendFormat("<a href='{0}' title='{1}' target='_blank'>查看</a>", Domain.FileSystem + lst[i].Path, lst[i].FileName);
                        break;

                    case AttachInfoType.文件:
                        strFile.AppendFormat("<a href='{0}' title='{1}' target='blank'>{2}</a>", Domain.FileSystem + lst[i].Path, lst[i].FileName, lst[i].FileName);
                        break;
                    }
                }
            }
            this.lbPic.Text  = strPic.Length > 0 ? strPic.ToString() : "暂无图片";   //图片
            this.lbFile.Text = strFile.Length > 0 ? strFile.ToString() : "暂无附件"; //附件下载
            //点击次数加1
            BLL.UpdateClickNum(id);
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断权限
            if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_公司信息_公司信息栏目))
            {
                Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_公司信息_公司信息栏目, true);
                return;
            }
            EyouSoft.BLL.CompanyStructure.CompanyInfo   companyBll = new EyouSoft.BLL.CompanyStructure.CompanyInfo();
            EyouSoft.Model.CompanyStructure.CompanyInfo infoModel  = null;//公司信息实体
            string method = Utils.GetFormValue("hidMethod");

            if (method == "save")
            {
                #region 保存公司信息
                if (Utils.InputText(txtCompanyName.Value) == "")
                {
                    MessageBox.Show(this, "公司名称不为空");
                    return;
                }
                //保存
                EyouSoft.Model.CompanyStructure.CompanyAccount account = new EyouSoft.Model.CompanyStructure.CompanyAccount(); //公司账户
                infoModel = new EyouSoft.Model.CompanyStructure.CompanyInfo();                                                 //公司信息实体
                infoModel.CompanyAddress     = Utils.InputText(txtAddress.Value);                                              //地址
                infoModel.ContactName        = Utils.InputText(txtAdmin.Value);                                                //负责人
                account.BankName             = Utils.InputText(txtBank.Value);                                                 //开户行
                account.CompanyId            = CurrentUserCompanyID;                                                           //公司编号
                infoModel.CompanyZip         = Utils.InputText(txtEmail.Value);                                                //邮箱
                account.AccountName          = Utils.InputText(txtUserName.Value);                                             //户名
                account.BankNo               = Utils.InputText(txtUserNo.Value);                                               //账号
                infoModel.CompanyEnglishName = Utils.InputText(txtEngName.Value);                                              //公司英文名
                infoModel.ContactFax         = Utils.InputText(txtFax.Value);                                                  //公司传真
                infoModel.License            = Utils.InputText(txtLicence.Value);                                              //公司许可证
                infoModel.ContactMobile      = Utils.InputText(txtMoible.Value);                                               //公司手机
                infoModel.CompanyName        = Utils.InputText(txtCompanyName.Value);                                          //公司名
                infoModel.ContactTel         = Utils.InputText(txtTel.Value);                                                  //电话
                infoModel.CompanyType        = Utils.InputText(txtType.Value);                                                 //旅行社类别
                infoModel.CompanySiteUrl     = Utils.InputText(txtWeb.Value);                                                  //网站
                infoModel.CompanyAccountList = new List <EyouSoft.Model.CompanyStructure.CompanyAccount>();
                infoModel.CompanyAccountList.Add(account);                                                                     //添加到账户集合
                infoModel.SystemId = CurrentUserCompanyID;                                                                     //系统号
                infoModel.Id       = CurrentUserCompanyID;                                                                     //公司号
                bool result = false;
                result = companyBll.Update(infoModel);
                MessageBox.ShowAndRedirect(this, result?"保存成功!":"保存失败!", "/systemset/CompanyInfo.aspx");
                #endregion
            }
            else
            {
                #region 初始化公司信息
                //初始化
                infoModel = companyBll.GetModel(CurrentUserCompanyID, CurrentUserCompanyID);
                if (infoModel != null)
                {
                    EyouSoft.Model.CompanyStructure.CompanyAccount account = null;//公司账户
                    if (infoModel.CompanyAccountList != null && infoModel.CompanyAccountList.Count > 0)
                    {
                        account = infoModel.CompanyAccountList[0];
                    }
                    txtAddress.Value     = infoModel.CompanyAddress;     //地址
                    txtAdmin.Value       = infoModel.ContactName;        //负责人
                    txtEmail.Value       = infoModel.CompanyZip;         //邮箱
                    txtEngName.Value     = infoModel.CompanyEnglishName; //公司英文名
                    txtFax.Value         = infoModel.ContactFax;         //公司传真
                    txtLicence.Value     = infoModel.License;            //公司许可证
                    txtMoible.Value      = infoModel.ContactMobile;      //公司手机
                    txtCompanyName.Value = infoModel.CompanyName;        //公司名
                    txtTel.Value         = infoModel.ContactTel;         //电话
                    txtType.Value        = infoModel.CompanyType;        //旅行社类别
                    if (account != null)
                    {
                        txtBank.Value     = account.BankName;    //开户行
                        txtUserName.Value = account.AccountName; //户名
                        txtUserNo.Value   = account.BankNo;      //账号
                    }
                    txtWeb.Value = infoModel.CompanySiteUrl;     //网站
                }
                #endregion
            }
        }