static public bool Edit_Admin(clsAdmin admin) { bool job_done = false; clsAdmin edit = new clsAdmin(); edit = edit.Searched_admin_by_RefAdmin(admin.RefAdmin); foreach (DataRow i in mySet.Tables["Admins"].Rows) { if ((int)i["RefAdmin"] == admin.RefAdmin) { i["UserID"] = admin.UserID; i["AdminName"] = admin.Name; i["PhoneNumber"] = admin.PhoneNumber; OleDbCommandBuilder myBuild = new OleDbCommandBuilder(adpAdmin); adpAdmin.Update(mySet.Tables["Admins"]); job_done = true; break; } } return(job_done); }