public DeleteUser ( string key, int SourceID, int SourceType ) : void | ||
key | string | |
SourceID | int | |
SourceType | int | |
리턴 | void |
//function to save users for a paragraph public static void InsertUsersPerParagraph(FormCollection collection, int SourceID, int SourceType) { IGenericRepository generics = new GenericRepository(); string selectedusers = collection["users"]; string[] allusers = selectedusers.Split(','); int count = allusers.Length; if (count > 0) generics.DeleteUser(null, SourceID, SourceType); for (int i = 0; i < count; i++) { UsersParagraphLink user = new UsersParagraphLink(); user.DateAdded = DateTime.Now; user.UserID = Membership.GetUser(allusers[i]).ProviderUserKey.ToString(); user.SourceID = SourceID; user.SourceType = SourceType; generics.SaveUser(user); } }
public void DeleteUsers(string[] users, int SourceID, int SourceType) { IGenericRepository generics = new GenericRepository(); int count = users.Length; for (int i=0;i<count;i++) { generics.DeleteUser(users[i],SourceID,SourceType); } }
public void DeleteUsers(string[] users, int SourceID, int SourceType) { IGenericRepository generics = new GenericRepository(); int count = users.Length; for (int i=0;i<count;i++) { generics.DeleteUser(users[i],SourceID,SourceType); } }
//function to save users for a paragraph public static void InsertUsersPerParagraph(FormCollection collection, int SourceID, int SourceType) { IGenericRepository generics = new GenericRepository(); string selectedusers = collection["users"]; string[] allusers = selectedusers.Split(','); int count = allusers.Length; if (count > 0) generics.DeleteUser(null, SourceID, SourceType); for (int i = 0; i < count; i++) { UsersParagraphLink user = new UsersParagraphLink(); user.DateAdded = DateTime.Now; user.UserID = Membership.GetUser(allusers[i]).ProviderUserKey.ToString(); user.SourceID = SourceID; user.SourceType = SourceType; generics.SaveUser(user); } }