public override bool LoadData(ActivityInfo ai)
    {
        if ((ai == null) || (ai.ActivityType != PredefinedActivityType.CUSTOMER_REGISTRATION) || !ModuleManager.IsModuleLoaded(ModuleName.ECOMMERCE))
        {
            return(false);
        }

        GeneralizedInfo customer = BaseAbstractInfoProvider.GetInfoById(PredefinedObjectType.CUSTOMER, ai.ActivityItemID);

        if (customer != null)
        {
            string name = UserNameFormatter.GetFriendlyUserName(customer.GetValue("CustomerFirstName") as string, null,
                                                                customer.GetValue("CustomerLastName") as string,
                                                                customer.GetValue("CustomerEmail") as string, null);

            ucDetails.AddRow("om.activitydetails.regcustomer", name);
        }

        return(ucDetails.IsDataLoaded);
    }
Exemplo n.º 2
0
        public void Refresh(ApplicationState value)
        {
            switch (value)
            {
            case ApplicationState.Loading:
                lblConnectionState.Text = "Betöltés...";
                miLogin.Enabled         = true;
                miLogout.Enabled        = false;
                tsmiOptions.Enabled     = false;
                tspbLoader.Visible      = true;
                break;

            case ApplicationState.Offline:
                lblConnectionState.Text = "Nincs kapcsolat.";
                miLogin.Enabled         = true;
                miLogout.Enabled        = false;
                tsmiOptions.Enabled     = false;
                tspbLoader.Visible      = false;
                break;

            case ApplicationState.Anonimous:
            case ApplicationState.Online:
                lblConnectionState.Text = value == ApplicationState.Online ? String.Format(
                    "Bejelentkezve mint: {0}.",
                    UserNameFormatter.Format(ModelLocator.getInstance().SessionModel.CurrentUser)
                    ) : "Bejelentkezve.";
                miLogin.Enabled     = false;
                miLogout.Enabled    = true;
                tsmiOptions.Enabled = value == ApplicationState.Online;
                tspbLoader.Visible  = false;

                if (lfLogin != null)
                {
                    lfLogin.Close();
                    lfLogin = null;
                }
                break;
            }
        }