private Boolean validateBarcodes <T>(ObservableCollection <T> collection, TabItem titem) where T : MBaseModel { int idx = 0; foreach (MBaseModel c in collection) { idx++; MInventoryBarcodeItem bi = (MInventoryBarcodeItem)c; if (bi.Barcode.Equals("")) { CHelper.ShowErorMessage(idx.ToString(), "ERROR_SELECTION_TYPE", null); titem.IsSelected = true; return(false); } if (bi.BarcodeType.Equals("")) { CHelper.ShowErorMessage(idx.ToString(), "ERROR_SELECTION_TYPE", null); titem.IsSelected = true; return(false); } } return(true); }
private void cmdBarcodeDelete_Click(object sender, RoutedEventArgs e) { MInventoryBarcodeItem pp = (MInventoryBarcodeItem)(sender as Button).Tag; mv.RemoveBarcodeItem(pp); mv.IsModified = true; }