コード例 #1
0
ファイル: JsonController.cs プロジェクト: parineeti/CRM
        public PartialViewResult getProfile()
        {
            int          adminId  = Convert.ToInt16(Session["AdminId"]);
            userServices _ser     = new userServices();
            var          _profile = _ser.getProfileByUserId(adminId);

            if (Session["name"] == null)
            {
                Session["name"]  = _profile.name;
                Session["image"] = !string.IsNullOrEmpty(_profile.image)? _profile.image: "/assets/images/icon/staff.png";
            }
            return(PartialView(_profile));
        }
コード例 #2
0
ファイル: chatController.cs プロジェクト: parineeti/CRM
        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));
        }