public ActionResult Create(FormCollection collection) { // TODO: Add insert logic here if (ModelState.IsValid) { var cp = new QLGiaDangKyShop(); // TODO: Add insert logic here cp.NgayTuanThangNam_ID = int.Parse(collection["NgayTuanThangNam_ID"]); cp.Gia = float.Parse(collection["Gia"]); cp.NgayTao = DateTime.Now; QLGDKSRes.Add(cp); QLGDKSRes.Save(); return RedirectToAction("Index"); } else { return View(); } }
public void Delete(QLGiaDangKyShop dm) { en.DeleteObject(dm); }
public void Add(QLGiaDangKyShop dm) { en.AddObject("QLGiaDangKyShop", dm); }
// // GET: /QLGiaDangKyShop/Create public ActionResult Create() { var cp = new QLGiaDangKyShop(); ViewData["NgayThangNam"] = GiaModuleRes.FindAllngayTuanThangNam(); return View(cp); }