public string GetDataDirect(string actionName) { // get all of data. var _ds = new Select().SelectLists(actionName); return(LZString.CompressToUTF16(_ds.GetXml())); }
public string GetSelect2() { HttpContext Context = HttpContext.Current; string pageNum = Context.Request["pageNum"], pageSize = Context.Request["pageSize"], searchTerm = Context.Request["searchTerm"], fnName = Context.Request["fnName"], names = Context.Request["names"], values = Context.Request["values"]; // grid static parameters string[] defaultNames = { "pageNum", "pageSize", "key" }, defaultValues = { pageNum, pageSize, searchTerm }, // get dynamic more parameters from user addtionNames = string.IsNullOrEmpty(names) ? new string[0] : names.Split('~'), addtionValues = string.IsNullOrEmpty(values) ? new string[0] : values.Split('~'), // merge all parameters (union) namesAll = defaultNames.Concat(addtionNames).ToArray(), valuesAll = defaultValues.Concat(addtionValues).ToArray(); var _ds = new Select().SelectLists(fnName, namesAll, valuesAll); return(LZString.CompressToUTF16(_ds.GetXml())); }
public string Compress(string data) { if (Compression) { return(LZString.CompressToUTF16(data)); } return(data); }
public void CompatibilityCompressUTF16FromCSharp(LZStringTestCase test) { var compress = LZString.CompressToUTF16(test.Uncompressed); var uncompress = RunNodeLzString("decompressFromUTF16", compress); Console.WriteLine("c# compression result:"); Console.WriteLine(compress); Assert.That(uncompress, Is.EqualTo(test.Uncompressed)); }
public string GetDataByID(string actionName, string value) { // create filter parameters string[,] _params = { { "Id", value } }; // get all of data. var _ds = new Select().SelectLists(actionName, _params); return(LZString.CompressToUTF16(_ds.GetXml())); }
public string GetDataList(DataListModel param) { if (param == null) { return("Error!! null paramters"); } // get all of data. var _ds = new Select().SelectLists(param.actionName, param.names, param.values); return(LZString.CompressToUTF16(_ds.GetXml())); }
public string GetLoadDataTables() { var param = new jQueryDataTableParamModel(); var Context = HttpContext.Current; param.sEcho = String.IsNullOrEmpty(Context.Request["sEcho"]) ? 0 : Convert.ToInt32(Context.Request["sEcho"]); param.sSearch = String.IsNullOrEmpty(Context.Request["sSearch"]) ? "" : Context.Request["sSearch"]; param.iDisplayStart += String.IsNullOrEmpty(Context.Request["iDisplayStart"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayStart"]); param.iDisplayLength = String.IsNullOrEmpty(Context.Request["iDisplayLength"]) ? 0 : Convert.ToInt32(Context.Request["iDisplayLength"]); var sortColumnIndex = Convert.ToInt32(Context.Request["iSortCol_0"]); var sortDirection = Context.Request["sSortDir_0"];// asc or desc // create filter parameters string[,] _params = { { "DisplayStart", param.iDisplayStart.ToString() }, { "DisplayLength", param.iDisplayLength.ToString() }, { "SearchParam", param.sSearch }, { "SortColumn", sortColumnIndex.ToString() },{ "SortDirection", sortDirection } }; // get all of data. var _ds = new Select().SelectLists(Context.Request["funName"], _params); return(LZString.CompressToUTF16(_ds.GetXml())); }
public string Test(String s) { return(LZString.CompressToUTF16(s)); }
public void CompressToUTF16(LZStringTestCase test) { Assert.That(LZString.CompressToUTF16(test.Uncompressed), Is.EqualTo(test.CompressedUTF16)); }