1
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; namespace Login { public class Class2:DataHelper { public bool InsertaLogin(string sp_Nombre, string sp_Apellidos, string sp_Correo_Elec, string sp_Contraseña) { string strSQL = "exec SP_Login1 " + sp_Nombre + "," + sp_Apellidos + "," + sp_Correo_Elec+ "," + sp_Contraseña+ ",1"; int intResultado = base.execQuery(strSQL); if (intResultado > 0) return (true); else return (false); } public bool InsertaUsuario(string sp_Correo_Elec, string sp_Contraseña) { string strSQL = "exec SP_Login2 " + sp_Correo_Elec + "," + sp_Contraseña + ",1"; int intResultado = base.execQuery(strSQL); if (intResultado > 0) return (true); else return (false); } } }

datos DBA store

Embed Size (px)

DESCRIPTION

como conectarse a la base con store procedure.de modo insertar y actualizar

Citation preview

Page 1: datos DBA store

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; namespace Login { public class Class2:DataHelper { public bool InsertaLogin(string sp_Nombre, string sp_Apellidos, string sp_Correo_Elec, string sp_Contraseña) { string strSQL = "exec SP_Login1 " + sp_Nombre + "," + sp_Apellidos + "," + sp_Correo_Elec+ "," + sp_Contraseña+ ",1"; int intResultado = base.execQuery(strSQL); if (intResultado > 0) return (true); else return (false); } public bool InsertaUsuario(string sp_Correo_Elec, string sp_Contraseña) { string strSQL = "exec SP_Login2 " + sp_Correo_Elec + "," + sp_Contraseña + ",1"; int intResultado = base.execQuery(strSQL); if (intResultado > 0) return (true); else return (false); } } }