Example #1
0
        public Result Delete(GeneralInsurance GeneralInsurance)
        {
            var result = new Result();

            try
            {
                GeneralInsuranceService GeneralInsuranceService = new GeneralInsuranceService();
                GeneralInsuranceService.Delete(GeneralInsurance);
                result.IsSuccess = true;
            }
            catch (Exception exception)
            {
                result.IsSuccess     = false;
                result.ExceptionInfo = exception;
            }
            return(result);
        }
 internal bool Add(GeneralInsurance generalInsurance)
 {
     try
     {
         FinancialPlanner.Common.JSONSerialization jsonSerialization = new FinancialPlanner.Common.JSONSerialization();
         string          apiurl          = Program.WebServiceUrl + "/" + ADD_GENERALINSURANCE_API;
         RestAPIExecutor restApiExecutor = new RestAPIExecutor();
         var             restResult      = restApiExecutor.Execute <GeneralInsurance>(apiurl, generalInsurance, "POST");
         return(true);
     }
     catch (Exception ex)
     {
         StackTrace st = new StackTrace();
         StackFrame sf = st.GetFrame(0);
         MethodBase currentMethodName = sf.GetMethod();
         LogDebug(currentMethodName.Name, ex);
         return(false);
     }
 }