Exemple #1
0
 /// <summary>
 /// 页面初始化
 /// </summary>
 /// <param name="id">操作ID</param>
 protected void PageInit(string id, string dotype)
 {
     this.UploadControl1.CompanyID = this.SiteUserInfo.CompanyId;
     this.UploadControl2.CompanyID = this.SiteUserInfo.CompanyId;
     if (String.Equals(dotype, "update", StringComparison.InvariantCultureIgnoreCase) && !string.IsNullOrEmpty(id))
     {
         EyouSoft.BLL.SourceStructure.BSource       bll   = new EyouSoft.BLL.SourceStructure.BSource();
         EyouSoft.Model.SourceStructure.MSourceShop model = bll.GetShopModel(id);
         if (model != null)
         {
             this.txtSellType.Text = model.SellType;
             if (model.SourceModel != null)
             {
                 this.hidSourceID.Value = model.SourceModel.SourceId;
                 Countryindex           = model.SourceModel.CountryId;
                 Provinceindex          = model.SourceModel.ProvinceId;
                 Cityindex                       = model.SourceModel.CityId;
                 Areaindex                       = model.SourceModel.CountyId;
                 this.txtRemarks.Text            = model.SourceModel.Remark;
                 this.txtaddress.Text            = model.SourceModel.Address;
                 this.txtPolicy.Text             = model.SourceModel.UnitPolicy;
                 this.txtContractDate.Text       = UtilsCommons.SetDateTimeFormart(model.SourceModel.ContractPeriodEnd);
                 this.txtContractDate_Start.Text = UtilsCommons.SetDateTimeFormart(model.SourceModel.ContractPeriodStart);
                 this.txtLastDate.Text           = UtilsCommons.GetDateString(model.SourceModel.LastModifyTime, ProviderToDate);
                 this.txtLastHuman.Text          = model.SourceModel.LastModifierId;
                 this.txtShopName.Text           = model.SourceModel.Name;
                 //返佣
                 if (model.SourceModel.IsCommission)
                 {
                     radyes.Checked = true;
                     radno.Checked  = false;
                 }
                 //返单
                 if (model.SourceModel.IsBackSingle)
                 {
                     radBackSingleyes.Checked = true;
                     radBackSingleno.Checked  = false;
                 }
                 //签单
                 if (model.SourceModel.IsPermission)
                 {
                     RadSign_yes.Checked = true;
                     RadSign_no.Checked  = false;
                 }
                 //合同
                 if (model.SourceModel.IsSignContract)
                 {
                     Radio_hd_yes.Checked     = true;
                     Radio_hd_no.Checked      = false;
                     this.txtContractNum.Text = model.SourceModel.ContractCode;
                 }
                 //推荐
                 if (model.SourceModel.IsRecommend)
                 {
                     RadRecommend_yes.Checked = true;
                     RadRecommend_no.Checked  = false;
                 }
                 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=\"ShopEditPage.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.lbhd.Text = strFile.ToString();
                 }
                 if (model.SourceModel.AgreementFile != "")
                 {
                     StringBuilder agreement = new StringBuilder();
                     agreement.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=\"ShopEditPage.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideagreement\" value='{1}|{0}'/></span>", model.SourceModel.AgreementFile, getfilename(model.SourceModel.AgreementFile));
                     this.lbFiles.Text = agreement.ToString();
                 }
             }
             if (model.LinkManList.Count > 0)
             {
                 this.Contact1.SetTravelList = model.LinkManList;
             }
         }
         else
         {
             Utils.ResponseGoBack();
         }
     }
     this.txtLastDate.Enabled  = false;
     this.txtLastHuman.Enabled = false;
 }