first commit
This commit is contained in:
37
Complex.EndPoint/Utility/GridUtitlity.cs
Normal file
37
Complex.EndPoint/Utility/GridUtitlity.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Dynamic;
|
||||
|
||||
namespace Complex.EndPoint.Utility
|
||||
{
|
||||
public class GridDataRequest
|
||||
{
|
||||
public int start { set; get; }
|
||||
public int length { set; get; }
|
||||
public string extra_search { set; get; }
|
||||
|
||||
public int Page
|
||||
{
|
||||
get
|
||||
{
|
||||
return start / length;
|
||||
}
|
||||
}
|
||||
public dynamic SeacrchColumns
|
||||
{
|
||||
get
|
||||
{
|
||||
dynamic myobject = new ExpandoObject();
|
||||
|
||||
IDictionary<string, object> dic = myobject;
|
||||
|
||||
var searchCols = this.extra_search.Substring(1, this.extra_search.Length - 2).Replace("\u0022", "").Split(',');
|
||||
foreach (var item in searchCols)
|
||||
{
|
||||
var t = item.Split(':');
|
||||
dic.Add(t[0], t[1]);
|
||||
}
|
||||
return dic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user