public JsonResult <ps_GetRingGroupByCallerIDResult> RingGroup(string userName, string password, string say)
        {
            var model = new AuthenticationToken
            {
                UserName = userName,
                Password = password
            };
            var user = SecurityHelper.Authorize(model, new[] { SystemRoles.OkiToki });

            using (var ctx = new CubeContext())
            {
                var r = ctx.GetRingGroupByCallerId(user.Name);
                return(Json(r));
                //return r.RingGroup;
            }
        }
Exemple #2
0
        public JsonResult <ps_GetRingGroupByCallerIDResult> RingGroup(string userName, string password, string say)
        {
            var start = DateTime.Now;
            var model = new GetRingGroupParamsModel
            {
                UserName = userName,
                Password = password,
                Say      = say
            };

            SecurityHelper.Authorize(model, new[] { SystemRoles.OkiToki });

            using (var ctx = new CubeContext())
            {
                var r = ctx.GetRingGroupByCallerId(say);
                Log.Debug($"RingGroup for {say} - {(DateTime.Now - start).Milliseconds} ms: {JsonConvert.SerializeObject(r)}");

                return(Json(r));
            }
        }