Пример #1
0
        private void ClientComboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            if (ClientCheckBox.Checked)
            {
                ContractFilteComboBox.DataSource = ClientPayments.Filter(((DataRowView)ClientComboBox.SelectedItem).Row["ClientID"].ToString());
                if (TPSCheckBox.Checked)
                {
                    FilterContractCheckBox.Checked = false;
                    ProfilCheckBox.Checked         = false;
                    ClientPayments.UpdateClientsPaymentsDataGrid(ClientComboBox.SelectedValue.ToString(), TPSCheckBox.Checked, ProfilCheckBox.Checked, ClientCheckBox.Checked);
                }
                else
                {
                    if (!ProfilCheckBox.Checked)
                    {
                        ClientPayments.GetAllPeriodPayments(ClientCheckBox.Checked, ClientComboBox.SelectedValue.ToString());
                        UpdateLabelPayments();
                    }
                }

                if (ProfilCheckBox.Checked)
                {
                    FilterContractCheckBox.Checked = false;
                    TPSCheckBox.Checked            = false;
                    ClientPayments.UpdateClientsPaymentsDataGrid(ClientComboBox.SelectedValue.ToString(), TPSCheckBox.Checked, ProfilCheckBox.Checked, ClientCheckBox.Checked);
                }
                else
                {
                    if (!TPSCheckBox.Checked)
                    {
                        ClientPayments.GetAllPeriodPayments(ClientCheckBox.Checked, ClientComboBox.SelectedValue.ToString());
                        UpdateLabelPayments();
                    }
                }
            }
        }