public DsFeriado getFeriados() { try { DsFeriado ds = new DsFeriado(); SqlParameter pFechaInicio = new SqlParameter("@FechaInicio", fechaInicio); SqlParameter pFechaFin = new SqlParameter("@FechaFin", fechaFin); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "FeriadoSEL", pFechaInicio, pFechaFin); return(ds); } catch (Exception ex) { throw ex; } }
private bool BindGrid() { SisPackController.AdministrarGrillas.Configurar(dtgFeriados, "FeriadoID", this.CantidadOpciones); IFeriado feriado = FeriadoFactory.GetFeriado(); feriado.fechaInicio = DateTime.Parse(txtFecha.Text); feriado.fechaFin = DateTime.Parse(txtFechaHasta.Text); DsFeriado ds = feriado.getFeriados(); dtgFeriados.DataSource = ds; dtgFeriados.DataMember = "Datos"; dtgFeriados.DataBind(); return(true); }
public void Consultar() { DsFeriado ds = new DsFeriado(); SqlParameter pFeriadoIDID = new SqlParameter("@FeriadoID", Utiles.BaseDatos.IntToSql(this.feriadoID)); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "FeriadoONE", pFeriadoIDID); if (ds.Datos.Rows.Count > 0) { DsFeriado.DatosRow dr = (DsFeriado.DatosRow)ds.Datos.Rows[0]; this.Descripcion = dr.Descripcion; if (!dr.IsAgenciaIDNull()) { this.AgenciaID = int.Parse(dr.AgenciaID); } else if (!dr.IsPaisIDNull()) { this.PaisID = int.Parse(dr.PaisID); } else if (!dr.IsLocalidadIDNull()) { this.LocalidadID = int.Parse(dr.LocalidadID); } else { this.ProvinciaID = int.Parse(dr.ProvinciaID); } this.AplicaDespacho = bool.Parse(dr.AplicaDespacho); this.AplicaEntrega = bool.Parse(dr.AplicaEntrega); this.AplicaTransito = bool.Parse(dr.AplicaTransito); this.MotivoID = int.Parse(dr.MotivoFeriadoID); this.fecha = dr.Fecha; this.feriadoID = int.Parse(dr.FeriadoID); } }