コード例 #1
0
 public void setOperationTypes()
 {
     if (OperationType == null)
     {
         OperationType = new List <OperationTypeSelection>();
     }
     else
     {
         OperationType.Clear();
     }
     OperationType.Add(new OperationTypeSelection()
     {
         Index = 0, Value = TranslationProvider.Translate(MultistringTags.TERMINAL_CAHSIN).ToString(), OperationType = "TERMINAL_CASHIN", CashIn = true, CashOut = false
     });
     OperationType.Add(new OperationTypeSelection()
     {
         Index = 1, Value = TranslationProvider.Translate(MultistringTags.TERMINAL_CASHOUT).ToString(), OperationType = "TERMINAL_CASHOUT", CashIn = false, CashOut = true
     });
     OperationType.Add(new OperationTypeSelection()
     {
         Index = 2, Value = TranslationProvider.Translate(MultistringTags.TERMINAL_ALL).ToString(), OperationType = "TERMINAL_ALL", CashIn = true, CashOut = true
     });
     if (PayIn && !PayOut)
     {
         SelectedOperationTypeIndex = 0;
     }
     if (!PayIn && PayOut)
     {
         SelectedOperationTypeIndex = 1;
     }
     if (PayIn && PayOut)
     {
         SelectedOperationTypeIndex = 2;
     }
     if (!PayIn && !PayOut)
     {
         SelectedOperationTypeIndex = 2;
     }
     OnPropertyChanged("SelectedOperationTypeIndex");
 }