public void ADDPatient(MAddPAtient Obj) { string query = "insert into Patient values(" + Obj.id + ",'" + Obj.name + "','" + Obj.fathername + "','" + Obj.username + "','" + Obj.password + "','" + Obj.PhoneNumber + "','" + Obj.Cnic + "','" + Obj.Address + "','" + Obj.Day + "','" + Obj.Disease + "','" + Obj.Refered + "','" + Obj.dateofbirth + "')"; if (db.DataManipulationOperation(query)) { MessageBox.Show("Data inserted successfully"); } }
public void UpdatePatient(MAddPAtient Obj) { string query = "update Patient set ID= " + Obj.id + ",Name='" + Obj.name + "',FatherNAme='" + Obj.fathername + "',UserName='******',Userpass='******',PhoneNumber='" + Obj.PhoneNumber + "',CNIC='" + Obj.Cnic + "',Address='" + Obj.Address + "',day='" + Obj.Day + "',DiseaseType='" + Obj.Disease + "',ReferedTo='" + Obj.Refered + "',DOB='" + Obj.dateofbirth + "'"; if (db.DataManipulationOperation(query)) { MessageBox.Show("Data Updated successfully"); } }
public AddPAtient() { InitializeComponent(); patient = new CAddPAtient(); add = new MAddPAtient(); }