Ejemplo n.º 1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void  common_Init(string p_firstId, string p_secondId)
        {
            m_StructService     = EAS.Services.ServiceContainer.GetService <IStructService>();
            m_AllProductService = EAS.Services.ServiceContainer.GetService <IAllProductService>();
            m_firstObj          = m_AllProductService.GetById(p_firstId);
            m_secondObj         = m_AllProductService.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;
        }
Ejemplo n.º 2
0
 public DrawAddForm(String p_ProductId)
 {
     InitializeComponent();
     m_AllProductService = EAS.Services.ServiceContainer.GetService<IAllProductService>();
     m_Product = m_AllProductService.GetById(p_ProductId);
     this.tsb_type.SelectedIndex = 0;
     DocList_Init();
 }
Ejemplo n.º 3
0
        /// <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    = this.LoginInfo.LoginID;
            m_AllProductService.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_AllProductService.GetById(t_product.PRODUCTID);
            allinit();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void common_Init(string p_firstId, string p_secondId)
        {
            m_StructService = EAS.Services.ServiceContainer.GetService<IStructService>();
            m_AllProductService = EAS.Services.ServiceContainer.GetService<IAllProductService>();
            m_firstObj = m_AllProductService.GetById(p_firstId);
            m_secondObj = m_AllProductService.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;
        }