110,537
社区成员
发帖
与我相关
我的任务
分享
private void btnNew_Click(object sender, EventArgs e)
{
dataMonitor.IsLoad = false;
if (btnNew.Text == "新 增(&N)")
{
isNewBtn = true;
SetTextBoxEnable(true); //设置TextBox的Enabled属性
DelBinding(); //删除绑定
this.txtMaterial.Text = "";
this.txtMaterial.Focus();
this.txtRemark.Text = "";
this.chbImportant.Checked = false;
this.chbCheck.Checked = true;
AddOtherMaterial(); //新增一条记录
//AddBinding(); //添加绑定
btnNew.Text = "取 消(&C)";
this.btnDelete.Enabled = false;
this.btnEdit.Enabled = false;
this.btnCommit.Enabled = false;
this.dgvMaterial.Enabled = false;
btnSave.Enabled = true;
this.chbImportant.Enabled = true ;
}