string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString; SqlConnection mySQLconnection = new SqlConnection(connStr); if (mySQLconnection.State == ConnectionState.Closed) { mySQLconnection.Open(); } // DropDownList drdList; // SqlCommand mySqlCommand; foreach (GridViewRow row in GrdFileApprove.Rows) { if (row.RowType == DataControlRowType.DataRow) { DropDownList DropDownListcontrol = row.FindControl("DropDownList4") as DropDownList; SqlCommand cmd = new SqlCommand("approveddd", mySQLconnection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@DocID", SqlDbType.Int).Value = Convert.ToInt32((row.Cells[1].Text)); cmd.Parameters.Add("@ApproveID", SqlDbType.Int).Value = Convert.ToInt32(DropDownListcontrol.SelectedValue); cmd.Parameters.Add("@ApproveBy", SqlDbType.VarChar, 50).Value = (Session["Login2"]); cmd.ExecuteNonQuery(); } else { apfi.Text = "Error"; } }
Quote:Add one field in database (IsApproved) and set bit 0 for not approved and 1 for approved, if admin approved set bit from 0 to 1 and when login agian use check if bit is 1 then disable other wise enable to approved document. I think it'll help you to solve problem
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)