예제 #1
0
        public Images AccurateSearch(string imageNumber)     //精确查找
        {
            ///throw new NotImplementedException();

            if (imageNumber == String.Empty)      //如果数据库中没有该图号,则查找为空
            {
                throw new Exception("不存在该图号,请重新输入查询!");
            }
            else       //通过ui中填写的内容 返回来相应的数据
            {
                Images image = iDAO.SelectImage(imageNumber);
                return(image);
            }
        }
예제 #2
0
        public bool AddConnect1(List <Connect1> c1List)
        {
            bool flag = false;

            for (int i = 0; i < c1List.Count; i++)
            {
                if (iDAO.SelectImage(c1List[i].ImageNumber) != null && pDAO.SelectProduct(c1List[i].ProductType) != null)
                {
                    if (c1DAO.SelectConnect1(c1List[i]) == null)
                    {
                        c1DAO.AddConnect1(c1List[i]);
                        flag = true;
                    }
                }
                else
                {
                    flag = false;
                }
            }

            return(flag);
        }
예제 #3
0
        public bool AddConnect2(List <Connect2> c2List)
        {
            bool flag = false;

            for (int i = 0; i < c2List.Count; i++)
            {
                if (iDAO.SelectImage(c2List[i].ImageNumber) != null && cDAO.SelectCompany(c2List[i].CompanyNumber) != null)
                {
                    if (c2DAO.SelectConnect2(c2List[i]) == null)
                    {
                        c2DAO.AddConnect2(c2List[i]);
                        flag = true;
                    }
                }
                else
                {
                    flag = false;
                }
            }

            return(flag);
        }
예제 #4
0
        public bool AddConnect3(List <Connect3> c3List)
        {
            bool flag = false;

            for (int i = 0; i < c3List.Count; i++)
            {
                if (iDAO.SelectImage(c3List[i].ImageNumber) != null && dDAO.SelectDepartment(c3List[i].DepartmentNumber) != null)
                {
                    if (c3DAO.SelectConnect3(c3List[i]) == null)
                    {
                        c3DAO.AddConnect3(c3List[i]);
                        flag = true;
                    }
                }
                else
                {
                    flag = false;
                }
            }

            return(flag);
        }