Пример #1
0
        public string SelectAll()
        {
            string          vResult      = string.Empty;
            DataTable       vDatainTable = new DataTable();
            SQLToolsLibrary vSqlTools    = new SQLToolsLibrary();

            try {
                vDatainTable = vSqlTools.GetResultSql("sp_Select_All_Company", "Master");
                List <Company> vData = DataTableToList(vDatainTable);
                if (vData != null && vData.Count > 0)
                {
                    vResult = JsonConvert.SerializeObject(vData, Formatting.Indented);
                }
            } catch (Exception) {
                vResult = string.Empty;
            }
            //var vDes = JsonConvert.DeserializeObject<List<City>>(vResult);
            return(vResult);
        }