public ActionResult AddOrEditItem(int id = 0) { ItemMasterVM ItemVM = new ItemMasterVM(); ViewBag.Types = dropDown.DDLGetTypes(); ViewBag.Units = dropDown.DDLGetUnits(); if (id == 0) { //add return(PartialView(ItemVM)); } else { //update ItemVM = _ItemSerivce.GetItemById(id); return(PartialView(ItemVM)); } }
public ActionResult AddOrEditRFQ(int id = 0) { RFQVM rfqVM = new RFQVM(); RFQDetailsVM rfqdt = new RFQDetailsVM(); rfqVM._RFQDetailsVM = rfqdt; ViewBag.supplierList = dropDown.DDLGetSuppliers(); //ViewBag.ItemList = DropDownLists.DDLGetItems(); ViewBag.UnitList = dropDown.DDLGetUnits(); ViewBag.TaxList = dropDown.DDLGetTax(); ViewBag.message = ""; if (id == 0) { return(PartialView(rfqVM)); } else { return(PartialView(rfqVM)); } }