示例#1
0
        private void listView_ItemClick(object sender, ItemClickEventArgs e)
        {
            currentMt = (Maintenance)e.ClickedItem;

            textBlock.Text = currentMt.mtr_Note;
            statusBox.SelectedValue = currentMt.mtr_status;
        }
示例#2
0
        private async void editBtn_Click(object sender, RoutedEventArgs e)
        {


            if (currentMt != null)
            {
                currentMt.mtr_Note = textBlock.Text;
                currentMt.mtr_status = statusBox.SelectedValue.ToString();

                if (currentMt.mtr_status != "FINISHED")
                {
                    await currentMt.editModelData();
                }
                else
                {
                    currentMt.deleteModel();
                    currentMt = null;
                }
                refresh();
                updateListView();
            }
        }