private void toolBaseEdit_Click(object sender, EventArgs e)
{
//
if (this.m_product == null)
{
MessageBox.Show("材料不存在,无法修改!"); return;
}
//判断是否需要修改
if (MessageBox.Show("您确认要修改此材料基本信息?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No)
{
return;
}
//1.更新数据库产品基本信息记录
PDM_MATERAIL t_product = new PDM_MATERAIL();
t_product.MATERIALID = this.m_product.MATERIALID;
t_product.MATERIALNO = this.tb_productNo.Text;
t_product.MODELTYPE = this.tb_modelType.Text;
t_product.MATERIALTYPE = this.tb_productType.Text;
t_product.RAWMATERIAL = this.tb_rawMaterail.Text;
t_product.MATERIALSRC = this.tb_materailSrc.Text;
t_product.VERSION = this.tb_version.Text;
t_product.MEMO_ZH = this.tb_memoZh.Text;
t_product.MEMO_EN = this.tb_memoEn.Text;
t_product.MEMO = this.rtbMemo.Text;
t_product.MODIFYTIME = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
t_product.MODIFIER = LoginInfo.LoginID;// LoginInfo.LoginID;//CommonVar.userName;
m_MaterailService.UpdateByID(t_product);
//2.基本信息改变后更新基本信息显示
this.tb_modifyTime.Text = t_product.MODIFYTIME;
this.tb_modifier.Text = t_product.MODIFIER;
//3.更新(派生历史记录,ERC,文档,图纸,技术任务单,产品结构,版本)等tab页面列表显示,更新基本属性信息
this.m_product = m_MaterailService.GetById(t_product.MATERIALID);
allinit();
}