public CrmResponse DeleteJBI(int idJBI) { CrmResponse response = new CrmResponse(); try { using (var manager = new JBIManager()) { response = manager.DeleteJBI(idJBI); } } catch (Exception ex) { //-----------------------------------------------------------------------------adderror to db--------------------------------------------------------------------------------------------- response.title = "Error in DeleteJBI function"; response.body = ex.Message; response.rc = 99; } return(response); }
// GET: api/JBI/5 public JBISpecificResponse GetSpecificJBI(int idJBI) { JBISpecificResponse response = new JBISpecificResponse(); try { using (var manager = new JBIManager()) { response = manager.GetSpecificJBI(idJBI); } } catch (Exception ex) { //-----------------------------------------------------------------------------adderror to db--------------------------------------------------------------------------------------------- response.title = "Error in GetSpecificJBI function"; response.body = ex.Message; response.rc = 99; } return(response); }
public JBIListResponse GetFilterJBIList(int role = 0, string name = "") { JBIListResponse response = new JBIListResponse(); try { using (var manager = new JBIManager()) { response = manager.GetFilterJBIlist(role, name); } } catch (Exception ex) { //-----------------------------------------------------------------------------adderror to db--------------------------------------------------------------------------------------------- response.title = "Error in GetFilterJBIlist function"; response.body = ex.Message; response.rc = 99; } return(response); }
public CrmResponse AddNewJbi([FromBody] JBI request) { CrmResponse response = new CrmResponse(); try { using (var manager = new JBIManager()) { response = manager.AddNewJbi(request); } } catch (Exception ex) { //-----------------------------------------------------------------------------adderror to db--------------------------------------------------------------------------------------------- response.title = "Error in DeleteJBI function"; response.body = ex.Message; response.rc = 99; } return(response); }