Exemple #1
0
        public async Task <Models.ConData.Market> CreateMarket(Models.ConData.Market market)
        {
            OnMarketCreated(market);

            context.Markets.Add(market);
            context.SaveChanges();

            return(market);
        }
Exemple #2
0
        public async Task <Models.ConData.Market> CancelMarketChanges(Models.ConData.Market item)
        {
            var entity = context.Entry(item);

            entity.CurrentValues.SetValues(entity.OriginalValues);
            entity.State = EntityState.Unchanged;

            return(item);
        }
Exemple #3
0
        protected async System.Threading.Tasks.Task Form0Submit(SelectStoredProcedureRadzen.Models.ConData.Market args)
        {
            try
            {
                var conDataCreateMarketResult = await ConData.CreateMarket(market);

                DialogService.Close(market);
            }
            catch (System.Exception conDataCreateMarketException)
            {
                NotificationService.Notify(NotificationSeverity.Error, $"Error", $"Unable to create new Market!");
            }
        }
Exemple #4
0
        public async Task <Models.ConData.Market> UpdateMarket(int?marketListId, Models.ConData.Market market)
        {
            OnMarketUpdated(market);

            var item = context.Markets
                       .Where(i => i.MarketListID == marketListId)
                       .FirstOrDefault();

            if (item == null)
            {
                throw new Exception("Item no longer available");
            }
            var entry = context.Entry(item);

            entry.CurrentValues.SetValues(market);
            entry.State = EntityState.Modified;
            context.SaveChanges();

            return(market);
        }
Exemple #5
0
 protected async System.Threading.Tasks.Task Load()
 {
     market = new SelectStoredProcedureRadzen.Models.ConData.Market()
     {
     };
 }
        protected async System.Threading.Tasks.Task Load()
        {
            var conDataGetMarketByMarketListIdResult = await ConData.GetMarketByMarketListId(MarketListID);

            market = conDataGetMarketByMarketListIdResult;
        }
        protected async System.Threading.Tasks.Task Grid0RowSelect(SelectStoredProcedureRadzen.Models.ConData.Market args)
        {
            var dialogResult = await DialogService.OpenAsync <EditMarket>("Edit Market", new Dictionary <string, object>() { { "MarketListID", args.MarketListID } });

            await InvokeAsync(() => { StateHasChanged(); });
        }
Exemple #8
0
 partial void OnMarketCreated(Models.ConData.Market item);
Exemple #9
0
 partial void OnMarketGet(Models.ConData.Market item);
Exemple #10
0
 partial void OnMarketDeleted(Models.ConData.Market item);