public ActionResult Taohopdong(HopDongNCC a) { HopdongNCCModel Ncc = new HopdongNCCModel(); if (ModelState.IsValid) { string MaHD; if ((MaHD = Ncc.ThemmoiHopDongNCC(a)) != "") { ConfigAPI a1 = new ConfigAPI(); a1.MaNCC = a.MaNCC; return(View("ConfigAPI", a1)); } } ViewBag.TenNCC = new SelectList(Ncc.getDsNhaCC(), "MaNCC", "TenNCC"); ViewBag.MaSP = new SelectList(Ncc.getDsSanPham(), "ID", "TenSP"); return(View(a)); }
public ActionResult Taohopdong(HopDongNcc hopDong) { var Ncc = new HopdongNCCModel(); if (ModelState.IsValid) { string MaHD; if (Ncc.ThemmoiHopDongNCC(hopDong) != 0) { var a1 = new ConfigAPI(); a1.NhaCungCapId = hopDong.NccId; return(View("ConfigAPI", a1)); } } ViewBag.TenNCC = new SelectList(Ncc.getDsNhaCC(), "NhaCungCapId", "TenNcc"); ViewBag.MaSP = new SelectList(Ncc.getDsSanPham(), "Id", "TenSP"); return(View(hopDong)); }