I have create an account in bitcoind, which has got some balance of 1.77 btc, I would like to send everything to another address that is an admin address, so is there any rpc method to send everything or need to do transaction fee calculation for this. If transaction fee calculation has to be done, please let me know the calcuation, this particualar func has to be impl in my backend for a platform.
I would highly recommend that you not use the accounts system as it is deprecated and has been removed for Bitcoin Core 0.17 and beyond. Furthermore, the way that you want to use the accounts system is not how it actually works. Accounts are only associated with addresses for receiving; for spending, when you "send from" an account, all that happens is the numbers for the account are deducted, not that addresses that were associated with the account for receiving are the ones actually used in the inputs.
To send everything from an account, just use the
sendfrom command with the balance of the account. This will change the accounting entries so that that account is deducted however much you sent. Note that this will not necessarily choose the inputs that you think are associated with the account; it can choose any input in the wallet to create the transaction. However if you call
getbalance <account>, you will see the account's balance be 0.