public AddDoctor() { InitializeComponent(); doc = new CDoctor(); add = new MAddDoctor(); av = new MAvalibleDays(); }
public void UpdateDoctor(MAddDoctor Obj) { string query = "update Doctor set ID=" + Obj.id + ",Name='" + Obj.name + "',FatherName='" + Obj.fathername + "',Username='******',UserPass='******',PhoneNumber='" + Obj.PhoneNumber + "',Cnic='" + Obj.Cnic + "',Address='" + Obj.Address + "',Salary='" + Obj.salary + "',DOB='" + Obj.dateofbirth + "',Speciality='" + Obj.speciality + "'where ID=" + Obj.id + ""; if (db.DataManipulationOperation(query)) { MessageBox.Show("Data Updated successfully"); } }
public void AddDoctor(MAddDoctor Obj) { string query = "insert into Doctor values(" + Obj.id + ",'" + Obj.name + "','" + Obj.fathername + "','" + Obj.username + "','" + Obj.password + "','" + Obj.salary + "','" + Obj.speciality + "','" + Obj.PhoneNumber + "','" + Obj.Cnic + "','" + Obj.Address + "','" + Obj.dateofbirth + "')"; if (db.DataManipulationOperation(query)) { MessageBox.Show("Data inserted successfully"); } }