//private void llenarListaMedida() //{ // string sSQL = "select Descripcion from UndMedida order by Descripcion"; // SqlCommand ocmd = new SqlCommand(sSQL, con); // SqlDataReader reader = ocmd.ExecuteReader(); // if (reader.HasRows) // { // while (reader.Read()) // { // cbxMedida.Items.Add(reader["Descripcion"].ToString()); // } // reader.Close(); // } // cbxMedida.SelectedIndex = 0; //} //private void llenarListaMarca() //{ // string sSQL = "select Descripcion from Marca order by Descripcion"; // SqlCommand ocmd = new SqlCommand(sSQL, con); // SqlDataReader reader = ocmd.ExecuteReader(); // if (reader.HasRows) // { // while (reader.Read()) // { // cbxMarca.Items.Add(reader["Descripcion"].ToString()); // } // reader.Close(); // } // cbxMarca.SelectedIndex = 0; //} private void FrmEdArticulo_Load(object sender, EventArgs e) { // TODO: esta línea de código carga datos en la tabla 'sistemaComprasDataSet.Marca' Puede moverla o quitarla según sea necesario. this.marcaTableAdapter.Fill(this.sistemaComprasDataSet.Marca); // TODO: esta línea de código carga datos en la tabla 'sistemaComprasDataSet.UndMedida' Puede moverla o quitarla según sea necesario. this.undMedidaTableAdapter.Fill(this.sistemaComprasDataSet.UndMedida); if (!Modo.Equals("C")) { //txtIdArticulo.Enabled = Modo.Equals("C"); txtIdArticulo.Text = IdArticulo.ToString(); txtDescripcion.Text = Descripcion; cbxMarca.SelectedIndex = Marca; cbxMedida.SelectedIndex = Medida; nudExistencia.Value = Existencia; if (cbEstado.Checked == true) { Estado = true; EstadoValue = 1; } else { Estado = false; } this.Text += " : Editando"; } }
/// <summary> /// Override del método virtual que permite devolver los datos de un Articulo del tipo ArticuloComputacion /// </summary> /// <returns></returns> public override string Mostrar() { StringBuilder sb = new StringBuilder(); sb.AppendLine(base.Mostrar()); sb.AppendLine(IdArticulo.ToString()); return(sb.ToString()); }