private void deleteBomById(decimal id) { if (id < 1) { throw new Exception(MessageHelper.component_nothing_deleted); } BomService.getInstance().deleteBomById(id); }
async Task updateBom(BOM_Model model) { string message = "Update bom successfully"; try { BomService.getInstance().updateBom(model); await reloadBomAsync(); }catch (Exception e) { message = e.Message; } MessageBox.Show(message); }
private async Task saveAndReloadBom() { string message = MessageHelper.saveComponentSuccess; BOM_Model model = getBomModel(); try { BomService.getInstance().save(model); reloadBom(); } catch (Exception e) { message = e.Message; } MessageBox.Show(message); }