private void WarehouseOutLineEditExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     int id = e.Parameter is int ? (int) e.Parameter : 0;
     if (id != 0)
     {
         var wd = new WarehouseOutLineDetail(VM.CommodityId, id, PageMode.EditMode, VM.WarehouseOutLines,
                                             VM.AddWarehouseOutLines, VM.UpdateWarehouseOutLines,
                                             VM.WarehouseInLines, VM.InternalCustomerID, VM.WarehouseId);
         wd.ShowDialog();
         Refresh();
     }
 }
 private void Button3Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (VM.ValidateAdd())
         {
             var wd = new WarehouseOutLineDetail(VM.QuotaId, PageMode.AddMode, VM.WarehouseOutLines,
                                                 VM.WarehouseInLines, VM.AddWarehouseOutLines,
                                                 VM.InternalCustomerID, VM.WarehouseId);
             wd.ShowDialog();
             Refresh();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ErrorMsgManager.GetClientErrMsg(ex, CultureManager.UICulture));
     }
 }