Exemplo n.º 1
0
        public static bool DeleteEmailList(int listIid)
        {
            bool Retval = true;

            Retval = EmailListToEmail.DeleteEmailsFromList(listIid);
            if (Retval == true)
            {
                string SqlStatement = string.Format("DELETE EMAIL_LIST WHERE ListIid='{0}'", listIid);
                Retval = MainClass.ExecuteSql(SqlStatement, true, TableName, ModuleName, "DeleteEmailList");
            }
            return(Retval);
        }
Exemplo n.º 2
0
        public static bool DeleteOrphans()
        {
            bool Retval = true;

            string SqlStatement = string.Format("DELETE EMAIL_LIST WHERE listType = 1 AND listIid NOT IN (SELECT emailId from REPORT WHERE eMailType = 1)");

            Retval = MainClass.ExecuteSql(SqlStatement, true, TableName, ModuleName, "DeleteEmailList");

            if (Retval == true)
            {
                Retval = EmailListToEmail.DeleteOrphans();
            }
            return(Retval);
        }