Example #1
0
        private void sendtherapstdata(int uid)
        {
            String pw  = this.password.Text;
            String rpw = this.textBoxrepassword.Text;

            if (pw == rpw)
            {
                //MessageBox.Show("two");
                Tech te = new Tech();

                te.Regno         = textBoxtherapistgrn.Text;
                te.Qualification = textBoxtherapistpq.Text;
                te.Designation   = textBoxtherapistdesignation.Text;
                te.Workingplce   = textBoxtherapistwp.Text;



                usermng uMng = new usermng();
                string  qry  = "insert into cmshdb.technecian(userid,regno,qualifications,designation,workingplace)values('" + uid + "','" + te.Regno + "','" + te.Qualification + "','" + te.Designation + "','" + te.Workingplce + "')";
                uMng.insert(qry);
            }
            else
            {
                MessageBox.Show("there is a error");
            }
        }
Example #2
0
        private void senddrdata(int uid)
        {
            String pw  = this.password.Text;
            String rpw = this.textBoxrepassword.Text;

            if (pw == rpw)
            {
                //MessageBox.Show("two");
                Doctors doctors = new Doctors();

                doctors.Regno         = textBoxcadrgrn.Text;
                doctors.Qualification = textBoxcadrpq.Text;
                doctors.Designation   = textBoxcadrdesignation.Text;
                doctors.Hospital      = textBoxcadrcurrenthospital.Text;



                usermng uMng = new usermng();
                string  qry  = "insert into cmshdb.doctors(userid,regno,qualifications,designation,hospital)values('" + uid + "','" + doctors.Regno + "','" + doctors.Qualification + "','" + doctors.Designation + "','" + doctors.Hospital + "')";
                uMng.insert(qry);
            }
            else
            {
                MessageBox.Show("there is a error");
            }
        }
Example #3
0
        private void sendcdata()
        {
            //MessageBox.Show("One");
            String pw  = this.password.Text;
            String rpw = this.textBoxrepassword.Text;

            if (pw == rpw)
            {
                //MessageBox.Show("two");
                User user = new User();

                user.Fname    = textBoxfirstname.Text;
                user.Lname    = textBoxlastname.Text;
                user.Contact  = textBoxcontactno.Text;
                user.Nic      = textBoxnicno.Text;
                user.Username = textBoxusername.Text;
                user.Password = password.Text;
                user.Acctype  = comboBoxacctype.SelectedItem.ToString();

                ImageConverter cnvrtr = new ImageConverter();
                byte[]         img    = (byte[])cnvrtr.ConvertTo(pictureBoxca.Image, typeof(byte[]));
                user.Pic     = img;
                user.Imgsize = img.Length;


                usermng uMng = new usermng();
                string  qry  = "insert into cmshdb.users(fname,lname,contact,nic,username,password,acctype,img,imgsize)values('" + user.Fname + "','" + user.Lname + "','" + user.Contact + "','" + user.Nic + "','" + user.Username + "','" + user.Password + "','" + user.Acctype + "','" + user.Pic + "','" + user.Imgsize + "');";
                uMng.insert(/*user*/ qry);
            }
            else
            {
                MessageBox.Show("there is a error");
            }
        }
Example #4
0
        private void buttoncadrcreate_Click(object sender, EventArgs e)
        {
            sendcdata();
            User    user = new User();
            usermng umng = new usermng();

            umng.getdata(user, textBoxusername.Text);

            senddrdata(user.Userid);
        }
Example #5
0
        /* private void buttonRecommendcheckups_Click(object sender, EventArgs e)
         * {
         *
         *   //senddata();
         * }*/

        private void buttonRecommendcheckups_Click(object sender, EventArgs e)
        {
            //Checkups[] chkps ;
            Checkups      chkps = new Checkups();
            FormDoctoracc fda   = new FormDoctoracc();

            chkps.Pid = int.Parse(fda.textBoxdapid.Text);
            usermng umng = new usermng();

            Console.Write("here1");
            umng.getdatafrmrecmndcheckups(chkps);
            MessageBox.Show(chkps.Checkupno + " test:");
            // MessageBox.Show("" + chkps[0].Pid);
        }
Example #6
0
        private void sendpatdata(int uid)
        {
            String pw  = this.password.Text;
            String rpw = this.textBoxrepassword.Text;

            if (pw == rpw)
            {
                //MessageBox.Show("two");
                Patients patient = new Patients();

                // patient.Bgroup = comboBoxbloodgroup.SelectedItem.ToString();
                patient.Bgroup = comboBoxbloodgroup.SelectedItem.ToString();

                //patient.BDay = dateTimePickerbday.Value;


                var bday = dateTimePickerbday.Value.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
                patient.BDay = bday;

                string gender;
                bool   ischecked = radioButtonmale.Checked;
                if (ischecked)
                {
                    gender = radioButtonmale.Text;
                }
                else
                {
                    gender = radioButtonfemale.Text;
                }

                patient.Gender  = gender;
                patient.Address = textBoxcaaddress.Text;



                usermng uMng = new usermng();
                string  qry  = "insert into cmshdb.patients(userid,bldgrp,bday,gender,address)values('" + uid + "','" + patient.Bgroup + "','" + patient.BDay + "','" + patient.Gender + "','" + patient.Address + "')";
                uMng.insert(qry);
            }
            else
            {
                MessageBox.Show("there is a error");
            }
        }
Example #7
0
        private void buttonHFlogin_Click(object sender, EventArgs e)
        {
            //this.Hide();
            //View.FormDoctorAcc DA = new View.FormDoctorAcc();
            //DA.Show();
            string unme = textboxHFusername.Text;
            string pwrd = textboxHFpassword.Text;
            User   user = new User();
            //Doctors dctrs = new Doctors();
            usermng uMng = new usermng();

            uMng.getdata(user, unme);
            string id = user.Userid.ToString();


            //uMng.getdatafrmdctrs(dctrs,id);

            uMng.login(user, pwrd);
        }
Example #8
0
        public void setvaluespatnt()
        {
            //Patients ptnt = new Patients();
            User     ur   = new User();
            Patients ptnt = new Patients();
            usermng  umng = new usermng();
            int      uid  = int.Parse(textBoxdapid.Text);

            umng.getdatafrmpatnt(ur, ptnt, uid);



            labeldapname.Text   = ur.Fname + " " + ur.Lname;
            labeldaaddress.Text = ptnt.Address;
            labeldapnic.Text    = ur.Nic;

            DateTime bday = Convert.ToDateTime(ptnt.BDay);
            DateTime now  = DateTime.Today;
            int      age  = now.Year - bday.Year;

            labeldapage.Text = Convert.ToString(age);
        }