Пример #1
0
        /// <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.MSourceMotorcade Model = BLL.GetMotorcadeModel(id);
                if (Model != null)
                {
                    Countryindex                    = Model.SourceModel.CountryId;
                    Provinceindex                   = Model.SourceModel.ProvinceId;
                    Cityindex                       = Model.SourceModel.CityId;
                    Areaindex                       = Model.SourceModel.CountyId;
                    this.txtRemark.Text             = Model.SourceModel.Remark;
                    this.txtteamName.Text           = Model.SourceModel.Name;
                    this.txtContractDate.Text       = UtilsCommons.SetDateTimeFormart(Model.SourceModel.ContractPeriodEnd);
                    this.txtContractDate_Start.Text = UtilsCommons.SetDateTimeFormart(Model.SourceModel.ContractPeriodStart);

                    this.txtLastHuman.Text = Model.SourceModel.LastModifierId;
                    this.txtLastDate.Text  = UtilsCommons.GetDateString(Model.SourceModel.LastModifyTime, ProviderToDate);
                    if (Model.SourceModel != null)
                    {
                        this.RadioButton2.Checked = true;
                        if (Model.SourceModel.IsCommission)
                        {
                            this.RadioButton1.Checked = true;
                            this.RadioButton2.Checked = false;
                        }
                        radRecommendno.Checked = true;
                        if (Model.SourceModel.IsRecommend)
                        {
                            radRecommendyes.Checked = true;
                            radRecommendno.Checked  = false;
                        }
                        radno.Checked = true;
                        if (Model.SourceModel.IsPermission)
                        {
                            radyes.Checked = true;
                            radno.Checked  = false;
                        }
                        Radio_hd_no.Checked = true;
                        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;
                        }
                        if (Model.SourceModel.ContractAttach != null)
                        {
                            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=\"CarEditPage.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();
                        }
                    }
                    if (Model.LinkManList.Count > 0)
                    {
                        //获取联系人信息
                        this.Contact1.SetTravelList = Model.LinkManList;
                    }
                    if (Model.CarList.Count > 0)
                    {
                        //获取联系人信息
                        this.SetTravelList = Model.CarList;
                    }
                    SetListCount = SetTravelList.Count;
                }
                else
                {
                    Utils.ResponseGoBack();
                }
            }
        }