Пример #1
0
        private void SetupGadgetCompleted(TwoxTwoAndMxNResultsSet resulSet, Exception e)
        {
            if (resulSet == null)
            {
                Exception exp = new Exception(SharedStrings.NO_RECORDS_SELECTED);
                NotificationEventArgs <Exception> notification = new NotificationEventArgs <Exception>("", exp);
                this.Notify(ErrorNotice, notification);
            }
            else if (resulSet.Errors.Count > 0)
            {
                StringBuilder errorString = new StringBuilder();
                for (int i = 0; i < resulSet.Errors.Count; i++)
                {
                    errorString.Append(" " + resulSet.Errors[i].VarName);
                }

                Exception exp = new Exception(errorString.ToString());

                this.Notify(ErrorNotice, new NotificationEventArgs <Exception>("", exp));
            }
            else if (resulSet.FreqResultsDescriptiveStatistics == null)
            {
                Exception exp = new Exception(SharedStrings.NO_RECORDS_SELECTED.ToString());

                this.Notify(ErrorNotice, new NotificationEventArgs <Exception>("", exp));
            }
            else
            {
                this.TwoxTwoAndMxNResultsSet = resulSet;
                this.Notify(SetupGadgetEvent, new NotificationEventArgs <Exception>());
            }
        }
Пример #2
0
        void resultSet_Completed(object sender, EventArgs e)
        {
            InvokeOperation <TwoxTwoAndMxNResultsSet> result = (InvokeOperation <TwoxTwoAndMxNResultsSet>)sender;

            if (result.HasError)
            {
                ex = result.Error;
                result.MarkErrorAsHandled();
            }
            //else
            //{
            TwoxTwoAndMxNResultsSet returnedData = ((InvokeOperation <TwoxTwoAndMxNResultsSet>)sender).Value;

            _setupCompleted(returnedData, null);
            //}
        }
Пример #3
0
        private void SetupGadgetCompleted(TwoxTwoAndMxNResultsSet resulSet, Exception e)
        {
            if (e != null)
            {
                NotificationEventArgs <Exception> notification = new NotificationEventArgs <Exception>("", e);
                this.Notify(ErrorNotice, notification);
            }
            else
            {
                if (resulSet == null)
                {
                    Exception exp = new Exception(SharedStrings.NO_RECORDS_SELECTED);
                    NotificationEventArgs <Exception> notification = new NotificationEventArgs <Exception>("", exp);
                    this.Notify(ErrorNotice, notification);
                }
                else if (resulSet.Errors.Count > 0)
                {
                    StringBuilder errorString = new StringBuilder();
                    for (int i = 0; i < resulSet.Errors.Count; i++)
                    {
                        errorString.Append(" " + resulSet.Errors[i].VarName);
                    }

                    Exception exp = new Exception(errorString.ToString());

                    this.Notify(ErrorNotice, new NotificationEventArgs <Exception>("", exp));
                }
                else
                {
                    this.TwoxTwoAndMxNResultsSet = resulSet;
                    this.DatatableBagResultSet   = new ObservableCollection <DatatableBag>(resulSet.DatatableBagArray);

                    this.ObservableResultSets.Add(resulSet);
                    this.Notify(SetupGadgetEvent, new NotificationEventArgs <Exception>());
                }
            }
            SimpleTag = "SetupGadgetCompleted";
        }