2
I have a screen whose a certain "Reference Date" field receives the next available date of a file, following the dates that are in the database.
On the field side I have a "Calendar" icon that when triggered should load the calendar.
Well, I don’t know what’s going on, it doesn’t return the next date and it doesn’t load the calendar, I’m not seeing errors in the code.
"Reference Date" > txtDataArchive
Periodicity and date check = "Verifiedavailable(ds)"
Calendar action > "dpbDataArchive"
if (ds.Tables[0].Rows[0]["DATELASTARCHIVE"] != DBNull.Value && ds.Tables[0].Rows[0]
["PERIODICIDADE"].ToString().Equals("0"))
{
this.txtDataArchive.Visible = false;
this.dpbDataArchive.Visible = false;
this.ddlDataPub.Visible = true;
VerificaDataDisponivel(ds);
}
//Método VerificaDataDisponivel(ds)
DataTable dtDataDisponivel = new DataTable("DataDisponivel");
dtDataDisponivel.Columns.AddRange(new System.Data.DataColumn[] {new DataColumn("COD_DATA"), new DataColumn("DSC_DATA")});
DataRow drData = null;
bool flgFimCalendario = false;
//Verify the possible dates
BO.Feriado feriado = new BO.Feriado();
DataSet dsQuantArquPasta = BO.Pasta.BuscarQuantidadeArquivoPasta(this.CodPasta);
DateTime dtul = DateTime.MinValue;
//DateTime dtfimperio = DateTime.MinValue;
int tipoPeriodicidade = Convert.ToInt32(ds.Tables[0].Rows[0]["TipoPeriodicidade"]);
if(ds.Tables[0].Rows[0]["DATELASTARCHIVE"] != DBNull.Value)
{
dtul = (DateTime)ds.Tables[0].Rows[0]["DATELASTARCHIVE"];
}
Maybe you should ask different questions: one to correct the error of how to open the calendar; another to fetch the next date in the file.. However wait a while because they may suggest answers.
– CesarMiguel