Example #1
0
        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);
        }
Example #2
0
        // 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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }