示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnAddProdInfo_Click(object sender, EventArgs e)
        {
            if (this.gridProcess.SelectedRowsCount == 0)
            {
                throw new ApplicationException("请先选择制程");
            }
            this.gridProcess.CloseEditor();

            var PFP = this.eRPC006ProcessFlowProcessBindingSource.Current as ERP_C006_ProcessFlow_Process;

            if (string.IsNullOrEmpty(PFP.PFCode))
            {
                throw new ApplicationException("请先输入流程代号");
            }
            if (string.IsNullOrEmpty(PFP.ProcessCode))
            {
                throw new ApplicationException("请先输入制程信息");
            }
            ERP_C006_ProcessFlow_ProdInfo processProdInfo = new ERP_C006_ProcessFlow_ProdInfo();

            //ERP_C006_ProcessFlow_ProdInfo processProdInfo = this.eRPC006ProcessFlowProdInfoBindingSource.Current as ERP_C006_ProcessFlow_ProdInfo;
            processProdInfo.PFCode      = PFP.PFCode;
            processProdInfo.ProcessCode = PFP.ProcessCode;
            this.eRPC006ProcessFlowProdInfoBindingSource.Add(processProdInfo);
        }
        public void Create(ERP_C006_ProcessFlow_ProdInfo ERP_C006_ProcessFlow_ProdInfo)
        {
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_C006_ProcessFlow_ProdInfo.CompCode = tempUser.CompCode;
            ERP_C006_ProcessFlow_ProdInfo.Validate();
            this.ERP_C006_ProcessFlow_ProdInfoRepository.Add(ERP_C006_ProcessFlow_ProdInfo);
            this.runtimeService.Commit();
        }
        public void Update(ERP_C006_ProcessFlow_ProdInfo ERP_C006_ProcessFlow_ProdInfo)
        {
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            ERP_C006_ProcessFlow_ProdInfo.Validate();
            var existstb_Sys_Menu = this.GetById(ERP_C006_ProcessFlow_ProdInfo.Id);

            this.ERP_C006_ProcessFlow_ProdInfoRepository.SetValues(ERP_C006_ProcessFlow_ProdInfo, existstb_Sys_Menu);
            this.runtimeService.Commit();
        }
示例#4
0
        /// <summary>
        /// dbo.ERP_C006_ProcessFlow_ProdInfo删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnDelProdInfo_Click(object sender, EventArgs e)
        {
            if (this.gridProdInfo.SelectedRowsCount <= 0)
            {
                throw new ApplicationException("请先选择要删除的行");
            }
            ERP_C006_ProcessFlow_ProdInfo tbtemp = this.eRPC006ProcessFlowProdInfoBindingSource.Current as ERP_C006_ProcessFlow_ProdInfo;

            eRPC006ProcessFlowProdInfoBindingSource.RemoveCurrent();
        }