public ActionResult DeleteSup(string SupID) { ThesisGamingStore.Models.SUPPLIER sup = db.SUPPLIER.Find(SupID); if (sup == null) { return(HttpNotFound()); } return(View(sup)); }
public static SupplierEntity ToDto(ThesisGamingStore.Models.SUPPLIER entity) { return(new SupplierEntity { SupID = entity.SupID, SupName = entity.SupName, SubAddress = entity.SubAddress, SubEnabled = entity.SubEnabled, }); }
public static SupplierModel ToDto2(ThesisGamingStore.Models.SUPPLIER entity) { return(new SupplierModel { SupID = entity.SupID, SupName = entity.SupName, SubAddress = entity.SubAddress, SubEnabled = entity.SubEnabled, Phones = entity.SUPPLIER_PHONE, }); }
public ActionResult EditSup(string SupID) { ThesisGamingStore.Models.SUPPLIER suppllier = db.SUPPLIER.Find(SupID); var result = Mapper.ToDto2(suppllier); if (suppllier == null) { return(HttpNotFound()); } return(View(result)); }