<<How to Create Insert Function >>
=====================================================|
Write this function In perticuller class
public int Insert_State()
{
obj_Con.obj_con.Open();
cmd = new SqlCommand("SP_State", obj_Con.obj_con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@StateID", StateID);
cmd.Parameters.AddWithValue("@StateName", StateName);
cmd.Parameters.AddWithValue("@Country", CountryID);
cmd.Parameters.AddWithValue("@Status", "Insert");
cmd.ExecuteNonQuery();
obj_Con.obj_con.Close();
return i;
}
=======================================================
=====================================================|
Write this function In perticuller class
public int Insert_State()
{
obj_Con.obj_con.Open();
cmd = new SqlCommand("SP_State", obj_Con.obj_con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@StateID", StateID);
cmd.Parameters.AddWithValue("@StateName", StateName);
cmd.Parameters.AddWithValue("@Country", CountryID);
cmd.Parameters.AddWithValue("@Status", "Insert");
cmd.ExecuteNonQuery();
obj_Con.obj_con.Close();
return i;
}
=======================================================
No comments:
Post a Comment