public AssetPurchaseDetail GetPurchaseDetail(int orgid, int id) { AssetPurchaseDetail detail = new AssetPurchaseDetail(); detail.AssetPurchase = GetPurchase(orgid, id); detail.AssetPurchaseItems = GetPurchaseItemList(orgid, id); return(detail); }
// GET: /AssetPurchaseDetail/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AssetPurchaseDetail assetpurchasedetail = _assetPurchaseDetailManager.GetById((int)id); if (assetpurchasedetail == null) { return(HttpNotFound()); } return(View(assetpurchasedetail)); }
public ActionResult Edit([Bind(Include = "AssetPurchaseDetailID,AssetPurchaseHeaderID,SubCategoryID,Quantity,UnitPrice,IsWarranty,WarrantyPeriod,WarrantyPeriodUnitID")] AssetPurchaseDetail assetpurchasedetail) { if (ModelState.IsValid) { _assetPurchaseDetailManager.Update(assetpurchasedetail); return(RedirectToAction("Index")); } var assetPurchaseHeader = _assetPurchaseHeaderManager.GetAll(); ViewBag.AssetPurchaseHeaderID = new SelectList(assetPurchaseHeader, "AssetPurchaseHeaderID", "AssetPurchaseHeaderID"); var productList = _productManager.GetAll(); ViewBag.ProductID = new SelectList(productList, "ProductID", "ProductName"); var warrantyPeriodID = _warrantyPeriodUnitManager.GetAll(); ViewBag.WarrantyPeriodUnitID = new SelectList(warrantyPeriodID, "WarrantyPeriodUnitID", "WarrantyPeriodUnitName"); return(View(assetpurchasedetail)); }
// GET: /AssetPurchaseDetail/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AssetPurchaseDetail assetpurchasedetail = _assetPurchaseDetailManager.GetById((int)id); if (assetpurchasedetail == null) { return(HttpNotFound()); } var assetPurchaseHeader = _assetPurchaseHeaderManager.GetAll(); ViewBag.AssetPurchaseHeaderID = new SelectList(assetPurchaseHeader, "AssetPurchaseHeaderID", "AssetPurchaseHeaderID"); var productList = _productManager.GetAll(); ViewBag.ProductID = new SelectList(productList, "ProductID", "ProductName"); var warrantyPeriodID = _warrantyPeriodUnitManager.GetAll(); ViewBag.WarrantyPeriodUnitID = new SelectList(warrantyPeriodID, "WarrantyPeriodUnitID", "WarrantyPeriodUnitName"); return(View(assetpurchasedetail)); }
public bool Update(AssetPurchaseDetail entity) { return(_purchaseDetailRepository.Update(entity)); }
public bool Add(AssetPurchaseDetail entity) { return(_purchaseDetailRepository.Add(entity)); }