public static int AddComment(string itemTypeId, int itemId, string commentText, int severityId) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); if (accountCheck < 0) { return(accountCheck); } // add comment DataProvider.AddComment(SecurityContext.User.UserId, itemTypeId, itemId, commentText, severityId); return(0); }
public static int AddUser(UserInfo user, bool sendLetter, string password, string[] notes) { int userId = AddUser(user, sendLetter, password); if (userId > 0 && notes != null) { foreach (string note in notes) { // user added successfully, save the notes DataProvider.AddComment( SecurityContext.User.UserId, "USER", userId, note, 1 ); } } return(userId); }