Exemplo n.º 1
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string a, b, c, d, f, g;

            if (ServicePayRequests.MainServiceDataProvider(int.Parse(comboBox1.SelectedIndex.ToString()), user.client_id, Misc.GetTodayMonth(), (decimal)user.dwelling_space))
            {
                LablingService.GetTextAboutServiceWithMetrics(int.Parse(comboBox1.SelectedIndex.ToString()), user.client_id, Misc.GetTodayMonth(), out a, out b, out c, out d, out f, out g);
            }
            else
            {
                LablingService.SetTextForStaticService(int.Parse(comboBox1.SelectedIndex.ToString()), user.client_id, Misc.GetTodayMonth(), (decimal)user.dwelling_space, out a, out b, out c, out d, out f, out g);
            }

            label25.Text = a;
            label27.Text = b;
            label28.Text = c;
            label32.Text = f;

            TariffBox.Show();
            UsageBox.Show();
            ModBox.Show();
            PaymentBox.Show();

            if (d == "-1")
            {
                OverBox.Hide();
            }
            else
            {
                OverBox.Show();
                label30.Text = d;
            }

            if (g == "-1")
            {
                DebtBox.Hide();
            }
            else
            {
                DebtBox.Show();
                label34.Text = g;
            }

            label32.Show();
        }
Exemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            PaymentHandler.PaymentStateMachine(int.Parse(comboBox1.SelectedIndex.ToString()), user.client_id, Misc.GetTodayMonth(),
                                               decimal.Parse(MoneyInstertText.Text.ToString()), decimal.Parse(label30.Text.ToString()), decimal.Parse(label32.Text.ToString()),
                                               PaymentHandler.GetPaymentState(decimal.Parse(label30.Text.ToString()), decimal.Parse(label34.Text.ToString())), decimal.Parse(label32.Text.ToString()));

            UpdateForm();
        }