Пример #1
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.Text != null)
     {
         MedicinesINFOGIVE patientinfo = new MedicinesINFOGIVE();
         List <string>     info        = patientinfo.patientINFO(comboBox1.Text);
         appointment_fee = info[1];
         textBox9.Text   = info[0];
     }
 }
Пример #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            Clera();
            panel7.Visible = true;
            MedicinesINFOGIVE meds = new MedicinesINFOGIVE();
            List <string>     ids  = meds.medIDs();

            foreach (var item in ids)
            {
                comboBox9.Items.Add(item);
            }
        }
Пример #3
0
 private void button20_Click(object sender, EventArgs e)
 {
     if (checkbill())
     {
         MedicinesINFOGIVE deletebill = new MedicinesINFOGIVE();
         deletebill.payBill(comboBox9.Text, textBox32.Text);
         MessageBox.Show($"Successfully paid Bill {comboBox9.Text}", "Successfully paid", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Clera();
     }
     else
     {
         MessageBox.Show("Please select bill and write amount paid", "Invalid input", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #4
0
 private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox2.Text != null)
     {
         MedicinesINFOGIVE medinfo = new MedicinesINFOGIVE();
         List <string>     info    = medinfo.medINFO(comboBox2.Text);
         label28.Text      = info[0];
         label29.Text      = info[1];
         label30.Text      = info[2];
         textBox11.Enabled = true;
     }
     else
     {
         label28.Text = "-";
         label29.Text = "-";
         label30.Text = "-";
     }
 }
Пример #5
0
 private void button5_Click(object sender, EventArgs e)//generateBILL
 {
     if (checkmeds())
     {
         //increase quantity
         MedicinesINFOGIVE increasequantit = new MedicinesINFOGIVE();
         int quntit = int.Parse(label30.Text) - int.Parse(textBox11.Text);
         increasequantit.INcreasequantity(comboBox2.Text, quntit);
         //register bill
         increasequantit.registerBILL(textBox14.Text, comboBox1.Text, textBox9.Text, textBox8.Text, appointment_fee, double.Parse(textBox8.Text.Remove(textBox8.Text.Length - 1, 1)) + double.Parse(appointment_fee.Remove(appointment_fee.Length - 1, 1)) + "$");
         MessageBox.Show($"Bill has been generated for Patient {comboBox1.Text}", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
         clear();
     }
     else
     {
         MessageBox.Show("Please enter correct information", "Invalid input", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #6
0
 private void comboBox9_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox9.Text != null)
     {
         MedicinesINFOGIVE allInfo = new MedicinesINFOGIVE();
         List <string>     info    = allInfo.GETINFOID(comboBox9.Text);
         textBox36.Text = info[0];
         textBox33.Text = info[1];
         textBox31.Text = info[2];
         textBox28.Text = info[3];
         textBox21.Text = info[4];
         textBox25.Text = info[5];
         if (textBox25.Text == "")
         {
             textBox25.Text = "- %";
         }
         textBox34.Text = textBox28.Text;
     }
 }
Пример #7
0
        private void button4_Click(object sender, EventArgs e)//givemedBTN
        {
            clear();
            panel3.Visible = true;
            MedicinesINFOGIVE names  = new MedicinesINFOGIVE();
            List <string>     namess = names.takeMEDS();

            foreach (var item in namess)
            {
                comboBox2.Items.Add(item);
            }
            List <string> IDS = names.takeIDSNAMES();

            foreach (var item in IDS)
            {
                comboBox1.Items.Add(item);
            }
            string lastbillid = names.generatebillid();
            int    n          = int.Parse(lastbillid.Remove(0, 1)) + 1;

            textBox14.Text = "B" + n.ToString();
        }