Exemple #1
0
        public async Task <IActionResult> Index()
        {
            IEnumerable <CurrencyViewModel> currencies = await MasterHelpers.GetCurrency();

            IEnumerable <DestinationViewModel> destinations = await MasterHelpers.GetDestination();

            IEnumerable <LanguangeViewModel> languanges = await MasterHelpers.GetLanguange();

            IEnumerable <MeasurementViewModel> measurements = await MasterHelpers.GetMeasurements();

            IEnumerable <PurchaseViewModel> purchases = await MasterHelpers.GetPurchaseOrders();

            NumberViewModel numbers = await MasterHelpers.GetNumber();

            ViewBag.number = numbers.Number;
            BillAddModel model = new BillAddModel()
            {
                Currencies   = currencies,
                Destinations = destinations,
                Languanges   = languanges,
                Measurements = measurements,
                Purchases    = purchases,
                Number       = numbers.Number,
            };

            return(View(model));
        }
Exemple #2
0
        public async Task <string> GetCurrency(string id)
        {
            string data = MasterHelpers.GetCurrency().GetAwaiter().GetResult().Where(s => s.CurrencyId.Equals(id))?.FirstOrDefault().Code;

            return(data);
        }