包含字段值的弹出窗体/消息 [英] popup form / message with contains field value

查看:108
本文介绍了包含字段值的弹出窗体/消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有组合框选择索引代码更改

每个索引更改我在数据库上调用字段来分配另一个标签文本

代码如下:



i have code for combo box selected index changed
every index change i called field on database to assign another label text
code like this:

conn = Connection.GetInstance();
pixelRanges = pixeRangeDao.GetDataById(cbAreaCluster.SelectedIndex);
lbDescription.Text = pixeRanges.description.ToString;







问题是
和popud包含与cbAreaCluster.SelectedIndex有关系的字段



什么样的弹出窗口是最好的?

如何创建它?

我该如何使用这种关系?




the issue is
i need popup form or message while i clicked label lbDescription
and popud contain field which has relationship with cbAreaCluster.SelectedIndex

what kind of popup is the best?
how can i create it?
and how can i use the relation?

推荐答案

我必须尝试从另一种形式和成功引用属性

这是代码的一部分



i have to try refer attribute from another form and success
this is part of code

public MainForm mainFormRef;
public int id;
private Connection conn;

public FormInformation(ref MainForm mainForm)
{
    mainFormRef = mainForm;
    InitializeComponent();
    loadData();
}

private void loadData()
{
    id = mainFormRef.id;

    //call information
    conn = Connection.GetInstance();
    var pixelRangeDao = new PixelRangeDao(conn.GetConnection());
    var pixelRanges = pixelRangeDao.GetDataById(id);

    lbHeader.Text = pixelRanges.description.ToString();
    lbInformation.Text = pixelRanges.information.ToString();
}


这篇关于包含字段值的弹出窗体/消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆