protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ParamFacade facade = new ParamFacade();
         ParamInfo paraSiteName = facade.GetParam("SiteName");
         if (paraSiteName != null)
         {
             txtSiteName.Text = paraSiteName.Value;
         }
         ParamInfo paraLogoFileName = facade.GetParam("LogoFileName");
         if (paraLogoFileName != null)
         {
             txtLogoFileName.Text = paraLogoFileName.Value;
         }
         ParamInfo paraAddress = facade.GetParam("Address");
         if (paraAddress != null)
         {
             txtAddress.Text = paraAddress.Value;
         }
         ParamInfo paraPhoneNumber = facade.GetParam("PhoneNumber");
         if (paraPhoneNumber != null)
         {
             txtPhone.Text = paraPhoneNumber.Value;
         }
         ParamInfo paraFaxNumber = facade.GetParam("FaxNumber");
         if (paraFaxNumber != null)
         {
             txtFax.Text = paraFaxNumber.Value;
         }
         ParamInfo paraQQNumber = facade.GetParam("QQNumber");
         if (paraQQNumber != null)
         {
             txtQQ.Text = paraQQNumber.Value;
         }
         ParamInfo paraNoticeDelay = facade.GetParam("NoticeDelay");
         if (paraNoticeDelay != null)
         {
             txtDelay.Text = paraNoticeDelay.Value;
         }
         ParamInfo paraAutoPlayMusic = facade.GetParam("AutoPlayMusic");
         if (paraAutoPlayMusic != null)
         {
             cbAutoMusic.Checked = paraAutoPlayMusic.Value == "1";
         }
     }
 }
示例#2
0
 private string GetParamValue(string key, string defaultValue)
 {
     ParamFacade facade = new ParamFacade();
     ParamInfo paraAddress = facade.GetParam(key);
     string name = defaultValue;
     if (paraAddress != null)
     {
         name = paraAddress.Value;
         this.Application[key] = name;
     }
     return name;
 }