Posted on: 4/28/2015 6:15:51 AM | Views : 572

Hi all,

I am stuck with some issues. I have a gridview and a data table in sql. I am working some project which contains leave. consider an employee apply for leaves in organization and manager need to approve that leave. I have given gridview for manager for approving leaves. my issue is i need to update only Manager id in database table. I have given userid,leave type etc in gridview. I doesnt need to update Userid . Below is my sql query and code behind. Please let me know how to solve the issue.
public string UpdateApprove(UserBO StrApprove,string struser) { SqlCommand updteappr = new SqlCommand("Update ApproveLeave set ApprovedbyUser=@ApprovedbyUser where UserId= '"+struser+"'", con); con.Open(); try { updteappr.Parameters.AddWithValue("@ApprovedbyUser", StrApprove.Userid); ...

Go to the complete details ...