Пример #1
0
 private void btnok_Click(object sender, EventArgs e)
 {
     if (advBorLine.SelectedNodes.Count == 0)
     {
         AisinoMessageBox amb2 = new AisinoMessageBox("提示", "没有选择节点!",
                                                      AisinoMessageButton.OK,
                                                      AisinoMessageIcon.Warning);
         amb2.ShowDialog();
     }
     else
     {
         this.SelectedBorLine = advBorLine.SelectedNode.Tag as BorLine;
     }
     this.DialogResult = System.Windows.Forms.DialogResult.OK;
 }
Пример #2
0
        public BorLine UpdateBorLine(BorLine updBorLine)
        {
            BorLine borLine = null;

            try
            {
                _borLineDal.Update(updBorLine);
                borLine = updBorLine;
            }
            catch (RepositoryException ex)
            {
                throw new AisinoMesServiceException("修改工艺路线信息失败!", ex);
            }
            return(borLine);
        }
Пример #3
0
        public BorLine AddBorLine(BorLine newBorLine)
        {
            BorLine borLine = null;

            try
            {
                _borLineDal.Add(newBorLine);
                borLine = newBorLine;
            }
            catch (RepositoryException ex)
            {
                throw new AisinoMesServiceException("添加工艺路线信息失败!", ex);
            }
            return(borLine);
        }
Пример #4
0
        public BorLine DeleteBorLine(BorLine delBorLine)
        {
            BorLine borLine = null;

            try
            {
                delBorLine.bor_line_deleted = true;
                _unitOfWork.AddAction(delBorLine, DataActions.Update);
                borLine = delBorLine;
                //删除路线工段表中对应的路线记录
                List <BorLineSection> borLineSectionLst = _borLineSectionDal.Find(d => d.bor_line_id == delBorLine.id).Entities.ToList();
                foreach (BorLineSection borLineSection in borLineSectionLst)
                {
                    _unitOfWork.AddAction(borLineSection, DataActions.Delete);
                }
                _unitOfWork.Save();
            }
            catch (RepositoryException ex)
            {
                throw new AisinoMesServiceException("删除工艺路线信息失败!", ex);
            }
            return(borLine);
        }