Esempio n. 1
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        /// <param name="id">操作ID</param>
        protected void PageInit(string dotype, string id)
        {
            this.UploadControl1.CompanyID = this.SiteUserInfo.CompanyId;
            this.txtLastHuman.Text        = this.SiteUserInfo.Name;
            this.txtLastHuman.Enabled     = false;
            this.txtLastDate.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.MSourceShip msource = BLL.GetShipModel(id);
                if (msource != null)
                {
                    if (msource.SourceModel != null)
                    {
                        Countryindex  = msource.SourceModel.CountryId;
                        Provinceindex = msource.SourceModel.ProvinceId;
                        Cityindex     = msource.SourceModel.CityId;
                        Areaindex     = msource.SourceModel.CountyId;
                        this.txtCruiseCompany.Text      = msource.SourceModel.Name;
                        this.txtaddress.Text            = msource.SourceModel.Address;
                        this.txtUnitPolicy.Text         = msource.SourceModel.UnitPolicy;
                        this.txtContractDate.Text       = UtilsCommons.SetDateTimeFormart(msource.SourceModel.ContractPeriodEnd);
                        this.txtContractDate_Start.Text = UtilsCommons.SetDateTimeFormart(msource.SourceModel.ContractPeriodStart);
                        Radio_hd_no.Checked             = true;
                        if (msource.SourceModel.IsSignContract)
                        {
                            this.Radio_hd_yes.Checked   = true;
                            this.Radio_hd_no.Checked    = false;
                            this.txtContractNum.Text    = msource.SourceModel.ContractCode;
                            this.txtContractNum.Visible = true;
                        }
                        radno.Checked = true;
                        if (msource.SourceModel.IsCommission)
                        {
                            radyes.Checked = true;
                            radno.Checked  = false;
                        }
                        RadRecommend_no.Checked = true;
                        if (msource.SourceModel.IsRecommend)
                        {
                            RadRecommend_yes.Checked = true;
                            RadRecommend_no.Checked  = false;
                        }
                        RadSign_no.Checked = true;
                        if (msource.SourceModel.IsPermission)
                        {
                            RadSign_yes.Checked = true;
                            RadSign_no.Checked  = false;
                        }
                        this.txtLastDate.Text  = UtilsCommons.GetDateString(msource.SourceModel.LastModifyTime, ProviderToDate);
                        this.txtLastHuman.Text = msource.SourceModel.LastModifierId;
                        if (msource.SourceModel.ContractAttach != null)
                        {
                            StringBuilder strFile = new StringBuilder();
                            if (msource.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=\"CruiseEditPage.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}'/></span>", msource.SourceModel.ContractAttach.FilePath, msource.SourceModel.ContractAttach.Name);
                            }
                            this.lbFiles.Text = strFile.ToString();
                        }
                    }

                    if (msource.LinkManList != null && msource.LinkManList.Count > 0)
                    {
                        this.Contact1.SetTravelList = msource.LinkManList;
                    }
                    if (msource.SubShipList != null && msource.SubShipList.Count > 0)
                    {
                        this.SetShipList = msource.SubShipList;
                    }
                    this.txtRoutes.Text      = msource.Routes;
                    this.txtCruiseTel.Text   = msource.Telephone;
                    this.txtOwerRoutes.Text  = msource.OwerRoutes;
                    this.txtstarttime.Text   = msource.StartTime.ToString();
                    this.txtCruiseTel.Text   = msource.Telephone;
                    this.txtendtime.Text     = msource.EndTime.ToString();
                    this.txtPriceSystem.Text = msource.PriceSystem;
                }
                else
                {
                    Utils.ResponseGoBack();
                }
            }
        }