Пример #1
0
        public ActionResult edit_hang_xe(string id_hang_xe)
        {
            hang_xe hx = db.hang_xe.FirstOrDefault(m => m.id_hang_xe == id_hang_xe);

            return(View(hx));
        }
Пример #2
0
 public ActionResult edit_hang_xe([Bind(Include = "ten_hang,id_hang_xe")] hang_xe hx)
 {
     db.Database.ExecuteSqlCommand("edit_hang_xe @id_hang_xe,@ten_hang", new SqlParameter("@id_hang_xe", hx.id_hang_xe), new SqlParameter("@ten_hang", hx.ten_hang));
     db.SaveChanges();
     return(RedirectToAction("danh_sach_hang_xe"));
 }
Пример #3
0
 public ActionResult add_hang_xe([Bind(Include = "ten_hang")] hang_xe hx)
 {
     db.Database.ExecuteSqlCommand("insert_hang_xe @ten_hang", new SqlParameter("@ten_hang", hx.ten_hang));
     return(RedirectToAction("danh_sach_hang_xe"));
 }