private void BtnNuevo_Click(object sender, EventArgs e) { TxtEditar.Text = "Nuevo"; Limpiar(); TxtCod_articulo.Focus(); Botones(); }
public void Listar() { try { Ds = EArticulo.Listar(); TxtCod_articulo.Text = Ds.Tables[0].Rows[0]["cod_articulo"].ToString(); TxtCod_articulov.Text = Ds.Tables[0].Rows[0]["cod_articulo"].ToString(); TxtDesc_articulo.Text = Ds.Tables[0].Rows[0]["desc_articulo"].ToString(); TxtTipo.Text = Ds.Tables[0].Rows[0]["tipo"].ToString(); TxtOrigen.Text = Ds.Tables[0].Rows[0]["origen"].ToString(); TxtItem.Text = Ds.Tables[0].Rows[0]["item"].ToString(); TxtReferencia.Text = Ds.Tables[0].Rows[0]["referencia"].ToString(); TxtModelo.Text = Ds.Tables[0].Rows[0]["modelo"].ToString(); TxtGarantia.Text = Ds.Tables[0].Rows[0]["garantia"].ToString(); TxtPunto_min.Text = Ds.Tables[0].Rows[0]["punto_min"].ToString(); TxtPunto_max.Text = Ds.Tables[0].Rows[0]["punto_max"].ToString(); TxtPunto_ped.Text = Ds.Tables[0].Rows[0]["punto_ped"].ToString(); TxtPeso.Text = Ds.Tables[0].Rows[0]["peso"].ToString(); TxtVolumen.Text = Ds.Tables[0].Rows[0]["volumen"].ToString(); TxtAlto.Text = Ds.Tables[0].Rows[0]["alto"].ToString(); TxtAncho.Text = Ds.Tables[0].Rows[0]["ancho"].ToString(); TxtPorcentaje.Text = Ds.Tables[0].Rows[0]["porcentaje"].ToString(); TxtPuntos.Text = Ds.Tables[0].Rows[0]["puntos"].ToString(); TxtFecha_reg.Text = Ds.Tables[0].Rows[0]["fecha_reg"].ToString(); TxtActivo.Text = Ds.Tables[0].Rows[0]["activo"].ToString(); TxtEsserial.Text = Ds.Tables[0].Rows[0]["esserial"].ToString(); TxtEslote.Text = Ds.Tables[0].Rows[0]["eslote"].ToString(); TxtCampo1.Text = Ds.Tables[0].Rows[0]["campo1"].ToString(); TxtCampo2.Text = Ds.Tables[0].Rows[0]["campo2"].ToString(); TxtCampo3.Text = Ds.Tables[0].Rows[0]["campo3"].ToString(); TxtCampo4.Text = Ds.Tables[0].Rows[0]["campo4"].ToString(); TxtCampo5.Text = Ds.Tables[0].Rows[0]["campo5"].ToString(); TxtCampo6.Text = Ds.Tables[0].Rows[0]["campo6"].ToString(); TxtCod_categoria.Text = Ds.Tables[0].Rows[0]["cod_categoria"].ToString(); TxtDesc_categoria.Text = Ds.Tables[0].Rows[0]["desc_categoria"].ToString(); TxtCod_linea.Text = Ds.Tables[0].Rows[0]["cod_linea"].ToString(); TxtDesc_linea.Text = Ds.Tables[0].Rows[0]["desc_linea"].ToString(); TxtCod_sublinea.Text = Ds.Tables[0].Rows[0]["cod_sublinea"].ToString(); TxtDesc_sublinea.Text = Ds.Tables[0].Rows[0]["desc_sublinea"].ToString(); TxtCod_color.Text = Ds.Tables[0].Rows[0]["cod_color"].ToString(); TxtDesc_color.Text = Ds.Tables[0].Rows[0]["desc_color"].ToString(); TxtCod_ubicacion.Text = Ds.Tables[0].Rows[0]["cod_ubicacion"].ToString(); TxtDesc_ubicacion.Text = Ds.Tables[0].Rows[0]["desc_ubicacion"].ToString(); TxtCod_impuesto.Text = Ds.Tables[0].Rows[0]["cod_impuesto"].ToString(); TxtDesc_impuesto.Text = Ds.Tables[0].Rows[0]["desc_impuesto"].ToString(); TxtEditar.Text = "Listar"; Registros(); } catch (Exception Ex) { TxtEditar.Text = "Nuevo"; Limpiar(); TxtCod_articulo.Focus(); string rpta = Ex.Message; MensajeOk("Tabla Vacia, esta en modo Ingreso"); Show(); } }
private void GenerarCod() { try { int rpta = Convert.ToInt32(EArticulo.GenerarCod(TxtCod_articulo.Text)); TxtCod_articulo.Text = Pref + rpta.ToString(TxtCadena.Text); } catch (Exception Ex) { MensajeError(" Solo se puede Generar Codigos Numericos " + Ex.StackTrace); TxtCod_articulo.Focus(); } }