コード例 #1
0
        public wsPassportExtended ws_selectPassport_EX(int?ID, out string OpStatus)
        {
            try
            {
                wsPassportExtended  P_EX = new wsPassportExtended();
                CatalogsDataManager CDM  = new CatalogsDataManager();
                DeviceDataManager   DDM  = new DeviceDataManager();
                if (ID != null)
                {
                    P_EX              = DDM.selectPasport((int)ID);
                    P_EX.DevPath      = DDM.selectDeviceParents(P_EX.DevTypeID);
                    P_EX.DevPlacePath = DDM.selectPlaceParents(P_EX.DevPlaceID);
                }

                P_EX.list_Producers = CDM.GetProducerList();

                DBTree DBT = new DBTree(2); // 2 = models tree
                //wsNode NNODE = new wsNode(DBTREE.GetAnyNodeinDB);

                P_EX.tbl_Models = DBT.DBDATA;

                List <string>     s     = new List <string>();
                List <wsBaseItem> blist = new List <wsBaseItem>();
                blist = DDM.selectItemsList(null);
                foreach (wsBaseItem b in blist)
                {
                    s.Add(b.Description);
                }

                P_EX.helper_DevDescr = s;

                OpStatus = Resources.Messages.m_OpStatusDone;
                return(P_EX);
            }
            catch (Exception err)
            {
                OpStatus = err.ToString();
                return(null);
            }
        }
コード例 #2
0
ファイル: WService.svc.cs プロジェクト: undejavue/SITbusiness
        public wsPassportExtended ws_selectPassport_EX(int? ID, out string OpStatus)
        {
            try
            {
                wsPassportExtended P_EX = new wsPassportExtended();
                CatalogsDataManager CDM = new CatalogsDataManager();
                DeviceDataManager DDM = new DeviceDataManager();
                if (ID != null)
                {
                    P_EX = DDM.selectPasport((int)ID);
                    P_EX.DevPath = DDM.selectDeviceParents(P_EX.DevTypeID);
                    P_EX.DevPlacePath = DDM.selectPlaceParents(P_EX.DevPlaceID);
                }

                P_EX.list_Producers = CDM.GetProducerList();

                DBTree DBT = new DBTree(2); // 2 = models tree        
                //wsNode NNODE = new wsNode(DBTREE.GetAnyNodeinDB);
               
                P_EX.tbl_Models = DBT.DBDATA;

                List<string> s = new List<string>();
                List<wsBaseItem> blist = new List<wsBaseItem>();
                blist = DDM.selectItemsList(null);
                foreach (wsBaseItem b in blist)
                {
                    s.Add(b.Description);
                }

                P_EX.helper_DevDescr = s;

                OpStatus = Resources.Messages.m_OpStatusDone;
                return P_EX;
            }
            catch (Exception err)
            {
                OpStatus = err.ToString();
                return null;
            }
        }