public IEnumerable SelectMethodHandler() { CustomResourceList result = new CustomResourceList(); result.AddRange(Resources); return(result); }
public static void FillObjectDataSourceWithResources(CustomResourceList list, int count) { for (int i = 1; i <= count; i++) { list.Add(new CustomResource(Usernames[i - 1], Users[i - 1])); } }
public void AddRange(CustomResourceList resources) { foreach (CustomResource customResource in resources) { this.Add(customResource); } }
void PopulateResourceList(CustomResourceList resources) { resources.Add(CreateCustomResource(1, "SL500 Roadster")); resources.Add(CreateCustomResource(2, "CLK55 AMG Cabriolet")); resources.Add(CreateCustomResource(3, "C230 Kompressor Sport Coupe")); resources.Add(CreateCustomResource(4, "530i")); resources.Add(CreateCustomResource(5, "Corniche")); }
public CustomResourceDataSource(CustomResourceList resources) { if (resources == null) { DevExpress.XtraScheduler.Native.Exceptions.ThrowArgumentNullException("resources"); } this.resources = resources; }
void PopulateResourceList(CustomResourceList resources) { int count = resourceIdList.Length; for(int i = 0; i < count; i++) { CustomResource resource = new CustomResource(); resource.Id = resourceIdList[i]; resource.Caption = resourceCaptionList[i]; resources.Add(resource); } }
CustomResourceList GetCustomResources() { string sessionName = "R" + SessionName; CustomResourceList resources = Session[sessionName] as CustomResourceList; if(resources != null) return resources; resources = new CustomResourceList(); PopulateResourceList(resources); Session[sessionName] = resources; return resources; }
public static CustomResourceList CreateCustomResurces() { CustomResourceList resources = new CustomResourceList(); resources.Add(CreateCustomResource(1, "SL500 Roadster")); resources.Add(CreateCustomResource(2, "CLK55 AMG Cabriolet")); resources.Add(CreateCustomResource(3, "C230 Kompressor Sport Coupe")); resources.Add(CreateCustomResource(4, "530i")); resources.Add(CreateCustomResource(5, "Corniche")); return resources; }
public static CustomResourceList CreateCustomResurces() { CustomResourceList resources = new CustomResourceList(); resources.Add(CreateCustomResource(1, "SL500 Roadster")); resources.Add(CreateCustomResource(2, "CLK55 AMG Cabriolet")); resources.Add(CreateCustomResource(3, "C230 Kompressor Sport Coupe")); resources.Add(CreateCustomResource(4, "530i")); resources.Add(CreateCustomResource(5, "Corniche")); return(resources); }
CustomResourceList GetCustomResources() { CustomResourceList resources = Session["CustomResourceListData"] as CustomResourceList; if (resources == null) { resources = new CustomResourceList(); ResourceHelper.FillObjectDataSourceWithResources(resources, 3); Session["CustomResourceListData"] = resources; } return(resources); }
protected CustomResourceList GetCustomResources() { CustomResourceList resources = Session[CustomResourcesSessionName] as CustomResourceList; if (resources != null) { return(resources); } resources = CreateCustomResurces(); Session[CustomResourcesSessionName] = resources; return(resources); }
protected CustomResourceList GetCustomResources() { CustomResourceList resources = Session[CustomResourcesSessionName] as CustomResourceList; if (resources != null) { return(resources); } resources = new CustomResourceList(); PopulateResourceList(resources); Session[CustomResourcesSessionName] = resources; return(resources); }
protected void temporaryResourceDataSource_ObjectCreated(object sender, ObjectDataSourceEventArgs e) { CustomResourceList resources = GetCustomResources(); e.ObjectInstance = new CustomResourceDataSource(resources); }