Sir ad hoc doesn't mean that you become regular employee of a company. Every department has its own service rules and you have to go by them only. If you think that something has been done contrary to the rules and regulations, then only you can move legally against the department. For any further assistance, feel free to contact me on my e-mail "firstname.lastname@example.org"
Shubham Pabbi & Associates