Пример #1
0
        private void WindowLoaded(object sender, RoutedEventArgs e)
        {
            GridPay = Owner as WGridPay;

            cb.ItemsSource = RepositoryCurrency.Currencys.FindAll(l => l.TypesPay == GridPay.TypesPay);

            var name = Sub + "_" + xName.Content + "x" + yName.Content;

            B = (Button)GridPay.FindName(name);

            if (B != null)
            {
                Guid id;
                if ((B.Tag != null) && Guid.TryParse(B.Tag.ToString(), out id))
                {
                    cb.SelectedItem = RepositoryCurrency.Currencys.Find(l => l.CustomerId == id);
                }
            }
        }
Пример #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            GridPay = this.Owner as W_GridPay;

            cb.ItemsSource = ClassSync.Currency.List_Currency.FindAll(l => l.TypesPay == GridPay.typesPay);

            string name = sub + "_" + this.xName.Content + "x" + this.yName.Content;

            b = (Button)(GridPay.FindName(name));

            if (b != null)
            {
                Guid id;

                if ((b.ToolTip != null) && (Guid.TryParse(b.ToolTip.ToString(), out id)))
                {
                    cb.SelectedItem = ClassSync.Currency.List_Currency.Find(l => l.CustomerId == id);
                }
            }
        }