コード例 #1
0
        public static List <string> GetDataGroup(string group_name)
        {
            try
            {
                List <string> lst    = new List <string>();
                string[]      attr   = { "id", "last_name" };
                XDocument     xml    = new XDocument();
                string        UDSObj = ca.doSelect(SID, "grp", "last_name = '" + group_name + "'", 10, attr);
                xml = XDocument.Parse(UDSObj);

                foreach (XElement element in xml.Descendants("UDSObject"))
                {
                    foreach (XElement EAttr in element.Descendants("Attribute"))
                    {
                        lst.Add(EAttr.Element("AttrValue").Value);
                    }
                }
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #2
0
        public static List <string> GetDataAssignee(string userid)
        {
            try
            {
                List <string> lst    = new List <string>();
                string[]      attr   = { "id", "userid", "combo_name" };
                XDocument     xml    = new XDocument();
                string        UDSObj = ca.doSelect(SID, "agt", "userid = '" + userid + "'", 10, attr);
                xml = XDocument.Parse(UDSObj);

                foreach (XElement element in xml.Descendants("UDSObject"))
                {
                    foreach (XElement EAttr in element.Descendants("Attribute"))
                    {
                        lst.Add(EAttr.Element("AttrValue").Value);
                    }
                }
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #3
0
        public static List <string> GetDataSummary(string terminalid, string summary)
        {
            try
            {
                List <string> lst    = new List <string>();
                string[]      attr   = { "persistent_id", "summary" };
                XDocument     xml    = new XDocument();
                string        UDSObj = ca.doSelect(SID, "cr", "summary = '" + "Kỳ " + summary + "_" + terminalid + "'", 10, attr);
                xml = XDocument.Parse(UDSObj);

                foreach (XElement element in xml.Descendants("UDSObject"))
                {
                    foreach (XElement EAttr in element.Descendants("Attribute"))
                    {
                        lst.Add(EAttr.Element("AttrValue").Value);
                    }
                }
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #4
0
        //public static List<string> GetDataContactProvince(string province)
        // {
        //     try
        //     {
        //         List<string> lst = new List<string>();
        //         string[] attr = { "id", "province_v2" };
        //         XDocument xml = new XDocument();
        //         string UDSObj = ca.doSelect(SID, "zlocation_area", "province_v2 = '" + province + "'", -1, attr);
        //         xml = XDocument.Parse(UDSObj);

        //         foreach (XElement element in xml.Descendants("UDSObject"))
        //         {
        //             foreach (XElement EAttr in element.Descendants("Attribute"))
        //             {
        //                 lst.Add(EAttr.Element("AttrValue").Value);
        //             }
        //         }
        //         return lst;
        //     }
        //     catch (Exception ex)
        //     {
        //         return null;
        //     }
        // }

        public static List <string> GetDataPersistent(string ticket)
        {
            try
            {
                List <string> lst    = new List <string>();
                string[]      attr   = { "persistent_id", "ref_num", "id" };
                XDocument     xml    = new XDocument();
                string        UDSObj = ca.doSelect(SID, "cr", "ref_num = '" + ticket + "'", 10, attr);
                xml = XDocument.Parse(UDSObj);

                foreach (XElement element in xml.Descendants("UDSObject"))
                {
                    foreach (XElement EAttr in element.Descendants("Attribute"))
                    {
                        lst.Add(EAttr.Element("AttrValue").Value);
                    }
                }
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #5
0
        public static List <string> GetDataTerminal(string terminal_id)
        {
            try
            {
                List <string> lst    = new List <string>();
                string[]      attr   = { "id", "zhw_id", "zcode" };
                XDocument     xml    = new XDocument();
                string        UDSObj = ca.doSelect(SID, "zterminal", "zcode = '" + terminal_id + "'", -1, attr);
                xml = XDocument.Parse(UDSObj);

                foreach (XElement element in xml.Descendants("UDSObject"))
                {
                    foreach (XElement EAttr in element.Descendants("Attribute"))
                    {
                        lst.Add(EAttr.Element("AttrValue").Value);
                    }
                }
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #6
0
        public static List <string> GetDataPcat(string pcat_sym)
        {
            try
            {
                List <string> lst    = new List <string>();
                string[]      attr   = { "sym", "id" };
                XDocument     xml    = new XDocument();
                string        UDSObj = ca.doSelect(SID, "pcat", "sym like '" + pcat_sym + "'", -1, attr);
                xml = XDocument.Parse(UDSObj);

                foreach (XElement element in xml.Descendants("UDSObject"))
                {
                    foreach (XElement EAttr in element.Descendants("Attribute"))
                    {
                        lst.Add(EAttr.Element("AttrValue").Value);
                    }
                }
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }