private bool ValidarBuscar() { if (CuadreVendedorBLL.Buscar(String(BuscarTextBox.Text)) == null) { base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('No Existe');</script>"); return(false); } return(true); }
protected void BuscarButton_Click(object sender, EventArgs e) { if (IdTextBox.Text == "") { Utilidades.Mensage(this.Page, "scripts", "<script>alert('Debes llenar el campo Id para realizar la busqueda!');</script>"); } else { BuscarCuadre(CuadreVendedorBLL.Buscar(Utilidades.TOINT(IdTextBox.Text))); } }
protected void BuscarButton_Click(object sender, EventArgs e) { if (IdTextBox.Text == "") { Utilidades.ShowToastr(this, "Debes llenar el campo Id", "Ojo", "Error"); } else { BuscarCuadre(CuadreVendedorBLL.Buscar(Utilidades.TOINT(IdTextBox.Text))); } }
protected void BuscarButton_Click(object sender, EventArgs e) { if (IdTextBox.Text == "") { base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debes llenar el campo Id para realizar la busqueda!');</script>"); } else { BuscarCuadre(CuadreVendedorBLL.Buscar(String(IdTextBox.Text))); } }
public void BuscarCuadre(Entidades.CuadresVendedores cv) { if (CuadreVendedorBLL.Buscar(Utilidades.TOINT(IdTextBox.Text)) == null) { Utilidades.Mensage(this.Page, "scripts", "<script>alert('No Existe');</script>"); } else { ConceptoTextBox.Text = cv.Concepto; cv.Fecha = Convert.ToDateTime(FechaTextBox.Text); MontoTextBox.Text = Convert.ToString(cv.Monto); } }
public void BuscarCuadre(Entidades.CuadresVendedores cv) { if (CuadreVendedorBLL.Buscar(Utilidades.TOINT(IdTextBox.Text)) == null) { Utilidades.ShowToastr(this, "No Existe", "Que Mal", "Error"); } else { ConceptoTextBox.Text = cv.Concepto; cv.Fecha = Convert.ToDateTime(FechaTextBox.Text); MontoTextBox.Text = Convert.ToString(cv.Monto); } }
public void BuscarCuadre(Entidades.CuadresVendedores cv) { if (CuadreVendedorBLL.Buscar(String(IdTextBox.Text)) == null) { base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('No Existe');</script>"); } else { VendedorIdTextBox.Text = Convert.ToString(cv.VendedorId); ConceptoTextBox.Text = cv.Concepto; cv.Fecha = Convert.ToDateTime(FechaTextBox.Text); MontoTextBox.Text = Convert.ToString(cv.Monto); } }
protected void GuardarButton_Click(object sender, EventArgs e) { if (ConceptoTextBox.Text == "" || MontoTextBox.Text == "") { Utilidades.Mensage(this.Page, "scripts", "<script>alert('Debes Llenar Todos los Campos');</script>"); } else { Entidades.CuadresVendedores cv = new Entidades.CuadresVendedores(); LlenarClase(cv); CuadreVendedorBLL.Insertar(cv); Utilidades.Mensage(this.Page, "scripts", "<script>alert('Proceso Completado');</script>"); Limpiar(); } }
protected void GuardarButton_Click(object sender, EventArgs e) { if (VendedorIdTextBox.Text == "" || ConceptoTextBox.Text == "" || MontoTextBox.Text == "") { Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debes Llenar Todos los Campos');</script>"); } else { Entidades.CuadresVendedores cv = new Entidades.CuadresVendedores(); LlenarClase(cv); CuadreVendedorBLL.Insertar(cv); Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Proceso Completado');</script>"); Limpiar(); } }
protected void GuardarButton_Click(object sender, EventArgs e) { if (ConceptoTextBox.Text == "" || MontoTextBox.Text == "") { Utilidades.ShowToastr(this, "Debes Llenar Todos los Campos", "ojo", "Error"); } else { Entidades.CuadresVendedores cv = new Entidades.CuadresVendedores(); LlenarClase(cv); CuadreVendedorBLL.Insertar(cv); Utilidades.ShowToastr(this, "Proceso Completado", "Exito", "success"); Limpiar(); } }
protected void EliminarButton_Click(object sender, EventArgs e) { if (IdTextBox.Text == "") { Utilidades.Mensage(this.Page, "scripts", "<script>alert('Debes Llenar el Campo Id');</script>"); } else { if (CuadreVendedorBLL.Buscar(Utilidades.TOINT(IdTextBox.Text)) == null) { Utilidades.Mensage(this.Page, "scripts", "<script>alert('No existe ');</script>"); } else { CuadreVendedorBLL.Eliminar(Utilidades.TOINT(IdTextBox.Text)); Utilidades.Mensage(this.Page, "scripts", "<script>alert('Proceso Completado');</script>"); } } }
protected void AnularButton_Click(object sender, EventArgs e) { if (IdTextBox.Text == "") { Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debes Llenar el Campo Id');</script>"); } else { if (CuadreVendedorBLL.Buscar(String(IdTextBox.Text)) == null) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('No existe ');</script>"); } else { CuadreVendedorBLL.Eliminar(String(IdTextBox.Text)); Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Proceso Completado');</script>"); } } }
protected void EliminarButton_Click(object sender, EventArgs e) { if (IdTextBox.Text == "") { Utilidades.ShowToastr(this, "Debes llenar el campo Id", "Ojo", "Error"); } else { if (CuadreVendedorBLL.Buscar(Utilidades.TOINT(IdTextBox.Text)) == null) { Utilidades.ShowToastr(this, "No Existe", "Que Mal", "Error"); } else { CuadreVendedorBLL.Eliminar(Utilidades.TOINT(IdTextBox.Text)); Utilidades.ShowToastr(this, "Proceso Completado", "Exito", "success"); Limpiar(); } } }
private void BuscarSelecCombo() { Listas = null; if (FiltrarDropDownList.SelectedIndex == 0) { Listas = BLL.CuadreVendedorBLL.GetListTodo(); } else if (FiltrarDropDownList.SelectedIndex == 1) { if (BuscarTextBox.Text == "") { base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debe de Insertar la descripcion');</script>"); } else { int Busqueda = Utilidades.TOINT(BuscarTextBox.Text); Listas = CuadreVendedorBLL.GetList(p => p.CuadreId == Busqueda); ConsultaClienteGridView.DataSource = Listas; ConsultaClienteGridView.DataBind(); } } else if (FiltrarDropDownList.SelectedIndex == 2) { if (BuscarTextBox.Text == "") { base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debe de Insertar la descripcion');</script>"); } else { int Busqueda = Utilidades.TOINT(BuscarTextBox.Text); Listas = CuadreVendedorBLL.GetList(p => p.VendedorId == Busqueda); ConsultaClienteGridView.DataSource = Listas; ConsultaClienteGridView.DataBind(); } } else if (FiltrarDropDownList.SelectedIndex == 3) { if (DesdeTextBox.Text != "" && HastaTextBox.Text != "") { DateTime desde = Convert.ToDateTime(DesdeTextBox.Text); DateTime hasta = Convert.ToDateTime(HastaTextBox.Text); if (desde <= hasta) { Listas = BLL.CuadreVendedorBLL.GetList(p => p.Fecha >= desde && p.Fecha <= hasta); } else { base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Orden Cronologico mal seleccionado, la primera fecha debe ser menor que la segunda.');</script>"); Listas = null; } } else { base.Page.ClientScript.RegisterStartupScript(this.GetType(), "scripts", "<script>alert('Debes insertar la fecha');</script>"); Listas = null; } } ConsultaClienteGridView.DataSource = Listas; ConsultaClienteGridView.DataBind(); }