/// <summary> /// Consulta todos os Estados, ou um especifico /// </summary> /// <param name="Id"></param> /// <returns></returns> public List <EstadoDTO> Consultar(int Id) { using (EstadoDAL DAL = new EstadoDAL(false)) { return(DAL.Consultar(Id)); } }
public List <EstadoInfo> ListarPaginado() { EstadoDAL dal = new EstadoDAL(this.DbHnd); dal.Filters = this.Filters; return(dal.ListarPaginado()); }
public EstadoDTO CarregaEstadoDTO(int est_id) { EstadoDAL dalObj = new EstadoDAL(conexao); dalObj.CarregaEstadoDTO(est_id); return(dalObj.CarregaEstadoDTO(est_id)); }
public DataTable Pesquisar(String est_estado) { EstadoDAL dalObj = new EstadoDAL(conexao); dalObj.Pesquisar(est_estado); return(dalObj.Pesquisar(est_estado)); }
public static void EliminarEstado(Estado estado) { try { EstadoDAL.EliminarEstado(estado); } catch (Exception) { throw; } }
public static void Modificar(Estado estado) { try { EstadoDAL.Modificar(estado); } catch (Exception) { throw; } }
public static Estado BuscarEstado(int id) { try { return(EstadoDAL.BuscarEstado(id)); } catch (Exception) { throw; } }
public static List <Estado> ListadoEstados() { try { return(EstadoDAL.listadoEstados()); } catch (Exception) { throw; } }
public static void AgregarEstado(Estado estado) { try { EstadoDAL.AgregarEstado(estado); } catch (Exception) { throw; } }
public void Alterar(EstadoDTO estBllCrud) { if (estBllCrud.Est_estado.Trim().Length == 0) //verifica se foi informado { throw new Exception("O nome do estado é obrigatório"); } EstadoDAL dalObj = new EstadoDAL(conexao); dalObj.Alterar(estBllCrud); }
public Estado[] ImportaEstado() { try { return(EstadoDAL.BuscarDados()); } catch { return(null); } }
public DataTable cargarEstadoPorPais(int Pais) { try { EstadoDAL oEstado = new EstadoDAL(); return(oEstado.cargarEstadoPorPais(Pais)); } catch (Exception ex) { throw new Exception("Error" + ex.Message); } }
public void inserir() { try { objDAL = new EstadoDAL(); objDAL.inserir(this.est_sigla, this.est_nome); objDAL = null; } catch (Exception) { throw; } }
public void alterar() { try { objDAL = new EstadoDAL(); objDAL.alterar(this.est_codigo, this.est_sigla, this.est_nome); objDAL = null; } catch (Exception) { throw; } }
public void excluir() { try { objDAL = new EstadoDAL(); objDAL.excluir(this.est_codigo); objDAL = null; } catch (Exception) { throw; } }
public void localizar() { try { objDAL = new EstadoDAL(); this.est_codigo = objDAL.localizar(this.est_codigo); objDAL = null; } catch (Exception) { throw; } }
public DataTable localizarComRetorno(String descricao, String atributo) { try { DataTable tab; objDAL = new EstadoDAL(); tab = objDAL.localizar(descricao, atributo); objDAL = null; return(tab); } catch (Exception) { throw; } }
public DataTable localizarEmTudo(String descricao) { try { DataTable tab; objDAL = new EstadoDAL(); tab = objDAL.localizarEmTudo(descricao); objDAL = null; return(tab); } catch (Exception) { throw; } }
private void CarregaDDLEstado() { EstadoDAL objEstado = new EstadoDAL(); List <Estado> lstEstado = objEstado.ObterListaDeEstados(); foreach (Estado lstSigla in lstEstado) { ListItem lst = new ListItem(); lst.Value = lstSigla.IdEstado.ToString(); lst.Text = lstSigla.Sigla; ddlEstado.Items.Add(lst); } ddlEstado.DataBind(); }
public void localizarProxAnterior(String descricao, int codigo) { try { DataTable tab = null; objDAL = new EstadoDAL(); tab = objDAL.localizarProxAnterior(descricao, codigo); if (tab.Rows.Count > 0) { this.est_codigo = int.Parse(tab.Rows[0][0].ToString()); } objDAL = null; } catch (Exception) { throw; } }
public void localizar(String descricao, String atributo) { try { DataTable tab; objDAL = new EstadoDAL(); tab = objDAL.localizar(descricao, atributo); if (tab.Rows.Count > 0) { this.est_codigo = int.Parse(tab.Rows[0]["est_codigo"].ToString()); this.est_sigla = tab.Rows[0]["est_sigla"].ToString(); this.est_nome = tab.Rows[0]["est_nome"].ToString(); } objDAL = null; } catch (Exception) { throw; } }
public void localizarPrimeiroUltimo(String descricao) { try { DataTable tab = null; int codigo = 0; objDAL = new EstadoDAL(); tab = objDAL.localizarPrimeiroUltimo(descricao); if (tab.Rows.Count > 0) { int.TryParse(tab.Rows[0][0].ToString(), out codigo); } this.est_codigo = codigo; objDAL = null; } catch (Exception) { throw; } }
protected void registrarEstadoBtn_Click(object sender, EventArgs e) { if (this.Page.IsValid) { // TODO: Todos los datos para ingresar un nuevo Estado a un Contenedor. // TODO: Traer el contenedor seleccionado y luego darle el contenedor a la lista de estado. String contenedorListSelected = this.contenedoresDdl.SelectedItem.Value; Contenedor contenedorSelected = contenedores.Find(c => c.NumeroDeSerie == contenedorListSelected); int horaTxt = Convert.ToInt32(this.horaTxt.Text); int minutosTxt = Convert.ToInt32(this.minutosTxt.Text); var date = new DateTime( this.fechaLectura.SelectedDate.Year, this.fechaLectura.SelectedDate.Month, this.fechaLectura.SelectedDate.Day, horaTxt, minutosTxt, 0); DateTime fechaLectura = date; int nivelLlenado = Convert.ToInt32(this.nivelLlenadoTxt.Text); int tipoEstado = Convert.ToInt32(this.tipoDdl.SelectedItem.Value); int idEstadoU = horaTxt + minutosTxt + contenedorSelected.GetHashCode(); Estado estado = new Estado() { IdEstado = idEstadoU, FechaLectura = fechaLectura, TipoEstado = tipoEstado, NivelDeLlenado = nivelLlenado, Contenedor = contenedorSelected }; IEstado dal = new EstadoDAL(); dal.Add(estado); Contenedor contenedor = contenedores.FindLast(c => c.NumeroDeSerie == contenedorListSelected); contenedor.setEstados(estados); // Agregar ese estado a la lista de estados del contenedor seleccionado. Response.Redirect("MostrarEstados.aspx"); } }
public Int32 Inserir(EstadoInfo pInfo) { EstadoDAL dal = new EstadoDAL(this.DbHnd); return(dal.Inserir(pInfo)); }
public EstadoInfo Get(Int32 pCdEstado) { EstadoDAL dal = new EstadoDAL(this.DbHnd); return(dal.Get(pCdEstado)); }
public void Atualizar(Int32 pCdEstado, EstadoInfo pInfo) { EstadoDAL dal = new EstadoDAL(this.DbHnd); dal.Atualizar(pCdEstado, pInfo); }
public void Deletar(Int32 pCdEstado) { EstadoDAL dal = new EstadoDAL(this.DbHnd); dal.Deletar(pCdEstado); }
public DataTable cargarEstados() { EstadoDAL estados = new EstadoDAL(); return(estados.cargarEstados()); }
public Types.EstadosType select(int idPais) { EstadoDAL estado = new EstadoDAL(); return(estado.select(idPais)); }
public Types.EstadoType selectRecord(int idEstado) { EstadoDAL estado = new EstadoDAL(); return(estado.selectRecord(idEstado)); }