Esempio n. 1
0
        private async void Cb_customer_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {//select customer
            try
            {
                if (cb_customer.SelectedIndex != -1)
                {
                    cb_package.IsEnabled = true;
                    cb_period.IsEnabled  = true;

                    if (MainWindow.userLogin.type != "ag")
                    {
                        try
                        {
                            await FillCombo.fillPackageByCustomer(cb_package, (int)cb_customer.SelectedValue);

                            cb_package.SelectedValue = oldPackageId;
                        }
                        catch { }
                    }
                    else
                    {
                        await FillCombo.fillAgentPackage(cb_package, MainWindow.userLogin.userId);
                    }
                }
            }
            catch (Exception ex)
            {
                HelpClass.ExceptionMessage(ex, this);
            }
        }