我在一个if语句里调用button.Click方法报错Forms.Control.Click”只能出现在 += 或 -=
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/05 21:03:26
我在一个if语句里调用button.Click方法报错Forms.Control.Click”只能出现在 += 或 -= 的左边
if (readerborrow1.ReaderBorrow_Add(ID,readerId,bookId,borrowTime,shouldBackTime,isback) == true)
{
this.btnOk.Click();
MessageBox.Show("借阅成功");
this.bookTableAdapter.Fill(this.bookMSDataSet.Book);
}
if (readerborrow1.ReaderBorrow_Add(ID,readerId,bookId,borrowTime,shouldBackTime,isback) == true)
{
this.btnOk.Click();
MessageBox.Show("借阅成功");
this.bookTableAdapter.Fill(this.bookMSDataSet.Book);
}
这是button1的声明,我们要在其他地方使用button1的事件处理程序
this.button1.Click += new System.EventHandler(this.button1_Click);
void this.button1_Click(object o ,EventArgs e)
{
}
.
//在其他地方使用如下的方法调用
this.button1_Click(this.button1,new EventArgs());
再问: 改成这个还是不行呀 this.btnOk.Click += new System.EventHandler(this.btnOk_Click); if (readerborrow1.ReaderBorrow_Add(ID, readerId, bookId, borrowTime, shouldBackTime, isback) == true) { this.btnOk.Click(this.btnOk, new EventArgs()); }
this.button1.Click += new System.EventHandler(this.button1_Click);
void this.button1_Click(object o ,EventArgs e)
{
}
.
//在其他地方使用如下的方法调用
this.button1_Click(this.button1,new EventArgs());
再问: 改成这个还是不行呀 this.btnOk.Click += new System.EventHandler(this.btnOk_Click); if (readerborrow1.ReaderBorrow_Add(ID, readerId, bookId, borrowTime, shouldBackTime, isback) == true) { this.btnOk.Click(this.btnOk, new EventArgs()); }
我在SM town注册的时候,E-mile后面总有Please,Click the CHECK ID button.怎么
安装 win7补丁时候出现 please click the below button to pach,thanks 我
click
我的IPONE4,在Cydia,出现红色警告语”Urgent!Save your SHSH now Click Here
帮我翻译两句英语第一句:Click the Replace button to apply the change! If
dedecms 想调用“评论数” 就是在列表中调用评论数,比如点击数是:[field:click/]
Click Click Click 歌词
If you do not have your PLP,click the button to get it via t
在河南省国培计划中click
您好,我也是刚刚在two dollar click 上兼职,请问在提交申请后的,您收到two dollar click的
英语翻译Click on Upgrade command button.kyocera cricket ringtone
click the following button to confirm your membership regist