public string GetCode(string name) { var func = FuncLiteDb.Get(name, funcType); if (func != null) { return(func.Code); } return(""); }
protected override string GetFunc(string name) { var code = base.GetFunc(name); if (string.IsNullOrEmpty(code)) { var func = FuncLiteDb.Get(name, FuncType.URLFUNCTION); if (func != null) { return(func.Code); } } return(code); }
public object UpdateFunc(FuncModel func) { //if (func.Name == "now" || func.Name == "ticks") // return false; var f = FuncLiteDb.Get(func.Name); if (f != null && f.Id == 0) { return(false); } FuncLiteDb.AddOrUpdate(func); return(true); }
public object Funcs(int offset, int limit) { var node = ServerManager.Get(Request.RequestUri.Authority); var paging = new Paging(); paging.CurrentPage = (offset / limit) + 1; paging.PageSize = limit; var list = FuncLiteDb.GetModels(paging); return(new { rows = list, total = list.Count }); }
public object Funcs(int offset, int limit, string type) { var node = ServerManager.Get(Request.Host.Value); var paging = new Paging(); paging.CurrentPage = (offset / limit) + 1; paging.PageSize = limit; var list = FuncLiteDb.GetModels(paging, type); return(new { rows = list, total = paging.Count }); }
public bool RemoveFunc(string ids) { var removes = ids.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(m => Convert.ToInt32(m)).ToArray(); return(FuncLiteDb.Remove(removes)); }
public object GetFunc(int id) { return(FuncLiteDb.Get(id)); }
public object GetFuncByName(string name, FuncType funcType) { return(FuncLiteDb.Get(name, funcType)); }