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"); } }
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"); } }
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"); } }
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"); } }