Example #1
0
        private void button9_Click(object sender, EventArgs e)
        {
            conn.Open();
            MySqlCommand mysqlcommand = conn.CreateCommand();
            string       searchQuery  = "SELECT * FROM patient where patientId='" + paymentID.Text + "'";

            mysqlcommand.CommandText = searchQuery;
            MySqlDataReader reader = mysqlcommand.ExecuteReader();

            while (reader.Read())
            {
                firstNamePayment.Text = reader["fname"].ToString();
                lastNamePayment.Text  = reader["lname"].ToString();
            }

            reader.Close();


            mysqlcommand.CommandText = "Select * from sale where patientId='" + paymentID.Text + "'";
            MySqlDataReader reader1 = mysqlcommand.ExecuteReader();

            while (reader1.Read())
            {
                owingAmount.Text = reader1["balance"].ToString();
            }
            reader.Close();


            string queryToday = "sale inner join patient on sale.patientId=patient.patientId " + "where sale.patientId='" + paymentID.Text + "'";
            Crud   inventory  = new Crud();

            inventory.createTable(queryToday, balanceDataView);
            conn.Close();
        }
Example #2
0
        private void searchAppointment_Click(object sender, EventArgs e)
        {
            string querySearch = "appointment inner join patient on appointment.patientId=patient.patientId " + "where visitingDate='" + searchedDate.Text + "'";
            Crud   schedule    = new Crud();

            schedule.createTable(querySearch, searchResultsDataGrid);
        }
Example #3
0
        private void button3_Click(object sender, EventArgs e)
        {
            panelChanger(inventoryPanel);
            Crud inventory = new Crud();

            inventory.createTable("glasses", inventoryDataGrid);
        }
        private void button4_Click_1(object sender, EventArgs e)
        {
            panelChanger(viewUsersPanel);
            Crud inventory = new Crud();

            inventory.createTable("employee", usersDataGrid);
        }
Example #5
0
        private void salesButton_Click(object sender, EventArgs e)
        {
            panelChanger(viewSalesPanel);

            string querySales = "sale inner join patient on sale.patientId=patient.patientId";
            Crud   sales      = new Crud();

            sales.createTable(querySales, salesDataGrid);
        }
Example #6
0
        private void button10_Click(object sender, EventArgs e)
        {
            DateTime date       = DateTime.Now;
            string   formatDate = string.Format("{0:D}", date);

            string queryToday = "appointment inner join patient on appointment.patientId=patient.patientId " + "where appointment.patientId='" + visitingPayment.Text + "'";
            Crud   inventory  = new Crud();

            inventory.createTable(queryToday, appointmentGrid);
        }
Example #7
0
        private void button3_Click(object sender, EventArgs e)
        {
            panelChanger(viewAppointment);

            //get time from system
            DateTime date       = DateTime.Now;
            string   formatDate = string.Format("{0:D}", date);

            string queryToday = "appointment inner join patient on appointment.patientId=patient.patientId " + "where visitingDate='" + formatDate + "'";
            Crud   schedule   = new Crud();

            schedule.createTable(queryToday, currentAppointments);
        }