private void Btn_Nuevo_Click(object sender, EventArgs e) { op = "nuevo"; Txt_Cod_Producto.Text = ""; Txt_Descripcion.Text = ""; Txt_moneda.Text = ""; Txt_Stock.Text = ""; Txt_Precio.Text = ""; Txt_Costo.Text = ""; Cbo_Grupo_Producto.SelectedIndex = -1; Cbo_Tipo_Producto.SelectedIndex = -1; Cbo_Unidad_Medida.SelectedIndex = -1; Txt_Cod_Producto.Text = Convert.ToString(dt.getNoSig()); Btn_Cancelar.Enabled = true; Btn_Editar.Enabled = false; Btn_Guardar.Enabled = true; Txt_Descripcion.Enabled = true; Txt_moneda.Enabled = true; Txt_Stock.Enabled = true; Txt_Precio.Enabled = true; Txt_Costo.Enabled = true; Cbo_Grupo_Producto.Enabled = true; Cbo_Tipo_Producto.Enabled = true; Cbo_Unidad_Medida.Enabled = true; Txt_Descripcion.Focus(); }
private void Btn_Editar_Click(object sender, EventArgs e) { op = "editar"; Btn_Cancelar.Enabled = true; Btn_Editar.Enabled = false; Btn_Nuevo.Enabled = true; Btn_Guardar.Enabled = true; Txt_Descripcion.Enabled = true; Txt_moneda.Enabled = true; Txt_Stock.Enabled = true; Txt_Precio.Enabled = true; Txt_Costo.Enabled = true; Cbo_Grupo_Producto.Enabled = true; Cbo_Tipo_Producto.Enabled = true; Cbo_Unidad_Medida.Enabled = true; Txt_Descripcion.Focus(); }