/// <summary> /// 实现关联表的插入 /// </summary> /// <param name="tabInsert">插入实体</param> /// <returns></returns> public int InsertManyTable(TableInsertion tabInsert, out int count) { StringBuilder strSql = new StringBuilder(); strSql.Append("sp_Insert"); MySqlParameter[] values = { new MySqlParameter("@inRegionName", MySqlDbType.VarChar), new MySqlParameter("@inShelvesId", MySqlDbType.Int32), new MySqlParameter("@inShelvesName", MySqlDbType.VarChar), new MySqlParameter("@count", MySqlDbType.Int32) }; values[0].Value = tabInsert.InRegionName; values[1].Value = tabInsert.InShelvesId; values[2].Value = tabInsert.InShelvesName; values[3].Direction = ParameterDirection.Output; ArrayList array = db.ExecuteSp(strSql.ToString(), values); count = Convert.ToInt32(values[3].Value); //int outNum = int.Parse(array.ToString()); return(count); }