コード例 #1
0
 public IActionResult updateChartofAccount([FromBody] npf_chart value)
 {
     try{
         if (String.IsNullOrEmpty(value.acctcode))
         {
             return(Ok(new { responseCode = 500, responseDescription = "Kindly Supply Chart of Account Code" }));
         }
         var getbal = chartofAccountService.GetChartofAccountByCode(value.acctcode.Trim()).Result;
         getbal.description = value.description;
         chartofAccountService.UpdateChartofAccount(getbal);
         return(Ok(new { responseCode = 200, responseDescription = "Updated Successfully" }));
     }
     catch (Exception ex) {
         return(Ok(new { responseCode = 500, responseDescription = "Failed" }));
     }
 }
コード例 #2
0
        public IActionResult addNewChartofAccount([FromBody] npf_chart value)
        {
            try
            {
                if (chartofAccountService.GetChartofAccountByCode(value.acctcode.Trim()).Result != null)
                {
                    return(Ok(new { responseCode = 400, responseDescription = "Balance Sheet Code already Exist" }));
                }
                chartofAccountService.AddChartofAccount(value);

                return(Ok(new { responseCode = 200, responseDescription = "Created Successfully" }));
            }
            catch (Exception ex) {
                return(Ok(new { responseCode = 500, responseDescription = "Failed" }));
            }
        }
コード例 #3
0
 public async Task <bool> UpdateChartofAccount(npf_chart npf_Chart)
 {
     unitOfWork.accountChart.Update(npf_Chart);
     return(await unitOfWork.Done());
 }
コード例 #4
0
 public void RemoveChart(npf_chart npf_Chart)
 {
     unitOfWork.accountChart.Remove(npf_Chart);
     unitOfWork.Done();
 }