示例#1
0
        // if any error db will return 1
        internal bool SendMessage(Message message)
        {
            command = database.GetStoredProcCommand("sp_SendMessage");

            database.AddInParameter(command, "@UserId", SqlDbType.NVarChar, message.SenderId);
            database.AddInParameter(command, "@RecieverId", SqlDbType.NVarChar, message.ReceiverId);
            database.AddInParameter(command, "@MessageContent", SqlDbType.NVarChar, message.Text);
            try
            {
                database.ExecuteNonQuery(command);
                return true;
            }
            catch
            {
                return false;
            }
        }
示例#2
0
 public static bool SendMessage(Message message)
 {
     return mMessageLogic.SendMessage(message);
 }
示例#3
0
 public bool SendMessage(Message message)
 {
     return Message.SendMessage(message);
 }