public bool ChuCunGuoCheng(string name, string pass)//用存储过程实现
{
con = db.LianJie();
con.Open();
SqlCommand com = new SqlCommand();
com.Connection = con;
com.CommandType = CommandType.StoredProcedure;
com.CommandText = "proc_vaName";
SqlParameter ter_1 = com.Parameters.Add("@jieguo", SqlDbType.Bit);
ter_1.Direction = ParameterDirection.Output;
SqlParameter ter_2 = com.Parameters.Add("@name", SqlDbType.VarChar, 50);
ter_2.Direction = ParameterDirection.Input;
ter_2.Value = name;
SqlParameter ter_3 = com.Parameters.Add("@pass", SqlDbType.VarChar, 50);
ter_3.Direction = ParameterDirection.Input;
ter_3.Value = pass;
com.ExecuteNonQuery();
bool bl =Convert.ToBoolean(ter_1.Value);
return bl;
}
慢慢的看吧,应该可以看的懂吧,再不行的话加我QQ吧, 498962765