示例#1
0
        public IActionResult GetAllAccountingClass()
        {
            try
            {
                var accountingClassList = AccountClassHelper.GetAccountingClassList();
                if (accountingClassList.Count > 0)
                {
                    dynamic expando = new ExpandoObject();
                    expando.AccountingClassList = accountingClassList;
                    return(Ok(new APIResponse {
                        status = APIStatus.PASS.ToString(), response = expando
                    }));
                }

                return(Ok(new APIResponse {
                    status = APIStatus.FAIL.ToString(), response = "No Data Found."
                }));
            }
            catch (Exception ex)
            {
                return(Ok(new APIResponse {
                    status = APIStatus.FAIL.ToString(), response = ex.Message
                }));
            }
        }
示例#2
0
 public IActionResult GetAccoundingClasslist()
 {
     try
     {
         dynamic expando = new ExpandoObject();
         expando.accountingClassList = AccountClassHelper.GetAccountingClassList();
         return(Ok(new APIResponse()
         {
             status = APIStatus.PASS.ToString(), response = expando
         }));
     }
     catch (Exception ex)
     {
         return(Ok(new APIResponse()
         {
             status = APIStatus.FAIL.ToString(), response = ex.Message
         }));
     }
 }