public bool Update(int code, string name, string lastName, string dakheli, int bulding, string room, int group) { Person_Data myPerson = new Person_Data(); Building_Data myBuild = new Building_Data(); try { Name = name; LastName = lastName; Dakheli = dakheli; Bulding = bulding; Room = room; Group = group; if (!myPerson.Freezed_Data(code)) { if (myPerson.CheckCode(code)) { if (myBuild.CheckCode(bulding)) { myPerson.Update(Code, Name, LastName, Dakheli, Bulding, Room, Group); this._password = myPerson.Pass; this._message = null; } } } return(true); } catch (HardWareExeption ex) { this._message = ex.Message; return(false); } catch (Exception ex) { this._message = ex.Message; return(false); } }