Dear Suresh ,
am Posting my code here please help to call these 2 methods using such way..
method 1:
public Resulset InsertIMEI(string imei)
{
Resulset result = new Resulset();
SqlConnection con = newSqlConnection(ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString);
SqlCommand cmd = new SqlCommand("InsertIMEI", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@IMEI", imei);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0] != null)
{
result.StatusInd = Convert.ToInt32(ds.Tables[0].Rows[0]["StatusInd"].ToString());
result.StatusMsg = ds.Tables[0].Rows[0]["StatusMsg"].ToString();
result.ID=Convert.ToInt32(ds.Tables[0].Rows[0]["Id"].ToString());
}
return result;
}
method 2:
public void IsertImeIData(int IMEI, string Data)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("InsertIMEIData", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@IMEIID", IMEI);
cmd.Parameters.AddWithValue("@Data", Data);
cmd.executenonquery();
con.Close();
}
so i want to call these two methods .please help me