public ActionResult Create(FormCollection collection)
        {
            var obj = new QuocGia();
            if (TryUpdateModel(obj))
            {
                //try
                {
                    QuocGiaRes.Add(obj);
                    QuocGiaRes.Save();
                    ViewData["message"] = "Thêm thành công";

                }
                //catch (Exception ex)
                //{
                //    ViewData["message"] = ex;
                //}

            }

            return PartialView("Create");
        }
Exemple #2
0
 public void Delete(QuocGia obj)
 {
     en.DeleteObject(obj);
 }
Exemple #3
0
 public void Add(QuocGia obj)
 {
     en.AddObject("QuocGia", obj);
 }