コード例 #1
0
        public void CloseSortie()
        {
            DisplayRenderFragment = null;
            StateChange.Invoke();

            SortieHangarValidation = new SortieHangarValidation();
        }
コード例 #2
0
        public async void OnValidSortieSubmit()
        {
            try
            {
                if (SortieHangarValidation.IdRack == 0)
                {
                    Notification.Notify(NotificationSeverity.Warning, "Attention", "Le Rack choisi n'est pas bon.");
                    return;
                }

                // enlever de geocommande, la palette
                await SqlContext.DeleteToHangar(SortieHangarValidation.IdRack, SortieHangarValidation.IdCommande.Value);

                // mettre la commande avec une date de sortie
                await SqlContext.UpdateSortieCommande(SortieHangarValidation.IdCommande.Value, SortieHangarValidation.DateSortie.Value);

                Log.Information("HANGAR SORTIE - {date} : commande- {commande} - Gisement-{rack}",
                                SortieHangarValidation.DateSortie.Value.ToString("d"),
                                SortieHangarValidation.IdCommande.Value,
                                SortieHangarValidation.GisementRack);

                AllHangar.RemoveAll(x => x.IdCommande == SortieHangarValidation.IdCommande.Value &&
                                    x.IdRack == SortieHangarValidation.IdRack);
                await HangarGrid.Reload();

                Notification.Notify(NotificationSeverity.Success, "Sortie OK", "Sortie OK");
                // remise à zéro
                SortieHangarValidation = new SortieHangarValidation();

                // Recharger les racks.
                Racks = await SqlContext.GetRackEmpty();

                RacksFull = await SqlContext.GetRackFull();

                StateChange.Invoke();
            }
            catch (Exception ex)
            {
                Log.Error(ex, "HangarViewModel - OnValidSortieSubmit");
                Notification.Notify(NotificationSeverity.Error, "Error", "Erreur sur la sauvegarde");
            }
        }
コード例 #3
0
        public async Task LoadDatas()
        {
            IsLoaded = false;

            ClientTransfert = new CommandeView()
            {
                NomClient      = "Aucune sélection",
                DescriptionCmd = "aucune",
                IdClient       = 0,
                IdCommande     = 0
            };

            Racks      = new List <Rack>();
            AllClients = new List <Client>();
            RacksFull  = new List <Rack>();

            TransfertRackValidation = new TransfertRackValidation();
            EntreHangarValidation   = new EntreHangarValidation();
            SortieHangarValidation  = new SortieHangarValidation();
            IntervertirValidation   = new InversionPaletteValidation();

            try
            {
                AllHangar = await SqlContext.GetHangar();

                Racks = await SqlContext.GetRackEmpty();

                RacksFull = await SqlContext.GetRackFull();

                AllClients = await SqlContext.LoadClients();
            }
            catch (Exception ex)
            {
                Log.Error(ex, "HangarViewModel - LoadDatas");
                Notification.Notify(NotificationSeverity.Error, "Erreur chargement", "Erreur sur le chargement des informations du hangar");
            }

            IsLoaded = true;
        }