예제 #1
0
        // GET: AdminB2B
        public ActionResult Taohopdong()
        {
            HopdongNCCModel Ncc = new HopdongNCCModel();

            ViewBag.TenNCC = new SelectList(Ncc.getDsNhaCC(), "MaNCC", "TenNCC");
            ViewBag.MaSP   = new SelectList(Ncc.getDsSanPham(), "ID", "TenSP");
            return(View());
        }
예제 #2
0
        // GET: AdminB2B
        public ActionResult Taohopdong()
        {
            var Ncc = new HopdongNCCModel();

            ViewBag.TenNCC = new SelectList(Ncc.getDsNhaCC(), "NhaCungCapId", "TenNcc");
            ViewBag.MaSP   = new SelectList(Ncc.getDsSanPham(), "Id", "TenSP");
            return(View());
        }
예제 #3
0
        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));
        }
예제 #4
0
        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));
        }