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); */ }
private void StoreOdreNrToId() { Id = SelectedArk.ProcessOrderNR; var parameters = new ProcessOrderArk { ProcessOrderNR = Id }; Debug.WriteLine(Id); Frame f = new Frame(); f.Navigate(typeof(EtiketteArkVM), parameters); }
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); } }
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); }