public bool CanDeleteCashBank(int AccountId)
        {
            ICashBankDetialsDAL CashBankDetails = new CashBankDetialDAL();
            bool result = CashBankDetails.CanDeleteCashBank(AccountId);

            return(result);
        }
        public List <AccountsEntity> GetAccountDetails()
        {
            ICashBankDetialsDAL CashBankDetails = new CashBankDetialDAL();
            var optionDAL = CashBankDetails.GetAccountDetails();

            return(optionDAL);
        }
        public CashBankDetailEntity GetDefaultCashBank()
        {
            ICashBankDetialsDAL CashBankDetails = new CashBankDetialDAL();
            var optionDAL = CashBankDetails.GetDefaultCashBank();

            optionDAL.AccountOpeningBal = optionDAL.AccountOpeningBal == null?null: string.Format("{0:G29}", decimal.Parse(optionDAL.AccountOpeningBal));
            return(optionDAL);
        }
        public CashBankDetailEntity GetAccInfo(int AccountId)
        {
            ICashBankDetialsDAL CashBankDetails = new CashBankDetialDAL();
            var optionDAL = CashBankDetails.GetAccInfo(AccountId);

            optionDAL.AccountOpeningBal = string.Format("{0:G29}", decimal.Parse(optionDAL.AccountOpeningBal));
            if (optionDAL.IsInActivestring == "Y")
            {
                optionDAL.IsInActive = true;
            }
            else
            {
                optionDAL.IsInActive = false;
            }
            return(optionDAL);
        }
        public int AddEditCashBank(CashBankDetailEntity cashbankEntity)
        {
            ICashBankDetialsDAL CashBankDetails = new CashBankDetialDAL();

            //var openingbal = Convert.ToDecimal(cashbankEntity.AccountOpeningBal);
            cashbankEntity.AccountOpeningBal = string.Format("{0:G29}", decimal.Parse(cashbankEntity.AccountOpeningBal));
            if (cashbankEntity.IsInActive == true)
            {
                cashbankEntity.IsInActivestring = "Y";
            }
            else
            {
                cashbankEntity.IsInActivestring = "N";
            }
            int result = CashBankDetails.AddEditCashBank(cashbankEntity);

            return(result);
        }