Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int    id       = Convert.ToInt32(IdBox.Text);
            string name     = NameBox.Text;
            int    Phon     = Convert.ToInt32(PhonBox.Text);
            string payment  = PaymentBox.Text;
            string pass     = PassBox.Text;
            int    paid     = Convert.ToInt32(PaidBox.Text);
            string package  = PackageBox.Text;
            int    due      = Convert.ToInt32(DueBox.Text);
            string validity = ValidityBox.Text;

            MemRegDAO b = new MemRegDAO();

            b.createMember(new MemRegDTO(id, pass, name, Phon, payment, package, paid, due, validity));
            LoadCustomersInfo();

            IdBox.Clear();
            PassBox.Clear();
            NameBox.Clear();
            PhonBox.Clear();
            PaymentBox.Clear();
            PaidBox.Clear();
            DueBox.Clear();
            ValidityBox.Clear();
        }
Beispiel #2
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();
        }