Example #1
0
        /// <summary>Synchronously send the ListSeries request</summary>
        /// <param name="request">Request to be sent</param>
        /// <returns>Response from the API</returns>
        public IEnumerable <Series> Send(ListSeries request)
        {
            var task   = Task.Run(async() => await SendAsync(request));
            var result = task.WaitAndUnwrapException();

            return(result);
        }
        /// <summary>Synchronously send the ListSeries request</summary>
        /// <param name="request">Request to be sent</param>
        /// <returns>Response from the API</returns>
        public IEnumerable <Series> Send(ListSeries request)
        {
            var task = SendAsync(request);

            RaiseExceptionOnFault(task);
            return(task.Result);
        }
        private void BindOutDoorImageUI(string series)
        {
            var sourceDir = System.IO.Path.Combine(defaultFolder, navigateToFolder);

            if (ListSeries.Where(MM => MM.SelectedValues == series).FirstOrDefault() != null)
            {
                OduImagePath = ListSeries.Where(MM => MM.SelectedValues == series).FirstOrDefault().OduImagePath;
            }
            this.OduImagePath = OduImagePath;
        }
Example #4
0
        public void TestListSeries()
        {
            ListSeries           req;
            Request              req2;
            IEnumerable <Series> resp;

            // it 'lists entities'
            req  = new ListSeries();
            resp = client.Send(req);
            Assert.Equal(new Series[] { new Series("entity_id") }, resp);
        }
        public async void TestListSeriesAsync()
        {
            ListSeries           req;
            Request              req2;
            IEnumerable <Series> resp;

            // it 'lists entities'
            req = new ListSeries();
            System.Threading.Thread.Sleep(10000);
            resp = await client.SendAsync(req);

            Assert.Equal(new Series[] { new Series("entity_id") }, resp);
        }
Example #6
0
        protected void ListSeries_Callback(object sender, CallbackEventArgsBase e)
        {
            var _spl = e.Parameter.Split(';');
            var obep = new BEParameters()
            {
                ItemCode = _spl[1],
                Socied   = _spl[0]
            };
            var obrd = new BRDocument();
            var olst = obrd.Get_SerialNumber(obep);

            ListSeries.DataSource = olst;
            ListSeries.DataBind();
        }
Example #7
0
        public void Load()
        {
            try
            {
                Client = ContainerService.Resolve <Delfin.ServiceContracts.IDelfinServices>();

                /* Cargar la series de notas de credito */
                ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>();
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pchrTIPO_TabTDO", FilterValue = "TDO", FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 3
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pchrTIPO_CodTDO", FilterValue = "007", FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 3
                });

                ListSeries = Client.GetAllSeriesFilter("VEN_SERISS_Todos", _listFilters);
                Fecha      = Client.GetFecha();
                ListSeries.Insert(0, new Series()
                {
                    SERI_Serie = "< Sel. Nro de Serie >", SERI_Desc = null
                });

                var     item = Client.GetOneParametrosByClave("IGV");
                decimal igv;
                if (item != null && decimal.TryParse(item.PARA_Valor, out igv))
                {
                    IGV = igv;
                }

                switch (TInicio)
                {
                case TipoInicio.Normal:
                    LView.LoadView();
                    break;

                case TipoInicio.EditarFacturacion:

                    Editar(ItemDocsVta.DOCV_Codigo);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            { Dialogos.MostrarMensajeError(Title, Mensajes.LoadPresenter, ex); }
        }
        private object GetSalesChart()
        {
            var listSeries = new ListSeries("Sales", Tab.Database.ReleaseViews, nameof(ReleaseView.YearOfRelease), nameof(ReleaseView.Global_Sales))
            {
                XBinSize = 1,
                // Dimensions, allow selecting multiple
                //yPropertyName = nameof(ReleaseData.Platform),
                //yPropertyName = nameof(ReleaseData.Genre),
                //yPropertyName = nameof(ReleaseData.Publisher),
                //yPropertyName = nameof(ReleaseData.Developer),
            };
            var chartSettings = new ChartSettings();

            chartSettings.AddSeries(listSeries);
            //return chartSettings;
            var model = new TabModel()
            {
                MinDesiredWidth = 1000,
            };

            model.AddObject(chartSettings);
            return(model);
        }
        /// <summary>Send the ListSeries request</summary>
        /// <param name="request">Request to be sent</param>
        /// <returns>Response from the API</returns>
        public async Task <IEnumerable <Series> > SendAsync(ListSeries request)
        {
            var json = await SendRequestAsync(request).ConfigureAwait(false);

            return(ParseResponse(json, request));
        }
        /// <summary>Parse JSON response</summary>
        /// <param name="json">JSON string from the API</param>
        /// <param name="request">Request sent to the API</param>
        /// <returns>Parsed response</returns>
        protected IEnumerable <Series> ParseResponse(string json, ListSeries request)
        {
            var strArray = JsonConvert.DeserializeObject <string[]>(json);

            return(strArray.Select(x => new Series(x)));
        }
        /// <summary>Send the ListSeries request</summary>
        /// <param name="request">Request to be sent</param>
        /// <returns>Response from the API</returns>
        public IEnumerable <Series> Send(ListSeries request)
        {
            var json = SendRequest(request);

            return(ParseResponse(json, request));
        }
Example #12
0
 public OxyListSeries(ListSeries listSeries, OxyPlot.Series.Series oxySeries)
 {
     ListSeries = listSeries;
     OxySeries  = oxySeries;
 }
Example #13
0
 public override string ToString() => ListSeries.ToString();