public Models.DonHang convertDHService(ServiceReference1.DonHang dh) { Models.DonHang dhang = new Models.DonHang(); dhang.MaDH = dh.MaDH; dhang.MaDT = dh.MaDT; dhang.MaKH = dh.MaKH; dhang.SoTien = dh.SoTien; dhang.statusDH = dh.statusDH; return(dhang); }
public ActionResult createDH(Models.DonHang dh) { if (ModelState.IsValid) { dh.statusDH = "đang chờ"; var tks = convertDHClient(dh); client.dangkyDonHang(tks); return(RedirectToAction("ViewDH")); } return(View()); }