Example #1
0
        private void insert_b_Click(object sender, RoutedEventArgs ev)
        {
            string a = moph_tb.Text;
            string b = name_tb.Text;
            string c = district_tb.Text;
            string d = province_tb.Text;
            string e = type_tb.Text;
            string f = longitude_tb.Text;
            string g = latitude_tb.Text;
            string h = altitude_tb.Text;
            string i = "date";
            string j = personal_vm_id_tb.Text;
            string k = num_doctors_tb.Text;
            string l = num_staff_tb.Text;
            string m = label_tb.Text;

            string[] arg = { a, b, c, d, e, f, g, h, i, j, k, l, m };


            ConectarBD con        = new ConectarBD();
            string     status_act = con.Run_cmd_args(arg);

            if (status_act == "")
            {
                MessageBox.Show("Hospital was succesfully added.");
            }
            else
            {
                MessageBox.Show(status_act);
            }
        }
Example #2
0
        private void Actualizar_Click(object sender, RoutedEventArgs e)
        {
            ConectarBD con        = new ConectarBD();
            string     status_act = con.Run_cmd();

            if (status_act == "")
            {
                MessageBox.Show("Please, make sure you have an active internet connection.");
            }
            else
            {
                MessageBox.Show(status_act);
            }
        }