コード例 #1
0
       private void LoadData()
        {
            PortalController portal_obj = new PortalController();
            DataTable dt = portal_obj.GetDetails(_idx);

            string PortalName = dt.Rows[0]["PortalName"].ToString();
            string ApplicationId = dt.Rows[0]["ApplicationId"].ToString();
            string ExpiryDate = dt.Rows[0]["ExpiryDate"].ToString();
            string Currency = dt.Rows[0]["Currency"].ToString();
            string HostFee = dt.Rows[0]["HostFee"].ToString();
            string HostSpace = dt.Rows[0]["HostSpace"].ToString();         
            string DefaultLanguage = dt.Rows[0]["DefaultLanguage"].ToString();
            string HomeDirectory = dt.Rows[0]["HomeDirectory"].ToString();
            string Url = dt.Rows[0]["Url"].ToString();  
            string KeyWords = dt.Rows[0]["KeyWords"].ToString();
            string FooterText = dt.Rows[0]["FooterText"].ToString();
            string Description = dt.Rows[0]["Description"].ToString();

            txtPortalName.Text = PortalName;
            txtExpiryDate.Text = ExpiryDate;
            txtHostFee.Text = HostFee;
            txtHostSpace.Text = HostSpace;            
            
            txtHomeDirectory.Text = HomeDirectory;
            txtUrl.Text = Url;
            txtKeyWords.Text = KeyWords;
            txtFooterText.Text = FooterText;
            txtDescription.Text = Description;

            PopulateApplicationList2DDL(ApplicationId);
            PopulateLanguage2DDL(DefaultLanguage);
           // PopulateCurrencyTypeList2DDL(Currency);

            string logo_dir_path = "~/" + System.Configuration.ConfigurationManager.AppSettings["upload_image_dir"] + "/portal_images/logo";
            string background_dir_path = "~/" + System.Configuration.ConfigurationManager.AppSettings["upload_image_dir"] + "/portal_images/backgrounds";
            string LogoFile = dt.Rows[0]["LogoFile"].ToString();
            HiddenLogoFile.Value = LogoFile;            
            Logo_Img.ImageUrl = logo_dir_path + "/" + LogoFile;
            Logo_Img.Height = 50;
            Logo_Img.Width = 50;
           
            string BackgroundFile = dt.Rows[0]["BackgroundFile"].ToString();
            HiddenBackgroundFile.Value = BackgroundFile;           
            Background_Img.ImageUrl = background_dir_path + "/" + BackgroundFile;
            Background_Img.Height = 50;
            Background_Img.Width = 50;
           
        }