예제 #1
0
        public OverviewVM()
        {
            OverviewLists = new ObservableCollection <ProcessOrderArk>();
            ObservableCollection <ProcessOrderArk> alleProcesser = ProcessOrderArk.LoadAllArks();

            var doingStatus =
                from ark in alleProcesser
                where ark.Process == 'd'
                orderby ark.ProcessDate
                select ark;

            foreach (ProcessOrderArk item in doingStatus)
            {
                OverviewLists.Add(item);
            }

            GaaTilArkCommand = new RelayCommand(StoreOdreNrToId);

            /*
             * GaaTilArkCommand = new RelayCommand(
             *  ButtonBase_OnClick);
             */
            /*
             * ControlArkCommand = new RelayCommand(
             *  StoreOdreNrToId);
             */
        }
예제 #2
0
        private void StoreOdreNrToId()
        {
            Id = SelectedArk.ProcessOrderNR;
            var parameters = new ProcessOrderArk {
                ProcessOrderNR = Id
            };

            Debug.WriteLine(Id);
            Frame f = new Frame();

            f.Navigate(typeof(EtiketteArkVM), parameters);
        }
예제 #3
0
        public AdminVM()
        {
            Doing     = new ObservableCollection <ProcessOrderArk>();
            Saved     = new ObservableCollection <ProcessOrderArk>();
            Scheduled = new ObservableCollection <ProcessOrderArk>();
            ObservableCollection <ProcessOrderArk> alleProcesser = ProcessOrderArk.LoadAllArks();

            var doing =
                from ark in alleProcesser
                where ark.Process == 'd'
                select ark;

            var saved =
                from ark in alleProcesser
                where ark.Process == 'a'
                select ark;

            var scheduled =
                from ark in alleProcesser
                where ark.Process == 'p'
                select ark;


            foreach (ProcessOrderArk item in doing)
            {
                Doing.Add(item);
            }

            foreach (ProcessOrderArk item in saved)
            {
                Saved.Add(item);
            }

            foreach (ProcessOrderArk item in scheduled)
            {
                Scheduled.Add(item);
            }
        }
예제 #4
0
        public static bool SaveArk(ProcessOrderArk savePo)
        {
            using (HttpClient client = new HttpClient())
            {
                ProcessOrdre PO = new ProcessOrdre()
                {
                    ProcessOrderNR = savePo.ProcessOrderNR,
                    ColumnNR       = savePo.ColumnNR,
                    EndproductNR   = savePo.EndproductNR,
                    EndProductName = savePo.EndProductName,
                    ProcessDate    = savePo.ProcessDate,
                    Process        = savePo.Process
                };

                string        jsonString = JsonConvert.SerializeObject(PO);
                StringContent content    = new StringContent(jsonString, Encoding.ASCII, "application/json");

                Task <HttpResponseMessage> response = client.PutAsync("http://localhost:54926/api/ProcessOrder/" + PO.ProcessOrderNR, content);

                return(response.Result.IsSuccessStatusCode);
            }
            return(true);
        }