private void SaveAdministration(Administration model) { try { getBusiness = new AdministrationBusinessLayer(); var list = getBusiness.GetAll(); int counter = list.Count(); if (counter < 1) { getBusiness = new AdministrationBusinessLayer(); getBusiness.Insert(model); } } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }
private void SaveAdministration(Administration model) { try { if (_id == 0) { getAdministrationBusiness = new AdministrationBusinessLayer(); getAdministrationBusiness.Insert(model); } if (_id > 0) { getAdministrationBusiness = new AdministrationBusinessLayer(); getAdministrationBusiness.Update(model); } FillGrid(); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }