public static int GetVal(int i) { List <BusParViewModel> result = new List <BusParViewModel>(); result = BusParMethod.get_BusPar().Select(bpar => new BusParViewModel { ID = bpar.ID, Code = bpar.Code, Name = bpar.Name, ValueType = bpar.ValueType }).ToList(); return(result.Find(x => x.ID == i).ValueType); }
public static DataSourceResult GetBusParDatasource([DataSourceRequest] DataSourceRequest request) { DataSourceResult result = BusParMethod.get_BusPar().ToDataSourceResult(request, busfunc => new BusParViewModel { ID = busfunc.ID, Name = busfunc.Name, Code = busfunc.Code, ValueType = busfunc.ValueType, Comment = busfunc.Comment }); return(result); }