コード例 #1
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;
            }
        }
コード例 #2
0
ファイル: GroundEdit.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit(string id, string dotype)
        {
            this.UploadControl1.CompanyID = this.SiteUserInfo.CompanyId;
            this.txtLastHuman.Text        = this.SiteUserInfo.Name;
            this.txtLastDate.Enabled      = false;
            this.txtLastHuman.Enabled     = false;

            if (String.Equals(dotype, "update", StringComparison.InvariantCultureIgnoreCase) && !string.IsNullOrEmpty(id))
            {
                EyouSoft.BLL.SourceStructure.BSource         BLL   = new EyouSoft.BLL.SourceStructure.BSource();
                EyouSoft.Model.SourceStructure.MSourceTravel Model = BLL.GetTravelServiceModel(id);
                if (Model != null && Model.SourceModel != null)
                {
                    this.txtaddress.Text   = Model.SourceModel.Address;
                    this.hidSourceID.Value = Model.SourceModel.SourceId;
                    if (Model.SourceModel.IsCommission == false)
                    {
                        this.radyes.Checked = false;
                        this.radno.Checked  = true;
                    }
                    else
                    {
                        this.radno.Checked  = false;
                        this.radyes.Checked = true;
                    }
                    this.txtUnitName.Text = Model.SourceModel.Name;
                    Countryindex          = Model.SourceModel.CountryId;
                    Provinceindex         = Model.SourceModel.ProvinceId;
                    Cityindex             = Model.SourceModel.CityId;
                    Areaindex             = Model.SourceModel.CountyId;
                    if (Model.LinkManList.Count > 0)
                    {
                        this.Contact1.SetTravelList = Model.LinkManList;
                    }
                    if (Model.SourceModel.ContractAttach != null)
                    {
                        //<a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{
                        StringBuilder strFile = new StringBuilder();
                        if (Model.SourceModel.ContractAttach.FilePath != "")
                        {
                            strFile.AppendFormat("<span class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"GroundEditPage.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}'/></span>", Model.SourceModel.ContractAttach.FilePath, Model.SourceModel.ContractAttach.Name);
                        }
                        this.lbFiles.Text = strFile.ToString();
                    }
                    this.txtCharacter.Text = Model.SourceTravelModel.Routes;
                    this.txtLegalName.Text = Model.SourceTravelModel.LegalRepresentative;
                    this.txtTel.Text       = Model.SourceTravelModel.Telephone;
                    //this.txtTel.Text=Model.SourceModel.未提供电话
                    this.txtContractDate.Text       = UtilsCommons.SetDateTimeFormart(Model.SourceModel.ContractPeriodEnd);
                    this.txtContractDate_Start.Text = UtilsCommons.SetDateTimeFormart(Model.SourceModel.ContractPeriodStart);

                    if (Model.SourceModel.IsSignContract)
                    {
                        this.Radio_hd_yes.Checked   = true;
                        this.Radio_hd_no.Checked    = false;
                        this.txtContractNum.Visible = true;
                        this.txtContractNum.Text    = Model.SourceModel.ContractCode;
                    }
                    this.RadSign_no.Checked = true;
                    if (Model.SourceModel.IsPermission)
                    {
                        this.RadSign_yes.Checked = true;
                        this.RadSign_no.Checked  = false;
                    }
                    this.RadRecommend_no.Checked = true;
                    if (Model.SourceModel.IsRecommend)
                    {
                        RadRecommend_yes.Checked = true;
                        RadRecommend_no.Checked  = false;
                    }
                    this.txtLastDate.Text  = UtilsCommons.GetDateString(Model.SourceModel.LastModifyTime, ProviderToDate);
                    this.txtLastHuman.Text = Model.SourceModel.LastModifierId;
                    this.txtPermitNum.Text = Model.SourceModel.LicenseKey;
                    this.txtpolicy.Text    = Model.SourceModel.UnitPolicy;
                }
                else
                {
                    Utils.ResponseGoBack();
                }
            }
        }