Beispiel #1
0
        protected void OkBtn_Click(object sender, EventArgs e)
        {
            DataSourceSelectArguments pArguments = new DataSourceSelectArguments();

            SqlDominio.Select(pArguments);
            DomainList.DataBind();
        }
        protected void Page_PreRender(object sender, System.EventArgs e)
        {
            CommerceBuilder.Licensing.License license = null;
            license               = KeyService.GetCurrentLicense();
            LicenseType.Text      = license.KeyType.ToString();
            DomainList.DataSource = license.Domains.ToArray();
            DomainList.DataBind();
            if (license.SubscriptionDate != null)
            {
                if (license.SubscriptionDate < LocaleHelper.LocalNow)
                {
                    SubscriptionDate.Text = "Ended on " + license.SubscriptionDate.Value.ToString("dd-MMM-yyyy");
                }
                else
                {
                    SubscriptionDate.Text = "Ends on " + license.SubscriptionDate.Value.ToString("dd-MMM-yyyy");
                }
            }
            else
            {
                SubscriptionDate.Text = "None";
            }
            if (license.Expiration != null)
            {
                trExpiration.Visible = true;
                Expiration.Text      = license.Expiration.Value.ToString("yyyy-MMM-dd");
            }

            // FOR NON-DEMO LICENSES, SHOW DEMO MODE PANEL
            if (license.KeyType != LicenseKeyType.DEMO)
            {
                DemoModePanel.Visible = true;
                if (ApplicationSettings.Instance.UseDemoMode)
                {
                    DemoModeButton.Text          = "Disable Demo Mode";
                    DemoModeEnabledText.Visible  = true;
                    DemoModeDisabledText.Visible = false;
                }
                else
                {
                    DemoModeButton.Text          = "Enable Demo Mode";
                    DemoModeEnabledText.Visible  = false;
                    DemoModeDisabledText.Visible = true;
                }
            }
            else
            {
                //FOR DEMO LICENSES, HIDE DEMO MODE PANEL
                DemoModePanel.Visible = false;
            }

            if (Session["StoreLicenseUpdated"] != null)
            {
                SavedMessage.Visible = true;
                SavedMessage.Text    = string.Format(SavedMessage.Text, LocaleHelper.LocalNow);
                Session.Remove("StoreLicenseUpdated");
            }
        }
Beispiel #3
0
        protected void OkBtn_Click(object sender, EventArgs e)
        {
            DataSourceSelectArguments pArguments = new DataSourceSelectArguments();

            SqlDominio.Select(pArguments);
            SqlGrupo.Select(pArguments);
            DeleteBtn.Visible = (SuperID.Text == "medlinknet");
            DomainList.DataBind();
            GroupList.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hMailServerNetRemote.IApplication app = RemoteActivation.GetAuthenticatedRemotehMailServerApplication();
                if (app == null)
                {
                    Response.End();
                }
                List <hMailServerNetRemote.IDomain> domains = new List <hMailServerNetRemote.IDomain>();
                int c = app.Domains.Count;
                hMailServerNetRemote.IDomains ds = app.Domains;

                for (int i = 0; i < c; i++)
                {
                    domains.Add(ds[i]);
                }

                DomainList.DataSource = domains;
                DomainList.DataBind();
            }
        }