Exemplo n.º 1
0
        private void BtnCategory_Click(object sender, RoutedEventArgs e)
        {
            IncomeCategoryId    = 1;
            LblCategory.Content = string.Empty;
            var winSelectIncomeCategory = new WinSelectIncomeCategory();

            winSelectIncomeCategory.ShowDialog();
            IncomeCategoryId = winSelectIncomeCategory.Id;
            if (IncomeCategoryId == 0)
            {
                LblCategory.Content    = "نامشخص";
                IncomeCategoryId       = 1;
                LblCategory.Foreground = Brushes.Red;
                return;
            }
            LblCategory.Content    = winSelectIncomeCategory.CategoryGroup + " : " + winSelectIncomeCategory.Category;
            LblCategory.Foreground = IncomeCategoryId == 1 ? Brushes.Red : Brushes.Green;
        }
Exemplo n.º 2
0
 private void BtnCategory_Click(object sender, RoutedEventArgs e)
 {
     if (RdoIncome.IsChecked == true)
     {
         IncomeCategoryId    = 1;
         LblCategory.Content = string.Empty;
         var winSelectIncomeCategory = new WinSelectIncomeCategory();
         winSelectIncomeCategory.ShowDialog();
         IncomeCategoryId = winSelectIncomeCategory.Id;
         if (IncomeCategoryId == 0)
         {
             LblCategory.Content    = "همه دسته بندی‌ها";
             IncomeCategoryId       = 1;
             LblCategory.Foreground = Brushes.Red;
             return;
         }
         LblCategory.Content    = winSelectIncomeCategory.CategoryGroup + " : " + winSelectIncomeCategory.Category;
         LblCategory.Foreground = IncomeCategoryId == 1 ? Brushes.Red : Brushes.Green;
     }
     else if (RdoFee.IsChecked == true)
     {
         FeeCategoryId       = 1;
         LblCategory.Content = string.Empty;
         var winSelectFeeCategory = new WinSelectFeeCategory();
         winSelectFeeCategory.ShowDialog();
         FeeCategoryId = winSelectFeeCategory.Id;
         if (FeeCategoryId == 0)
         {
             LblCategory.Content    = "همه دسته بندی‌ها";
             FeeCategoryId          = 1;
             LblCategory.Foreground = Brushes.Red;
             return;
         }
         LblCategory.Content    = winSelectFeeCategory.CategoryGroup + " : " + winSelectFeeCategory.Category;
         LblCategory.Foreground = FeeCategoryId == 1 ? Brushes.Red : Brushes.Green;
     }
     else
     {
         LblCategory.Content = "همه دسته بندی‌ها";
     }
 }