Very good I would like to know if someone could help me with this project that I have an error. It consists of connecting to the database (I have it with char fields), which is fine, but when I click on the button with nothing works well, the problem is when I enter some query code, there I get the error , someone could tell me what I'm failing. This is the code of the button.
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FacturacionCompras
{
public partial class Formulario_web11 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnConsultar_Click(object sender, EventArgs e)
{
if (TextCODProveedor.Text == "")
{
lblMensaje.Text = "Debe de ingresar un cod de proveedor";
TextCODProveedor.Focus();
return;
}
if (!CADFacturacion.CADProveedor.ExisteProveedor(TextCODProveedor.Text))
{
lblMensaje.Text = "Proveedor no existe";
TextCODProveedor.Focus();
return;
}
CADFacturacion.DSFacturacion.PROVEEDORDataTable miProveedor = CADFacturacion.CADProveedor.GetProveedor(TextCODProveedor.Text);
foreach (DataRow row in miProveedor.Rows)
{
TextNOMBRE.Text = row["Nombres"].ToString();
TextDIRECCION.Text = row["Direccion"].ToString();
TextPAIS.Text = row["pais"].ToString();
CalFecha.SelectedDate = Convert.ToDateTime(row["Fecha"]);
}
lblMensaje.Text = "Proveedor Consultado";
}
// este es el codigo siguiendo el CADProveedor
using CADFacturacion;
using CADFacturacion.DSFacturacionTableAdapters;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CADFacturacion
{
public class CADProveedor
{
private static PROVEEDORTableAdapter adapter = new PROVEEDORTableAdapter();
public static DSFacturacion.PROVEEDORDataTable GetProveedor(string COD_PROV)
{
return adapter.GetProveedor(COD_PROV);
}
public static bool ExisteProveedor(string COD_PROV)
{
return adapter.ExisteProveedor(COD_PROV)== 1;//en esta parte tengo mis dudas ya que es un boolean.
}
// Después de consultar me genera el error y me manda aquí
using System;
namespace CADFacturacion
{
internal class CADProveedor
{
internal static DSFacturacion.PROVEEDORDataTable GetProveedor(string text)
{
throw new NotImplementedException();
}
internal static bool ExisteProveedor(string text)
{
throw new NotImplementedException();
}
}
}