public async Task <IActionResult> PutUsertable(decimal id, Usertable usertable) { if (id != usertable.UId) { return(BadRequest()); } _context.Entry(usertable).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UsertableExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult Login(LoginBean bean) { Usertable user = FactoryDao.GetUsertableDao().SelectId(bean.id, bean.password); if (user == null) { return(Index()); } Session[Define.USER_SESSION_NAME] = user; return(Main()); }
public async Task <ActionResult <Usertable> > PostUsertable(Usertable usertable) { _context.Usertables.Add(usertable); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (UsertableExists(usertable.UId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetUsertable", new { id = usertable.UId }, usertable)); }
public void Registeruserdetails([FromBody] Usertable user) { mod.Database.ExecuteSqlCommand("RegUser {0},{1},{2},{3},{4},{5},{6},{7},{8}", user.Username, user.Password, user.Firstname, user.Lastname, user.Contactnumber, user.RegDatetime, user.RegCode, user.ForceResetPassword, user.Active); }