public ActionResult CreateSub(string productCode, string productName, string subMaterialCode) { var model = new PckMtrViewModel { IsCreate = true, F11_ProductCode = productCode, ProductName = productName }; if (!string.IsNullOrEmpty(subMaterialCode)) { var pkmtr = _pckMtrDomain.GetPckMtr(productCode, subMaterialCode); model = Mapper.Map <PckMtrViewModel>(pkmtr); model.SubMaterialName = _subMaterialDomain.GetById(subMaterialCode).F15_MaterialDsp; model.IsCreate = false; } return(PartialView("Product/_PartialViewAddSup", model)); }
public ActionResult Edit(string id) { var model = new SubMaterialViewModel { IsCreate = true }; if (!string.IsNullOrEmpty(id)) { var entity = _subMaterialDomain.GetById(id.Trim()); if (entity != null) { model = Mapper.Map <SubMaterialViewModel>(entity); model.IsCreate = false; } } return(PartialView("SubMaterialMaster/_PartialSubMaterial", model)); }