コード例 #1
0
        public async Task <IActionResult> Create([Bind("Id,UswerId,date,DocId,Institution,IsDiagnosed,Problem,Comment")] UserDetails userDetails)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userDetails);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userDetails));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("id,Role")] roles roles)
        {
            if (ModelState.IsValid)
            {
                _context.Add(roles);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(roles));
        }
コード例 #3
0
        public async Task <IActionResult> Create([Bind("Id,fULL_NAME,uSERNAME,ROLE,PHONE,serviceNo,PASSWORD")] Doc_Res doc_Res)
        {
            if (ModelState.IsValid)
            {
                _context.Add(doc_Res);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index", "Home"));
            }
            return(View(doc_Res));
        }