However, I can see one simple glitch in your code and so I m putting it in the solution box here. The "empid" in your update statement is not parameterised by the "@" symbol
string str = "UPDATE EMPDETAILS SET NAME=@name,DEPT=@dept,CITY=@city WHERE chkstatus=@chkstatus AND EMPID=@empid";
I am not sure if this is what you wanted but this is atleast one problem that i spotted in your code. For anything else you've got to tell us so.