Exemple #1
0
        private void SendNewMessage(int userIdReceiver, int chatId)
        {
            NewChatModel newChat = new NewChatModel();

            newChat.ChatId          = chatId;
            newChat.ChatMessageText = textBoxMessage.Text;
            newChat.UserIdReciver   = userIdReceiver;
            newChat.UserIdSender    = Program.UserId;
            newChat.UserIdStarter   = userIdReceiver;

            ChatUploader chatUploader = new ChatUploader();

            chatUploader.Attach(this);
            chatUploader.InsertNewMessage(newChat);
            labelWating.Visible = true;
        }
Exemple #2
0
        private void InsertNewChat(int userIdReceiver)
        {
            NewChatModel newChat = new NewChatModel();

            newChat.ChatId = 0;
            string messageText = "سلام، وقت بخیر... بنده مشاور شغلی شما هستم. بیایید درمورد شغل آینده شما صحبت کنیم لطفا به سوالاتی که میپرسم با دقت پاسخ دهید..";

            //string messageText = Questions[0].QuestionTitle;
            newChat.ChatMessageText = messageText;
            newChat.UserIdReciver   = userIdReceiver;
            newChat.UserIdSender    = Program.UserId;
            newChat.UserIdStarter   = Program.UserId;

            ChatUploader chatUploader = new ChatUploader();

            chatUploader.Attach(this);
            chatUploader.InsertNewMessage(newChat);
            labelWating.Visible = true;
            IsFirstMessage      = true;
        }
Exemple #3
0
        private void SendNewMessage(int userIdReceiver, int chatId)
        {
            NewChatModel newChat = new NewChatModel();

            newChat.ChatId = chatId;
            string messageText = Questions[listBoxQuestions.SelectedIndex].QuestionTitle;

            newChat.ChatMessageText = messageText;
            newChat.UserIdReciver   = userIdReceiver;
            newChat.UserIdSender    = Program.UserId;
            newChat.UserIdStarter   = Program.UserId;

            CurrentRecipentUserId = userIdReceiver;
            ChatUploader chatUploader = new ChatUploader();

            chatUploader.Attach(this);
            chatUploader.InsertNewMessage(newChat);
            labelWating.Visible = true;
            IsFirstMessage      = false;
        }