void btnNuevo_Click(object sender, EventArgs e) { //Estado = NUEVO; Estado = Helper.EstadoSystema.Creando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); } BotonNuevo(); DGV_DetailCotizaciones.DataSource = null; DGV_DetailCotizaciones.ReadOnly = false; if (bllNumeracion.ObtenerTipo("Cotizaciones") == "Automatico") { txtNoCotizacion.ReadOnly = true; txtCliente.Focus(); } else { txtNoCotizacion.ReadOnly = false; txtNoCotizacion.Focus(); } }
void btnNuevo_Click(object sender, EventArgs e) { //Estado = NUEVO; Estado = Helper.EstadoSystema.Creando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); } BotonNuevo(); if (DGV_DetailCompra.Rows.Count > 0) { AC.VaciarDGV(this); } if (bllNumeracion.ObtenerTipo("Compras") == "Automatico") { txtNoCompra.ReadOnly = true; txtSuplidor.Focus(); } else { txtNoCompra.ReadOnly = false; txtNoCompra.Focus(); } txtSubTotal.Enabled = false; txtTotalImpuesto.Enabled = false; txtTotalDescuento.Enabled = false; txtTotalCompra.Enabled = false; }
void btnNuevo_Click(object sender, EventArgs e) { //Estado = NUEVO; Estado = Helper.EstadoSystema.Creando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); } BotonNuevo(); // DGV_DetailFactura.Rows.Clear(); DGV_DetailFactura.DataSource = null; lblCantidaArticulos.Text = "Cantidad : 0"; if (bllNumeracion.ObtenerTipo("Facturas") == "Automatico") { txtNoFactura.ReadOnly = true; txtCliente.Focus(); } else { txtNoFactura.ReadOnly = false; txtNoFactura.Focus(); } }
void btnEditar_Click(object sender, EventArgs e) { if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Usuarios.Rows.Count != 0) { txtNombreUsuario.Text = DGV_Usuarios[0, DGV_Usuarios.CurrentCell.RowIndex].Value.ToString(); txtNombre.Text = DGV_Usuarios[1, DGV_Usuarios.CurrentCell.RowIndex].Value.ToString(); txtApellido.Text = DGV_Usuarios[2, DGV_Usuarios.CurrentCell.RowIndex].Value.ToString(); txtContrasena.Text = DGV_Usuarios[3, DGV_Usuarios.CurrentCell.RowIndex].Value.ToString(); txtContrasena2.Text = DGV_Usuarios[3, DGV_Usuarios.CurrentCell.RowIndex].Value.ToString(); chkResetearPass.Checked = Convert.ToBoolean(DGV_Usuarios[4, DGV_Usuarios.CurrentCell.RowIndex].Value.ToString()); } } if (!string.IsNullOrEmpty(txtNombreUsuario.Text)) { BotonEditar(); Estado = Helper.EstadoSystema.Editando; txtNombreUsuario.Enabled = false; txtNombre.Focus(); } }
void btnEditar_Click(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Editando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Marca.Rows.Count != 0) { txtCodigo.Text = DGV_Marca[0, DGV_Marca.CurrentCell.RowIndex].Value.ToString(); txtNombre.Text = DGV_Marca[1, DGV_Marca.CurrentCell.RowIndex].Value.ToString(); txtNota.Text = DGV_Marca[2, DGV_Marca.CurrentCell.RowIndex].Value.ToString(); } } if (!string.IsNullOrEmpty(txtCodigo.Text)) { BotonEditar(); txtCodigo.Enabled = false; txtNombre.Focus(); } }
void btnEditar_Click(object sender, EventArgs e) { if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Impuestos.Rows.Count != 0) { txtCodigo.Text = DGV_Impuestos[0, DGV_Impuestos.CurrentCell.RowIndex].Value.ToString(); txtNombre.Text = DGV_Impuestos[1, DGV_Impuestos.CurrentCell.RowIndex].Value.ToString(); nudPorcentaje.Value = Convert.ToDecimal(DGV_Impuestos[2, DGV_Impuestos.CurrentCell.RowIndex].Value.ToString()); txtNota.Text = DGV_Impuestos[3, DGV_Impuestos.CurrentCell.RowIndex].Value.ToString(); } } if (!string.IsNullOrEmpty(txtCodigo.Text)) { BotonEditar(); Estado = Helper.EstadoSystema.Editando; txtNombre.Focus(); txtCodigo.Enabled = false; } }
void btnNuevo_Click(object sender, EventArgs e) { //Estado = NUEVO; Estado = Helper.EstadoSystema.Creando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); } BotonNuevo(); if (bllNumeracion.ObtenerTipo("Marcas") == "Automatico") { txtCodigo.ReadOnly = true; txtNombre.Focus(); } else { txtCodigo.ReadOnly = false; txtCodigo.Focus(); } }
void btnEditar_Click(object sender, EventArgs e) { if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Gastos.Rows.Count != 0) { txtNumero.Text = DGV_Gastos[0, DGV_Gastos.CurrentCell.RowIndex].Value.ToString(); dtpFecha.Text = DGV_Gastos[1, DGV_Gastos.CurrentCell.RowIndex].Value.ToString(); numMonto.Value = Convert.ToDecimal(DGV_Gastos[2, DGV_Gastos.CurrentCell.RowIndex].Value.ToString()); txtTipo.Text = DGV_Gastos[3, DGV_Gastos.CurrentCell.RowIndex].Value.ToString(); txtDescripcion.Text = DGV_Gastos[4, DGV_Gastos.CurrentCell.RowIndex].Value.ToString(); } } if (!string.IsNullOrEmpty(txtNumero.Text)) { BotonEditar(); Estado = Helper.EstadoSystema.Editando; dtpFecha.Focus(); txtNumero.ReadOnly = true; } }
void btnNuevo_Click(object sender, EventArgs e) { //Estado = NUEVO; Estado = Helper.EstadoSystema.Creando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); } BotonNuevo(); //Habilitar eshabilitar botones de Busqueda lblBucarCategoria.Enabled = true; lblBuscarSubCategoria.Enabled = true; if (bllNumeracion.ObtenerTipo("Clientes") == "Automatico") { txtCodigo.ReadOnly = true; txtRazonSocial.Focus(); } else { txtCodigo.ReadOnly = false; txtCodigo.Focus(); } }
void btnEditar_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtNumero.Text)) { Estado = Helper.EstadoSystema.Editando; txtNumero.Focus(); } }
private void Frm_Marcas_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlMarcas.Codigo = string.Empty; enlMarcas.Nombre = string.Empty; DGV_Marca.DataSource = bllMarcas.Search(enlMarcas); }
private void Frm_SubCategoriaClientes_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlSubCategoriaCliente.Codigo = string.Empty; enlSubCategoriaCliente.Nombre = string.Empty; DGV_SubCategoriaClientes.DataSource = bllSubCategoriaCliente.Search(enlSubCategoriaCliente); }
private void btnModificar_Click(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Editando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Facturas_Pos_List.Rows.Count != 0) { txtNoFactura.Text = DGV_Facturas_Pos_List[0, DGV_Facturas_Pos_List.CurrentCell.RowIndex].Value.ToString(); txtCliente.Text = DGV_Facturas_Pos_List[1, DGV_Facturas_Pos_List.CurrentCell.RowIndex].Value.ToString(); dtpFecha.Text = DGV_Facturas_Pos_List[2, DGV_Facturas_Pos_List.CurrentCell.RowIndex].Value.ToString(); lblTotal.Text = DGV_Facturas_Pos_List[12, DGV_Facturas_Pos_List.CurrentCell.RowIndex].Value.ToString(); txtEstatus.Text = DGV_Facturas_Pos_List[15, DGV_Facturas_Pos_List.CurrentCell.RowIndex].Value.ToString(); enlFacturaDetail.NoFactura = txtNoFactura.Text; DGV_Factura_Pos.DataSource = bllFacturaDetail.Search(enlFacturaDetail); } } if (!string.IsNullOrEmpty(txtNoFactura.Text)) { //BotonEditar(); //txtCodigo.Enabled = false; //txtNombre.Focus(); this.btnNuevo.Enabled = false; this.btnModificar.Enabled = false; this.btnEliminar.Enabled = false; this.btnGuardar.Enabled = true; this.btnGuardarCerrar.Enabled = true; this.btnCancelar.Enabled = true; this.btnVista.Enabled = false; btnImprimir.Enabled = false; AC.HabilitarText(this); txtNoFactura.Enabled = false; for (int a = 0; a <= DGV_Factura_Pos.RowCount - 1; a++) { enlArticulos.Codigo = DGV_Factura_Pos[0, a].Value.ToString(); enlArticulos.Existencia = Convert.ToDecimal(DGV_Factura_Pos[3, a].Value); bllArticulos.UpdateExitencia(enlArticulos); } lblMensaje.Text = "Modificando Factura"; } ///// enlFacturaDetail.NoFactura = txtNoFactura.Text; list = bllFacturaDetail.Search(enlFacturaDetail); }
private void Frm_Usuarios_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlUsuarios.NombreUsuario = string.Empty; enlUsuarios.Nombre = string.Empty; enlUsuarios.Apellido = string.Empty; DGV_Usuarios.DataSource = bllUsuarios.Search(enlUsuarios); }
private void Frm_Recibos_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlReciboMaster.Numero = string.Empty; enlReciboMaster.Cliente = string.Empty; enlReciboMaster.MododePago = string.Empty; DGV_Recibos.DataSource = bllRecibosMaster.Search(enlReciboMaster); }
private void Frm_Compras_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlCompraMaster.Numero = txtNoCompra.Text; enlCompraMaster.Suplidor = string.Empty; enlCompraMaster.Almacen = string.Empty; DGV_Compras_List.DataSource = bllCompraMaster.Search(enlCompraMaster); }
private void Frm_Almacen_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlAlmacen.Codigo = string.Empty; enlAlmacen.Nombre = string.Empty; enlAlmacen.Encargado = string.Empty; DGV_Almacenes.DataSource = bllAlmacen.Search(enlAlmacen); }
private void Frm_Gastos_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlGastos.Numero = string.Empty; enlGastos.Tipo = string.Empty; enlGastos.FechaDesde = DateTime.Parse("01/01/1900"); enlGastos.FechaHasta = DateTime.Parse("01/01/2100"); DGV_Gastos.DataSource = bllGastos.Search(enlGastos); }
private void Frm_Cotizaciones_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlCotizacionMaster.Numero = string.Empty; enlCotizacionMaster.Cliente = string.Empty; enlCotizacionMaster.Terminos = string.Empty; enlCotizacionMaster.Vendedor = string.Empty; DGV_Cotizacion_List.DataSource = bllCotizacionMaster.Search(enlCotizacionMaster); }
private void Frm_Suplidores_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlSuplidores.Codigo = string.Empty; enlSuplidores.RazonSocial = string.Empty; enlSuplidores.RNC = string.Empty; enlSuplidores.Categoria = string.Empty; enlSuplidores.SubCategoria = string.Empty; enlSuplidores.Nombre = string.Empty; enlSuplidores.Telefono = string.Empty; enlSuplidores.Email = string.Empty; DGV_Suplidores.DataSource = bllSuplidores.Search(enlSuplidores); }
private void Frm_Empleados_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlEmpleados.Codigo = string.Empty; enlEmpleados.Nombre = string.Empty; enlEmpleados.Apellido = string.Empty; enlEmpleados.Cedula = string.Empty; enlEmpleados.Telefono = string.Empty; enlEmpleados.Direccion = string.Empty; enlEmpleados.Email = string.Empty; enlEmpleados.Estatus = string.Empty; DGV_Empleados.DataSource = bllEmpleados.Search(enlEmpleados); }
void btnNuevo_Click(object sender, EventArgs e) { //Estado = NUEVO; Estado = Helper.EstadoSystema.Creando; if (bllNumeracion.ObtenerTipo("Tranferencia de Almacenes") == "Automatico") { txtNumero.Enabled = false; txtNumero.Focus(); } else { txtNumero.Enabled = true; txtNumero.Focus(); } }
void btnEditar_Click(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Editando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Facturas.Rows.Count != 0) { txtNoFactura.Text = DGV_Facturas[0, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtCliente.Text = DGV_Facturas[1, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); dtpFecha.Text = DGV_Facturas[2, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtAlmacen.Text = DGV_Facturas[3, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtTerminos.Text = DGV_Facturas[4, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); cmbTipo.Text = DGV_Facturas[5, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtDescuento.Text = DGV_Facturas[6, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtVendedor.Text = DGV_Facturas[7, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtCaja.Text = DGV_Facturas[8, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtSubTotal.Text = DGV_Facturas[9, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtTotalImpuesto.Text = DGV_Facturas[10, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtTotalDescuento.Text = DGV_Facturas[11, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); txtTotalFactura.Text = DGV_Facturas[12, DGV_Facturas.CurrentCell.RowIndex].Value.ToString(); enlFacturaDetail.NoFactura = txtNoFactura.Text; list = bllFacturaDetail.Search(enlFacturaDetail); DGV_DetailFactura.DataSource = list; // bllFacturaDetail.Search(enlFacturaDetail); } } if (!string.IsNullOrEmpty(txtNoFactura.Text)) { BotonEditar(); txtNoFactura.Enabled = false; txtCliente.Focus(); for (int a = 0; a <= DGV_DetailFactura.RowCount - 1; a++) { enlArticulos.Codigo = DGV_DetailFactura[0, a].Value.ToString(); enlArticulos.Existencia = Convert.ToDecimal(DGV_DetailFactura[3, a].Value); bllArticulos.UpdateExitencia(enlArticulos); } } }
void btnEditar_Click(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Editando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Cotizacion_List.Rows.Count != 0) { //txtNoCotizacion.Text = DGV_Cotizacion_List[0, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //txtCliente.Text = DGV_Cotizacion_List[1, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //dtpFecha.Text = DGV_Cotizacion_List[2, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //txtTerminos.Text = DGV_Cotizacion_List[3, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //nudDescuento.Value = Convert.ToDecimal(DGV_Cotizacion_List[4, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString()); //txtVendedor.Text = DGV_Cotizacion_List[5, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //txtSubTotal.Text = DGV_Cotizacion_List[6, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //txtTotalDescuento.Text = "Trabajando"; //txtTotalImpuesto.Text = DGV_Cotizacion_List[7, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //txtTotalCotizacion.Text = DGV_Cotizacion_List[8, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); //enlCotizacionDetail.NoCotizacion = txtNoCotizacion.Text; //DGV_DetailCotizaciones.DataSource = bllCotizacionDetail.Search(enlCotizacionDetail); txtNoCotizacion.Text = DGV_Cotizacion_List[0, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); txtCliente.Text = DGV_Cotizacion_List[1, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); dtpFecha.Text = DGV_Cotizacion_List[2, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); txtTerminos.Text = DGV_Cotizacion_List[3, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); nudDescuento.Value = Convert.ToDecimal(DGV_Cotizacion_List[4, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString()); txtVendedor.Text = DGV_Cotizacion_List[5, DGV_Cotizacion_List.CurrentCell.RowIndex].Value.ToString(); enlCotizacionDetail.NoCotizacion = txtNoCotizacion.Text; DGV_DetailCotizaciones.DataSource = bllCotizacionDetail.Search(enlCotizacionDetail); } } if (!string.IsNullOrEmpty(txtNoCotizacion.Text)) { BotonEditar(); txtNoCotizacion.Enabled = false; txtCliente.Focus(); } }
private void Frm_Articulos_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlArticulos.Codigo = string.Empty; enlArticulos.Nombre = string.Empty; enlArticulos.Descripcion = string.Empty; enlArticulos.Impuesto = string.Empty; enlArticulos.Marca = string.Empty; enlArticulos.Categoria = string.Empty; enlArticulos.SubCategoria = string.Empty; DGV_Articulos.DataSource = bllArticulos.Search(enlArticulos); }
void btnEditar_Click(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Editando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Clientes.Rows.Count != 0) { txtCodigo.Text = DGV_Clientes[0, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtRazonSocial.Text = DGV_Clientes[1, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtRNC.Text = DGV_Clientes[2, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); cmbNCF.Text = DGV_Clientes[3, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); nudLimiteCredito.Value = Convert.ToDecimal(DGV_Clientes[4, DGV_Clientes.CurrentCell.RowIndex].Value.ToString()); txtCategoria.Text = DGV_Clientes[5, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtSubCategoria.Text = DGV_Clientes[6, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtDireccion.Text = DGV_Clientes[7, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtNombre.Text = DGV_Clientes[8, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtApellido.Text = DGV_Clientes[9, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtCedula.Text = DGV_Clientes[10, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtCelular.Text = DGV_Clientes[11, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtFax.Text = DGV_Clientes[12, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtTelefono.Text = DGV_Clientes[13, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); dtpFechaNacimiento.Text = DGV_Clientes[14, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); txtEmail.Text = DGV_Clientes[15, DGV_Clientes.CurrentCell.RowIndex].Value.ToString(); } } if (!string.IsNullOrEmpty(txtCodigo.Text)) { BotonEditar(); txtCodigo.Enabled = false; txtRazonSocial.Focus(); //Habilitar eshabilitar botones de Busqueda lblBucarCategoria.Enabled = true; lblBuscarSubCategoria.Enabled = true; } }
private void Frm_Clientes_Load(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Consultando; tabControl1.TabPages.Remove(tbpMaster); enlClientes.Codigo = string.Empty; enlClientes.RazonSocial = string.Empty; enlClientes.RNC = string.Empty; enlClientes.Categoria = string.Empty; enlClientes.SubCategoria = string.Empty; enlClientes.Nombre = string.Empty; enlClientes.Telefono = string.Empty; enlClientes.Email = string.Empty; DGV_Clientes.DataSource = bllClientes.Search(enlClientes); //Deshabilitar botones de Busqueda lblBucarCategoria.Enabled = false; lblBuscarSubCategoria.Enabled = false; }
void btnEditar_Click(object sender, EventArgs e) { if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); if (DGV_Compras_List.Rows.Count != 0) { txtNoCompra.Text = DGV_Compras_List[0, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); txtSuplidor.Text = DGV_Compras_List[1, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); dtpFecha.Text = DGV_Compras_List[2, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); txtAlmacen.Text = DGV_Compras_List[3, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); nudDescuento.Value = Convert.ToDecimal(DGV_Compras_List[4, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString()); txtSubTotal.Text = DGV_Compras_List[5, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); txtTotalImpuesto.Text = DGV_Compras_List[6, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); txtTotalDescuento.Text = DGV_Compras_List[7, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); txtTotalCompra.Text = DGV_Compras_List[8, DGV_Compras_List.CurrentCell.RowIndex].Value.ToString(); enlCompraDetail.NoCompra = txtNoCompra.Text; list = bllCompraDetail.Search(enlCompraDetail); DGV_DetailCompra.DataSource = list; } } if (!string.IsNullOrEmpty(txtNoCompra.Text)) { BotonEditar(); Estado = Helper.EstadoSystema.Editando; txtNombre.Focus(); txtNoCompra.Enabled = false; } txtSubTotal.Enabled = false; txtTotalImpuesto.Enabled = false; txtTotalDescuento.Enabled = false; txtTotalCompra.Enabled = false; }
void btnCancelar_Click(object sender, EventArgs e) { if (Estado == Helper.EstadoSystema.Creando) { AC.DeshabilitarText(this); AC.VaciarText(this); } if (Estado == Helper.EstadoSystema.Editando) { //enlCategoriaClientes.Codigo = txtCodigo.Text; //enlCategoriaClientes.Nombre = string.Empty; //var list = bllCategoriaClientes.Search(enlCategoriaClientes); //txtNombre.Text = list[0].Nombre; //txtNota.Text = list[0].Nota; enlFacturaMaster.Numero = txtNoFactura.Text; enlFacturaMaster.Cliente = string.Empty; enlFacturaMaster.Almacen = string.Empty; enlFacturaMaster.Terminos = string.Empty; enlFacturaMaster.Tipo = string.Empty; enlFacturaMaster.Vendedor = string.Empty; enlFacturaMaster.BalancePendiente = -1; var list = bllFacturaMaster.Search(enlFacturaMaster); enlFacturaDetail.NoFactura = txtNoFactura.Text; DGV_DetailFactura.DataSource = bllFacturaDetail.Search(enlFacturaDetail); for (int a = 0; a <= DGV_DetailFactura.RowCount - 1; a++) { enlArticulos.Codigo = DGV_DetailFactura[0, a].Value.ToString(); enlArticulos.Existencia = -Convert.ToDecimal(DGV_DetailFactura[3, a].Value); bllArticulos.UpdateExitencia(enlArticulos); } } BotonCancelar(); Estado = Helper.EstadoSystema.Consultando; }
private void btnNuevo_Click(object sender, EventArgs e) { Estado = Helper.EstadoSystema.Creando; if (tabControl1.SelectedTab == tbpDetail) { tabControl1.TabPages.Remove(tbpDetail); tabControl1.TabPages.Add(tbpMaster); tabControl1.SelectTab(tbpMaster); } this.btnNuevo.Enabled = false; this.btnModificar.Enabled = false; this.btnEliminar.Enabled = false; this.btnImprimir.Enabled = false; // this.btnVista.Enabled = false; this.btnGuardar.Enabled = true; this.btnGuardarCerrar.Enabled = true; this.btnCancelar.Enabled = true; this.btnVista.Enabled = false; AC.VaciarText(this); AC.HabilitarText(this); DGV_Factura_Pos.DataSource = null; if (bllNumeracion.ObtenerTipo("Facturas") == "Automatico") { txtNoFactura.ReadOnly = true; txtArticulo.Focus(); } else { txtNoFactura.ReadOnly = false; txtNoFactura.Focus(); } lblTotal.Text = "0.00"; lblMensaje.Text = "Çreando Factura"; }