private void WarehouseInLineEditExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     int id = e.Parameter is int ? (int) e.Parameter : 0;
     if (id != 0)
     {
         var wid = new WarehouseInLineDetail(VM.DeliveryTypeWarehouseIn, id, PageMode.EditMode,
                                             VM.AllWarehouseInLines, VM.AddWarehouseInLines,
                                             VM.UpdateWarehouseInLines, VM.SelectedCommodityId);
         wid.ShowDialog();
         Refresh();
     }
 }
 private void BtWarehouseInLineAddClick(object sender, RoutedEventArgs e)
 {
     var wi = new WarehouseInLineDetail(VM.DeliveryTypeWarehouseIn, PageMode.AddMode, VM.AllWarehouseInLines,
                                        VM.AddWarehouseInLines, VM.SelectedCommodityId);
     wi.ShowDialog();
     Refresh();
 }