hi
below error occurs:
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: CS0120: An object reference is required for the non-static field, method, or property '_mobile.GetEstatInfoM(int)' Source Error:
|
Line 1682: System.Threading.Thread.Sleep(2000);
Line 1683:
Line 1684: return GetEstatInfoM(1).GetXml();
Line 1685: }
Line 1686:
|
below are codes:
private void GetEstatInfoM(int pageIndex)
{
using (SqlConnection conn = General.GetConnection())
{
using (SqlCommand cmd = General.GetCommand("Estate_Information", conn))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@PageIndex", pageIndex);
cmd.Parameters.AddWithValue("@PageSize", PageSize);
cmd.Parameters.AddWithValue("@Type", Ddltype.SelectedItem.Text);
cmd.Parameters.AddWithValue("@Transfer", Ddltran.SelectedItem.Text.Trim());
cmd.Parameters.AddWithValue("@metraj", Ddlmetraj.SelectedItem.Text.Trim());
cmd.Parameters.AddWithValue("@rahn2", Lblrahn1M.Text);
cmd.Parameters.AddWithValue("@rahn1", Lblrahn1M.Text);
cmd.Parameters.AddWithValue("@ejare2", Lblrahn1M.Text);
cmd.Parameters.AddWithValue("@ejare1", Lblrahn1M.Text);
cmd.Parameters.AddWithValue("@forosh2", Lblforosh2M.Text);
cmd.Parameters.AddWithValue("@forosh1", Lblforosh1M.Text);
cmd.Parameters.Add("@RecordCount", SqlDbType.Int, 4);
cmd.Parameters["@RecordCount"].Direction = ParameterDirection.Output;
conn.Open();
SqlDataReader idr = cmd.ExecuteReader();
if (idr.HasRows)
{
GrdamlakMob.DataSource = idr;
GrdamlakMob.DataBind();
}
else
{
GrdamlakMob.DataSource = idr;
GrdamlakMob.DataBind();
}
idr.Close();
this.PopulatePagerPM(Convert.ToInt32(cmd.Parameters["@RecordCount"].Value), pageIndex);
}
}
}
[WebMethod]
public static string GetCustomers(int pageIndex)
{
//Added to similate delay so that we see the loader working
//Must be removed when moving to production
System.Threading.Thread.Sleep(2000);
return GetEstatInfoM(1).GetXml();
}