public static void SendActivationEmail(Cxt cxt) { BaseCollection items = BaseCollection.SelectItems(InfiChess.User, "StatusID", 3); for (int i = 0; i < items.Count; i++) { if (EmailTemplate.Send(cxt, EmailTemplateE.NewAccount, new User(cxt, items[i])) != MailVerifyResult.Ok) { System.Threading.Thread.Sleep(5000); } } }
public static BaseCollection GetTasks(int serviceID, string userName) { string sql = "SELECT * FROM RoleTask WHERE ServiceID IN(" + serviceID + ") AND RoleID IN(SELECT RoleID FROM UserRole WHERE UserID IN(SELECT UserID FROM [User] WHERE UserName = '******'))"; return(BaseCollection.SelectItems(InfiChess.RoleTask, sql)); }