예제 #1
0
        public static System.Data.DataTable Sent_View(DateTime start, DateTime end, string sentTo = "", string content = "", Tab_Contact.Communication via = Tab_Contact.Communication.NaN, Tab_Sent.Confirmation status = Tab_Sent.Confirmation.SentSuccessful)
        {
            string query = "SELECT Gesendet, An, Inhalt, Via, Sendestatus FROM " + Sent_ViewName +
                           " WHERE Gesendet BETWEEN '" + start.ToUniversalTime() + "' AND '" + end.ToUniversalTime() + "' ";

            if (sentTo.Length > 2)
            {
                query += " AND Von LIKE '%" + sentTo + "%' ";
            }
            if (content.Length > 2)
            {
                query += " AND Inhalt LIKE '%" + content + "%' ";
            }
            if (via != Tab_Contact.Communication.NaN)
            {
                query += " AND Via = " + via + " ";
            }
            if (status != Tab_Sent.Confirmation.SentSuccessful)
            {
                query += " AND Sendestatus = " + status + " ";
            }

            return(Sql.SelectDataTable("Gesendet", query));
        }
예제 #2
0
 public Sent(int toId, int contentId, Tab_Contact.Communication toVia)
 {
     ToId      = toId;
     ContentId = contentId;
     ToVia     = toVia;
 }