Пример #1
0
        private string getDiInfo(string id_ent)
        {
            string           str             = "";
            ICiOrdQryService ciOrdQryService = XapServiceMgr.find <ICiOrdQryService>();

            EntDiDO[] entDiDOs = ciOrdQryService.getEntDiDOList(id_ent);
            if (entDiDOs != null && entDiDOs.Length > 0)
            {
                int i = 1;
                foreach (EntDiDO item in entDiDOs)
                {
                    str += i + "." + item.Name_didef_dis;
                    if (item.Fg_suspdi != null && item.Fg_suspdi.Value)
                    {
                        str += "?";
                    }
                    if (item.Supplement != null && item.Supplement.Length > 0)
                    {
                        str += "——" + item.Supplement;
                    }
                    str += ";";
                    i++;
                }
                str = str.Substring(0, str.LastIndexOf(';'));
            }

            return(str);
        }
        private string getDiInfo(string id_ent)
        {
            string str = "";

            EntDiDO[] entDiDOs = ciOrdQryService.getEntDiDOList(id_ent);
            if (entDiDOs != null && entDiDOs.Length > 0)
            {
                int i = 1;
                foreach (EntDiDO item in entDiDOs)
                {
                    str += i + "." + item.Name_didef_dis + ";";
                    i++;
                }
                str = str.Substring(0, str.LastIndexOf(';'));
            }

            return(str);
        }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id_ent"></param>
        /// <param name="id_didef"></param>
        /// <param name="mainDi"></param>
        /// <returns></returns>
        public string getDiName(String id_ent, String id_didef, ref string[] mainDi)
        {
            EntDiDO[] dis = ciOrdQryService.getEntDiDOList(id_ent);
            if (dis == null || dis.Length == 0)
            {
                return(null);
            }
            EntDiDO maindi = dis.FirstOrDefault(x => x.Id_didef_dis == id_didef);

            if (maindi != null)
            {
                mainDi[0] = maindi.Id_entdi;
                mainDi[1] = maindi.Name_didef_dis;
            }
            else
            {
                mainDi[0] = dis[0].Id_entdi;
                mainDi[1] = dis[0].Name_didef_dis;
            }
            return(null);
        }