public void AddItemform(object s, RoutedEventArgs e) // open New form to add new item
        {
            CreateItemForm win3 = new CreateItemForm();

            win3._ItemDataListId = ListDataId;
            win3.ShowDialog();

            listDataGrid.Items.Refresh();
            itemsDataGrid.Items.Refresh();
            GetList();
        }
        public void SelectItemToEdit(object s, RoutedEventArgs e)
        {
            var ItemData = (s as FrameworkElement).DataContext as Itemlist;

            CreateItemForm winItem = new CreateItemForm();

            winItem._ItemId         = ItemData.ItemlistId;
            winItem._ItemNames      = ItemData.Name;
            winItem._ItemDetail     = ItemData.Detailed;
            winItem._ItemStatuz     = ItemData.Status;
            winItem._ItemDataListId = ItemData.DatalistId;
            winItem.ShowDialog();
        }