public bool InsertACustomer(string custName, string address1, string tp, string fax)
{
SqlParameter [] prams = new SqlParameter[5];
prams[0] = new SqlParameter("@name", custName);
prams[1] = new SqlParameter("@address1", address1);
prams[2] = new SqlParameter("@tp", tp);
prams[3] = new SqlParameter("@fax", fax);
prams[4] = new SqlParameter("@id",SqlDbType.Int);
prams[4].Direction = ParameterDirection.Output;
bool isTrue = base.CallSP("AddCustomer", prams);
if (isTrue)
{
string id = prams[4].Value.ToString();
return true;
}
else
{
return false;
}
}