Exemple #1
0
        public IHttpActionResult GetDashboard()
        {
            try
            {
                var UserId  = ((ClaimsIdentity)User.Identity).Claims.FirstOrDefault(c => c.Type.Equals(ClaimTypes.NameIdentifier)).Value;
                var RefType = ((ClaimsIdentity)User.Identity).Claims.FirstOrDefault(c => c.Type.Equals(ClaimTypes.Name)).Value;
                var RefID   = ((ClaimsIdentity)User.Identity).Claims.FirstOrDefault(c => c.Type.Equals(ClaimTypes.Sid)).Value;

                BookingDL      obj  = new BookingDL();
                DashboardModel list = obj.GetDashboard(Convert.ToInt32(UserId), Convert.ToInt32(RefType), Convert.ToInt32(RefID));

                list.success = true;
                list.message = "Get dashboard details Successfully";
                list.code    = 200;

                return(Ok(list));
            }
            catch (Exception ex)
            {
                responseData.message = ex.Message != null?ex.Message.ToString() : "server error";

                return(Ok(responseData));
            }
        }