コード例 #1
0
        }// End of Constructor function

        /// <summary>
        /// Add authentication
        /// </summary>
        /// <param name="authentication"></param>
        /// <param name="user_log"></param>
        /// <returns></returns>
        public Authentication addAuthentication(Authentication authentication, UserSystem user_log)
        {
            return(http_service.JSONHttpPettitionObject <Authentication>(
                       HttpMethod.POST,
                       GetType().Name.ToLower().Replace(
                           TWords.SERVICE,
                           TWords.SLASH),
                       JsonConvert.SerializeObject(
                           AuthenticationAdapter.ObjectToDTO(
                               authentication))));
        }// End of addAuthentication function
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string lookUpQueryString = Request["LookUp"];
            bool   openAsLookUp      = !String.IsNullOrEmpty(lookUpQueryString) && lookUpQueryString.ToLower().Equals("true");

            if (openAsLookUp)
            {
                BodyID = PageLayout.MainColumn;
            }

            ApplyTreeViewCookie();
            if (AuthenticationAdapter.GetDbUser(Context.User.Identity.Name) == null)
            {
                AuthenticationAdapter.CreateDbUser(Context.User.Identity.Name);
            }

            fio.Text = Context.User.Identity.Name;
        }