/// <summary> /// 初始化 /// </summary> private void common_Init(string p_firstId, string p_secondId) { m_StructService = EAS.Services.ServiceContainer.GetService <IStructService>(); m_AllPartsService = EAS.Services.ServiceContainer.GetService <IAllPartsService>(); m_firstObj = m_AllPartsService.GetById(p_firstId); m_secondObj = m_AllPartsService.GetById(p_secondId); this.tb_firstNo.Text = m_firstObj.PRODUCTNO; this.tb_firstMemo.Text = m_firstObj.MEMO_ZH; this.tb_firstVersion.Text = m_firstObj.VERSION; this.tb_secondNo.Text = m_secondObj.PRODUCTNO; this.tb_secondMemo.Text = m_secondObj.MEMO_ZH; this.tb_secondVersion.Text = m_secondObj.VERSION; }
public DocAddForm(String p_ProductId) { InitializeComponent(); m_AllPartsService = EAS.Services.ServiceContainer.GetService<IAllPartsService>(); m_Product = m_AllPartsService.GetById(p_ProductId); this.tsb_type.SelectedIndex = 0; DocList_Init(); }
/// <summary> /// 基本信息--修改按钮操作 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 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_ALL_PRODUCT t_product = new PDM_ALL_PRODUCT(); t_product.PRODUCTID = this.m_product.PRODUCTID; t_product.PRODUCTNO = this.tb_productNo.Text; t_product.MODELTYPE = this.tb_modelType.Text; t_product.PRODUCTTYPE = this.tb_productType.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; m_AllPartsService.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_AllPartsService.GetById(t_product.PRODUCTID); allinit(); }
/// <summary> /// 初始化 /// </summary> private void common_Init(string p_firstId, string p_secondId) { m_StructService = EAS.Services.ServiceContainer.GetService<IStructService>(); m_AllPartsService = EAS.Services.ServiceContainer.GetService<IAllPartsService>(); m_firstObj = m_AllPartsService.GetById(p_firstId); m_secondObj = m_AllPartsService.GetById(p_secondId); this.tb_firstNo.Text = m_firstObj.PRODUCTNO; this.tb_firstMemo.Text = m_firstObj.MEMO_ZH; this.tb_firstVersion.Text = m_firstObj.VERSION; this.tb_secondNo.Text = m_secondObj.PRODUCTNO; this.tb_secondMemo.Text = m_secondObj.MEMO_ZH; this.tb_secondVersion.Text = m_secondObj.VERSION; }