Beispiel #1
0
        public void AddChat(int userId, string Text)
        {
            chatServices _chat        = new Database.chatServices();
            var          mobile       = _chat.AddChat(userId, Text, 1);
            var          mobileNumber = mobile.Split('_')[0];

            client.SendMessage("+15076077264", mobileNumber, Text);
        }
Beispiel #2
0
        public PartialViewResult getChatnewById(int UserId, int maxid, int aid)
        {
            chatServices _chat  = new Database.chatServices();
            chatModel    _model = new Models.chatModel();

            _model = _chat.getChatByContactId(UserId, aid, maxid);
            return(PartialView("GetNewChat", _model));
        }
Beispiel #3
0
        public PartialViewResult getChatById(int UserId, int aid)
        {
            chatServices _chat  = new Database.chatServices();
            chatModel    _model = new Models.chatModel();

            _model     = _chat.getChatByContactId(UserId, aid);
            _model.aId = aid;
            return(PartialView("getChatById", _model));
        }
Beispiel #4
0
        public PartialViewResult getChatBymsgId(int msgId)
        {
            int          adminId = Convert.ToInt16(Session["AdminId"]);
            chatServices _chat   = new Database.chatServices();
            chatModel    _model  = new Models.chatModel();

            _model = _chat.getChatBychatId(msgId, adminId);
            return(PartialView("getChatById", _model));
        }
Beispiel #5
0
        public ActionResult Index()
        {
            int          adminId = Convert.ToInt16(Session["AdminId"]);
            chatServices _chat   = new Database.chatServices();
            chatModel    _model  = new Models.chatModel();

            _model = _chat.getContactsByAdminid(adminId);
            if (Session["name"] == null)
            {
                userServices _ser     = new userServices();
                var          _profile = _ser.getProfileByUserId(adminId);
                Session["name"]  = _profile.name;
                Session["image"] = !string.IsNullOrEmpty(_profile.image) ? _profile.image : "/assets/images/icon/staff.png";
            }
            _model.name     = Session["name"].ToString();
            _model.imageurl = Session["image"].ToString();
            _model.aId      = adminId;
            return(View(_model));
        }