Esta é minha classe:
public class Lotes
{
private int cod_lote;
private string med_lote;
private int estoque_lote;
private double preco_lote;
private DateTime val_lote;
private string mensagem = "";
public Lotes(int cod_lote, string med_lote, int estoque_lote, double preco_lote, DateTime val_lote)
{
this.cod_lote = cod_lote;
this.med_lote = med_lote;
this.estoque_lote = estoque_lote;
this.preco_lote = preco_lote;
this.val_lote = val_lote;
}
public int GetCod_lote()
{
return cod_lote;
}
public string GetMed_lote()
{
return med_lote;
}
public int GetEstoque()
{
return estoque_lote;
}
public double GetPreco_lote()
{
return preco_lote;
}
public DateTime GetVal_lote()
{
return val_lote;
}
public string GetMensagem()
{
return mensagem;
}
Este é meu Page_load
public Lotes lot;
protected void Page_Load(object sender, EventArgs e)
{
int cod_lote = 0;
string med_lote = "";
int estoque_lote = 0;
double preco_lote = 0;
DateTime val_lote = DateTime.Now.Date;
int.TryParse(Request.Form["cod_lotes"], out cod_lote);
med_lote = Request.Form["med_lote"] ?? "";
int.TryParse(Request.Form["est_lotes"], out estoque_lote);
double.TryParse(Request.Form["preco_lotes"], out preco_lote);
DateTime.TryParse(Request.Form["val_lote"], out val_lote);
lot = new Lotes(cod_lote, med_lote, estoque_lote, preco_lote, val_lote);//Erro 01
if (Request.Form["incluir"] != null)
{
if(lot.ValidaLotes())//Erro 02
{
lot.InserirLotes();//Erro 03
}
}
Aparece os seguintes erros:
Erro 01: Error3'WebPharma.Lotes' does not contain a constructor that takes 5 arguments C:\Users\Edinho\Documents\FIPP\PPI\PID\WebPharma\WebPharma\lotes.aspx.cs 3419WebPharma
Erro 02: Error5'WebPharma.Lotes' does not contain a definition for 'InserirLotes' and no extension method 'InserirLotes' accepting a first argument of type 'WebPharma.Lotes' could be found (are you missing a using directive or an assembly reference?)C:\Users\Edinho\Documents\FIPP\PPI\PID\WebPharma\WebPharma\lotes.aspx.cs4025 WebPharma
Erro 03: Error4'WebPharma.Lotes' does not contain a definition for 'ValidaLotes' and no extension method 'ValidaLotes' accepting a first argument of type 'WebPharma.Lotes' could be found (are you missing a using directive or an assembly reference?)C:\Users\Edinho\Documents\FIPP\PPI\PID\WebPharma\WebPharma\lotes.aspx.cs3824 WebPharma
Onde estou errando???
Edinho