コード例 #1
0
ファイル: SalesView.xaml.cs プロジェクト: Alphaquest2005/HV
 void SalesView_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     try
     {
         if (e != null && e.Action == NotifyCollectionChangedAction.Add)
         {
             if (e.NewItems != null && e.NewItems.Count > 0)
             {
                 if (SalesLst != null)
                 {
                     SalesLst.ScrollIntoView(e.NewItems[0]);
                     SalesLst.SelectedItem = e.NewItems[0];
                 }
             }
             SalesVM.Instance.TransactionData.CurrentTransactionEntry = (PrescriptionEntry)SalesLst.SelectedItem;
         }
         else if (e.Action == NotifyCollectionChangedAction.Reset)
         {
             SetUpSalesPad();
             // SalesLst_SelectionChanged(null, null);
         }
     }
     catch (Exception ex)
     {
         Logger.Log(LoggingLevel.Error, GetCurrentMethodClass.GetCurrentMethod() + ": --- :" + ex.Message + ex.StackTrace);
         throw ex;
     }
 }
コード例 #2
0
 void SalesView_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Add)
     {
         SalesLst.ScrollIntoView(e.NewItems[0]);
         SalesLst.SelectedItem = e.NewItems[0];
         salesvm.TransactionData.CurrentTransactionEntry = (RMSDataAccessLayer.TransactionEntryBase)SalesLst.SelectedItem;
         padPos = PadPosition.Middle;
     }
 }
コード例 #3
0
 void SalesView_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     if (e.Action == NotifyCollectionChangedAction.Add)
     {
         SalesLst.ScrollIntoView(e.NewItems[0]);
         SalesLst.SelectedItem           = e.NewItems[0];
         salesvm.CurrentTransactionEntry = (RMSDataAccessLayer.TransactionEntryBase)SalesLst.SelectedItem;
     }
     else if (e.Action == NotifyCollectionChangedAction.Reset)
     {
         SetUpSalesPad();
         // SalesLst_SelectionChanged(null, null);
     }
 }