示例#1
0
 public void ValidateDashboardCards()
 {
     LoginActions.LoginAsPartner();
     DashboardActions.ValidatePerformanceBonusCard();
     Thread.Sleep(2000);
     DashboardActions.ValidatePromoteOutBonusCard();
     Thread.Sleep(2000);
     DashboardActions.ValidateComissionCard();
 }
        private void InitializeActions()
        {
            AccountControllerTest accountTest = new AccountControllerTest();

            dashboardActions = new DashboardActions();
            AutorizationCheck(AutorizationType);
            if (AutorizationType == AutorizationType.Authorize)
            {
                dashboardActions.CreateHeaders(AutorizationType, LoginResult);
            }
        }
示例#3
0
        private void OnRun(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(this.FunctionalityCode))
            {
                return;
            }
            List <int> oids = GetSelectedIds();

            if (oids.Count == 0)
            {
                return;
            }
            if (isTable())
            {
                DashboardBlock block = this.DashboardView.getDisplayedBlock(this.DashboardView.InputGridBlock.FunctionalityCode);
                new DashboardActions().RunTables(oids, block);
            }
            else if (isReport())
            {
                new DashboardActions().RunReports(oids);
            }
            else if (isTransformationTree())
            {
                DashboardBlock block = this.DashboardView.getDisplayedBlock(this.DashboardView.TableBlock.FunctionalityCode);
                new DashboardActions().RunTrees(oids, block);
            }
            else if (isCombinedTransformationTree())
            {
                if (oids.Count > 1)
                {
                    MessageDisplayer.DisplayWarning("Combined Tranformation Tree", "You're not allowed to run more than one combined tree at time.\nSelect one combined tree.");
                    return;
                }
                DashboardBlock block = this.DashboardView.getDisplayedBlock(this.DashboardView.TableBlock.FunctionalityCode);
                Dictionary <int, List <int> > cTreeWithTreeOid = new DashboardActions().getTreeOid(oids);
                if (cTreeWithTreeOid == null || cTreeWithTreeOid.Count == 0)
                {
                    return;
                }
                foreach (int s in cTreeWithTreeOid.Keys)
                {
                    try
                    {
                        cTreeWithTreeOid.TryGetValue(s, out oids);
                        if (oids == null || oids.Count <= 0)
                        {
                            continue;
                        }
                    }
                    catch (Exception ex)
                    {
                        continue;
                    }
                    new DashboardActions().RunCombinedTrees(oids, block);
                }
            }
            else if (isStructuredReport())
            {
                if (oids.Count > 1)
                {
                    MessageDisplayer.DisplayWarning("Structured Report", "You're not allowed to run more than one structured report at time.\nSelect one report.");
                    return;
                }
                new DashboardActions().RunStructuredReports(oids);
            }
            else if (isAutomaticUpload())
            {
                if (oids.Count > 1)
                {
                    MessageDisplayer.DisplayWarning("Automatic Upload", "You're not allowed to run more than one upload at time.\nSelect one upload.");
                    return;
                }
                new DashboardActions().RunAutomaticUploads(oids);
            }
            else if (isEnrichmentTable())
            {
                DashboardBlock block = this.DashboardView.getDisplayedBlock(this.DashboardView.TableBlock.FunctionalityCode);
                new DashboardActions().RunEnrichmentTables(oids, block);
            }
        }