Beispiel #1
0
        private void SendMessageToCallsign(DataAccess.CSSDataContext db, string subject, string message, DataAccess.Alias senderAlias, int receiverLoginID, string sendOnOrAfterDateTime, string expiresAfterDateTime)
        {
            DateTime dateToSend  = DateTime.Parse(sendOnOrAfterDateTime);
            DateTime dateExpires = DateTime.Parse(expiresAfterDateTime);

            var personalMessage = new DataAccess.PersonalMessage()
            {
                DateCreated   = DateTime.Now,
                DateExpires   = dateExpires,
                DateToSend    = dateToSend,
                Subject       = subject,
                Message       = message,
                SenderAliasId = senderAlias.Id,
                LoginId       = receiverLoginID
            };

            db.PersonalMessages.InsertOnSubmit(personalMessage);
        }
        private void SendMessageToCallsign(DataAccess.CSSDataContext db, string subject, string message, DataAccess.Alias senderAlias, int receiverLoginID, string sendOnOrAfterDateTime, string expiresAfterDateTime)
        {
            DateTime dateToSend = DateTime.Parse(sendOnOrAfterDateTime);
            DateTime dateExpires = DateTime.Parse(expiresAfterDateTime);

            var personalMessage = new DataAccess.PersonalMessage()
            {
                DateCreated = DateTime.Now,
                DateExpires = dateExpires,
                DateToSend = dateToSend,
                Subject = subject,
                Message = message,
                SenderAliasId = senderAlias.Id,
                LoginId = receiverLoginID
            };

            db.PersonalMessages.InsertOnSubmit(personalMessage);
        }