public void updateProfileWhatsapp(ProfileWhatsapp _profileW) { ProfileLocal W = Converter.ToProfileLocalW(_profileW); ProfileLocal Aux = new ProfileLocal(); int newIndex = 0; foreach (ProfileLocal PLocal in ProfilePerfiles) { if (W.ProfileName == PLocal.ProfileName && W.value == PLocal.value) { Aux = PLocal; newIndex = ProfilePerfiles.IndexOf(PLocal); } } ProfilePerfiles.Remove(Aux); ProfilePerfiles.Insert(newIndex, W); }
public void updateProfilePhone(ProfilePhone _profileP) { ProfileLocal P = Converter.ToProfileLocalP(_profileP); ProfileLocal Aux = new ProfileLocal(); int newIndex = 0; foreach (ProfileLocal PLocal in ProfilePerfiles) { if (P.ProfileName == PLocal.ProfileName && P.value == PLocal.value) { Aux = PLocal; newIndex = ProfilePerfiles.IndexOf(PLocal); } } ProfilePerfiles.Remove(Aux); ProfilePerfiles.Insert(newIndex, P); }
public void updateProfileSM(ProfileSM _profileSM) { ProfileLocal SM = Converter.ToProfileLocalSM(_profileSM); ProfileLocal Aux = new ProfileLocal(); int newIndex = 0; foreach (ProfileLocal PLocal in ProfilePerfiles) { if (SM.ProfileName == PLocal.ProfileName && SM.value == PLocal.value) { Aux = PLocal; newIndex = ProfilePerfiles.IndexOf(PLocal); } } ProfilePerfiles.Remove(Aux); ProfilePerfiles.Insert(newIndex, SM); }
public void updateProfileEmail(ProfileEmail _profileEmail) { ProfileLocal E = Converter.ToProfileLocalE(_profileEmail); ProfileLocal Aux = new ProfileLocal(); int newIndex = 0; foreach (ProfileLocal PLocal in ProfilePerfiles) { if (E.ProfileName == PLocal.ProfileName && E.value == PLocal.value) { Aux = PLocal; newIndex = ProfilePerfiles.IndexOf(PLocal); } } ProfilePerfiles.Remove(Aux); ProfilePerfiles.Insert(newIndex, E); }