示例#1
0
        //SELECT
        public string sDevice(string pDbNm, string pSiteCd, out List <DataDevice> reList, out string reMsg)
        {
            string reCode = "N";

            DataSet   ds     = null;
            BizDevice bizSys = null;

            try
            {
                bizSys = new BizDevice();

                try
                {
                    ds = bizSys.sDevice(pDbNm, pSiteCd);

                    reMsg  = "[검색 성공]";
                    reCode = "Y";
                }
                catch (Exception ex)
                {
                    reMsg  = "[검색 실패]" + ex.ToString();
                    reCode = "N";
                }
            }
            catch (Exception ex)
            {
                reMsg  = "[검색 에러] :: " + ex.ToString();
                reCode = "N";
            }

            List <DataDevice> data = new List <DataDevice>();

            try
            {
                data = ListClass.ConvertDataTableToList <DataDevice>(ds.Tables[0]);
            }
            catch (Exception ex)
            {
                logs.SaveLog("[error]  (page)::WsDevice.svc  (Function)::sDevice  (Detail)::ConvertDataTableToList " + "\r\n" + ex.ToString(), "Error");
                reMsg += "/[List 에러]" + ex.ToString();
                reCode = "N";
            }

            reList = data;

            return(reCode);
        }