在一个form1中修改另一个form2中的listview中的数据,修改的程序是这么写 对吗?
form1中有textBoxName,comboBoxTypestring type=this.comboBoxType.SelectedItem.ToString();
string sqlstr="update t_Class set ClassName='" +this.textBoxName.Text.Trim()+" ',ClassType='"+ type + " ' where ClassName="+this.textBoxName.Text;
public class form1 :....
{
public static form2 f2;
...
..
void modify()
{
f2.listview .... }
}
启动form2的代码
form1.f2 = new form2();
f2.show
之类