public void UpdateReception(MAddReception Obj) { string query = "update Reception set ID=" + Obj.ID + ",Name='" + Obj.Name + "',FatherName='" + Obj.FatherName + "',Username='******',UserPass='******',PhoneNumber='" + Obj.PhoneNum + "',Cnic='" + Obj.CNIC + "',Address='" + Obj.Address + "',Salary='" + Obj.Salary + "',DOB='" + Obj.Dob + "'where ID=" + Obj.ID + ""; if (db.DataManipulationOperation(query)) { MessageBox.Show("Data Updated successfully"); } }
public void AddReception(MAddReception Obj) { string query = "insert into Reception values(" + Obj.ID + ",'" + Obj.Name + "','" + Obj.FatherName + "','" + Obj.UserName + "','" + Obj.Password + "','" + Obj.PhoneNum + "','" + Obj.CNIC + "','" + Obj.Address + "','" + Obj.Salary + "','" + Obj.Dob + "')"; if (db.DataManipulationOperation(query)) { MessageBox.Show("Data inserted successfully"); } }
public AddReception() { InitializeComponent(); rec = new CReception(); add = new MAddReception(); }