Exemplo n.º 1
0
        public ActionResult Create([Bind(Include = "Sdt,TenKH,DiachiKH,Ngaydangki,Matkhau,Level")] Account account)
        {
            if (ModelState.IsValid)
            {
                db.Accounts.Add(account);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(account));
        }
Exemplo n.º 2
0
        public ActionResult Create([Bind(Include = "id,username,password,lever")] user user)
        {
            if (ModelState.IsValid)
            {
                db.users.Add(user);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(user));
        }
Exemplo n.º 3
0
 public long Insert(taikhoangkhachhang entity)
 {
     db.taikhoangkhachhangs.Add(entity);
     db.SaveChanges();
     return(entity.id);
 }
Exemplo n.º 4
0
 public long Insert(Account entity)
 {
     db.Accounts.Add(entity);
     db.SaveChanges();
     return(entity.Sdt);
 }