hi dharmendr
I used your code in below metod:
private void GetDocumentInfo(int pageIndex)
{
using (SqlConnection conn = General.GetConnection())
{
using (SqlCommand cmd = General.GetCommand("NewOrder_Info", conn))
{
int data1 = Convert.ToInt32(Request.QueryString["PeygiriCode"].ToString());
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@PageIndex", pageIndex);
cmd.Parameters.AddWithValue("@PageSize", PageSize);
cmd.Parameters.AddWithValue("@PeygiriCode", data1);
cmd.Parameters.Add("@RecordCount", SqlDbType.Int, 4);
cmd.Parameters["@RecordCount"].Direction = ParameterDirection.Output;
conn.Open();
SqlDataReader idr = cmd.ExecuteReader();
if (idr.HasRows)
{
if (idr.Rows[e.Row.RowIndex]["show"].ToString().ToLower() == "buy")
{
PLLink.Visible = false;
PLBuy.Visible = true;
}
else if (idr.Rows[e.Row.RowIndex]["show"].ToString().ToLower() == "download")
{
PLLink.Visible = true;
PLBuy.Visible = false;
}
else if (idr.Rows[e.Row.RowIndex]["show"].ToString().ToLower() == "download and duy")
{
PLLink.Visible = false;
PLBuy.Visible = true;
}
gvOrders.DataSource = idr;
gvOrders.DataBind();
}
else
{
gvOrders.DataSource = idr;
gvOrders.DataBind();
}
idr.Close();
}
}
}
but below error happen:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'e' does not exist in the current context
Source Error:
|
Line 323: {
Line 324:
Line 325: if (idr.Rows[e.Row.RowIndex]["show"].ToString().ToLower() == "buy")
Line 326: {
Line 327: PLLink.Visible = false;
|