Skip to content

Commit 66b5a1c

Browse files
Merge pull request #1 from GowthamGopalsamy/master
Page count Filtering
2 parents a513cfc + 745d543 commit 66b5a1c

28 files changed

+7433
-0
lines changed

OnDemandPaging/CS/Employee.cs

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
#region Copyright Syncfusion Inc. 2001 - 2018
2+
// Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
3+
// Use of this code is subject to the terms of our license.
4+
// A copy of the current license can be obtained at any time by e-mailing
5+
// licensing@syncfusion.com. Any infringement will be prosecuted under
6+
// applicable laws.
7+
#endregion
8+
using System;
9+
using System.ComponentModel;
10+
using System.ComponentModel.DataAnnotations;
11+
12+
namespace OnDemandPaging
13+
{
14+
public class NotificationObject : INotifyPropertyChanged
15+
{
16+
public void RaisePropertyChanged(string propName)
17+
{
18+
if (this.PropertyChanged != null)
19+
this.PropertyChanged(this, new PropertyChangedEventArgs(propName));
20+
}
21+
public event PropertyChangedEventHandler PropertyChanged;
22+
}
23+
24+
public class Employees : NotificationObject
25+
{
26+
private int _EmployeeID;
27+
private string _Name;
28+
private int _ContactID;
29+
private string _Title;
30+
private DateTime _BirthDate;
31+
private string _MaritalStatus;
32+
private string _Gender;
33+
private DateTime _HireDate;
34+
private double _Salary;
35+
36+
[Display(Name = "Employee ID")]
37+
public int EmployeeID
38+
{
39+
get { return this._EmployeeID; }
40+
set
41+
{
42+
this._EmployeeID = value;
43+
this.RaisePropertyChanged("EmployeeID");
44+
}
45+
}
46+
47+
public string Name
48+
{
49+
get { return this._Name; }
50+
set
51+
{
52+
this._Name = value;
53+
this.RaisePropertyChanged("Name");
54+
}
55+
}
56+
57+
public string Title
58+
{
59+
get { return this._Title; }
60+
set
61+
{
62+
this._Title = value;
63+
this.RaisePropertyChanged("Title");
64+
}
65+
}
66+
67+
[Display(Name = "Contact ID")]
68+
public int ContactID
69+
{
70+
get { return this._ContactID; }
71+
set
72+
{
73+
this._ContactID = value;
74+
this.RaisePropertyChanged("ContactID");
75+
}
76+
}
77+
78+
[Display(Name = "Birth Date")]
79+
public DateTime BirthDate
80+
{
81+
get { return this._BirthDate; }
82+
set
83+
{
84+
this._BirthDate = value;
85+
this.RaisePropertyChanged("BirthDate");
86+
}
87+
}
88+
89+
90+
[Display(Name = "Marital Status")]
91+
public string MaritalStatus
92+
{
93+
get { return this._MaritalStatus; }
94+
set
95+
{
96+
this._MaritalStatus = value;
97+
this.RaisePropertyChanged("MaritalStatus");
98+
}
99+
}
100+
101+
public string Gender
102+
{
103+
get { return this._Gender; }
104+
set
105+
{
106+
this._Gender = value;
107+
this.RaisePropertyChanged("Gender");
108+
}
109+
}
110+
111+
[Display(Name = "Hired Date")]
112+
public DateTime HiredDate
113+
{
114+
get { return this._HireDate; }
115+
set
116+
{
117+
this._HireDate = value;
118+
this.RaisePropertyChanged("HiredDate");
119+
}
120+
}
121+
122+
[DataType(DataType.Currency)]
123+
public double Salary
124+
{
125+
get { return this._Salary; }
126+
set
127+
{
128+
this._Salary = value;
129+
this.RaisePropertyChanged("Salary");
130+
}
131+
}
132+
}
133+
}
Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
#region Copyright Syncfusion Inc. 2001 - 2018
2+
// Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
3+
// Use of this code is subject to the terms of our license.
4+
// A copy of the current license can be obtained at any time by e-mailing
5+
// licensing@syncfusion.com. Any infringement will be prosecuted under
6+
// applicable laws.
7+
#endregion
8+
using System;
9+
using System.Collections.Generic;
10+
using System.Collections.ObjectModel;
11+
using System.Linq;
12+
13+
namespace OnDemandPaging
14+
{
15+
class EmployeeInfoRespository
16+
{
17+
public EmployeeInfoRespository()
18+
{
19+
PopulateData();
20+
}
21+
22+
Random r = new Random();
23+
Dictionary<string, string> loginID = new Dictionary<string, string>();
24+
Dictionary<string, string> gender = new Dictionary<string, string>();
25+
26+
public List<Employees> GetEmployeesDetails_List(int count)
27+
{
28+
var employees = new List<Employees>();
29+
for (var i = 1; i < count; i++)
30+
{
31+
employees.Add(GetEmployees(i));
32+
}
33+
return employees;
34+
}
35+
36+
private Employees GetEmployees(int i)
37+
{
38+
var name = employeeName[r.Next(employeeName.Count() - 1)];
39+
return new Employees()
40+
{
41+
EmployeeID = 1000 + i,
42+
Name = name,
43+
ContactID = r.Next(1001, 2000),
44+
Gender = gender[name],
45+
Title = title[r.Next(title.Count() - 1)],
46+
MaritalStatus = r.Next(10, 60) % 2 == 0 ? "Single" : "Married",
47+
HiredDate = new DateTime(r.Next(1995, 2005), r.Next(1, 12), r.Next(1, 28)),
48+
BirthDate = new DateTime(r.Next(1975, 1985), r.Next(1, 12), r.Next(1, 28)),
49+
Salary = Math.Round(r.NextDouble() * 6000.5, 2)
50+
};
51+
}
52+
53+
private void PopulateData()
54+
{
55+
gender.Add("Sean Jacobson", "Male");
56+
gender.Add("Phyllis Allen", "Male");
57+
gender.Add("Marvin Allen", "Male");
58+
gender.Add("Michael Allen", "Male");
59+
gender.Add("Cecil Allison", "Male");
60+
gender.Add("Oscar Alpuerto", "Male");
61+
gender.Add("Sandra Altamirano", "Female");
62+
gender.Add("Selena Alvarad", "Female");
63+
gender.Add("Emilio Alvaro", "Female");
64+
gender.Add("Maxwell Amland", "Male");
65+
gender.Add("Mae Anderson", "Male");
66+
gender.Add("Ramona Antrim", "Female");
67+
gender.Add("Sabria Appelbaum", "Male");
68+
gender.Add("Hannah Arakawa", "Male");
69+
gender.Add("Kyley Arbelaez", "Male");
70+
gender.Add("Tom Johnston", "Female");
71+
gender.Add("Thomas Armstrong", "Female");
72+
gender.Add("John Arthur", "Male");
73+
gender.Add("Chris Ashton", "Female");
74+
gender.Add("Teresa Atkinson", "Male");
75+
gender.Add("John Ault", "Male");
76+
gender.Add("Robert Avalos", "Male");
77+
gender.Add("Stephen Ayers", "Male");
78+
gender.Add("Phillip Bacalzo", "Male");
79+
gender.Add("Gustavo Achong", "Male");
80+
gender.Add("Catherine Abel", "Male");
81+
gender.Add("Kim Abercrombie", "Male");
82+
gender.Add("Humberto Acevedo", "Male");
83+
gender.Add("Pilar Ackerman", "Male");
84+
gender.Add("Frances Adams", "Female");
85+
gender.Add("Margar Smith", "Male");
86+
gender.Add("Carla Adams", "Male");
87+
gender.Add("Jay Adams", "Male");
88+
gender.Add("Ronald Adina", "Female");
89+
gender.Add("Samuel Agcaoili", "Male");
90+
gender.Add("James Aguilar", "Female");
91+
gender.Add("Robert Ahlering", "Male");
92+
gender.Add("Francois Ferrier", "Male");
93+
gender.Add("Kim Akers", "Male");
94+
gender.Add("Lili Alameda", "Female");
95+
gender.Add("Amy Alberts", "Male");
96+
gender.Add("Anna Albright", "Female");
97+
gender.Add("Milton Albury", "Male");
98+
gender.Add("Paul Alcorn", "Male");
99+
gender.Add("Gregory Alderson", "Male");
100+
gender.Add("J. Phillip Alexander", "Male");
101+
gender.Add("Michelle Alexander", "Male");
102+
gender.Add("Daniel Blanco", "Male");
103+
gender.Add("Cory Booth", "Male");
104+
gender.Add("James Bailey", "Female");
105+
106+
loginID.Add("Sean Jacobson", "sean2");
107+
loginID.Add("Phyllis Allen", "phyllis0");
108+
loginID.Add("Marvin Allen", "marvin0");
109+
loginID.Add("Michael Allen", "michael10");
110+
loginID.Add("Cecil Allison", "cecil0");
111+
loginID.Add("Oscar Alpuerto", "oscar0");
112+
loginID.Add("Sandra Altamirano", "sandra1");
113+
loginID.Add("Selena Alvarad", "selena0");
114+
loginID.Add("Emilio Alvaro", "emilio0");
115+
loginID.Add("Maxwell Amland", "maxwell0");
116+
loginID.Add("Mae Anderson", "mae0");
117+
loginID.Add("Ramona Antrim", "ramona0");
118+
loginID.Add("Sabria Appelbaum", "sabria0");
119+
loginID.Add("Hannah Arakawa", "hannah0");
120+
loginID.Add("Kyley Arbelaez", "kyley0");
121+
loginID.Add("Tom Johnston", "tom1");
122+
loginID.Add("Thomas Armstrong", "thomas1");
123+
loginID.Add("John Arthur", "john6");
124+
loginID.Add("Chris Ashton", "chris3");
125+
loginID.Add("Teresa Atkinson", "teresa0");
126+
loginID.Add("John Ault", "john7");
127+
loginID.Add("Robert Avalos", "robert2");
128+
loginID.Add("Stephen Ayers", "stephen1");
129+
loginID.Add("Phillip Bacalzo", "phillip0");
130+
loginID.Add("Gustavo Achong", "gustavo0");
131+
loginID.Add("Catherine Abel", "catherine0");
132+
loginID.Add("Kim Abercrombie", "kim2");
133+
loginID.Add("Humberto Acevedo", "humberto0");
134+
loginID.Add("Pilar Ackerman", "pilar1");
135+
loginID.Add("Frances Adams", "frances0");
136+
loginID.Add("Margar Smith", "margaret0");
137+
loginID.Add("Carla Adams", "carla0");
138+
loginID.Add("Jay Adams", "jay1");
139+
loginID.Add("Ronald Adina", "ronald0");
140+
loginID.Add("Samuel Agcaoili", "samuel0");
141+
loginID.Add("James Aguilar", "james2");
142+
loginID.Add("Robert Ahlering", "robert1");
143+
loginID.Add("Francois Ferrier", "françois1");
144+
loginID.Add("Kim Akers", "kim3");
145+
loginID.Add("Lili Alameda", "lili0");
146+
loginID.Add("Amy Alberts", "amy1");
147+
loginID.Add("Anna Albright", "anna0");
148+
loginID.Add("Milton Albury", "milton0");
149+
loginID.Add("Paul Alcorn", "paul2");
150+
loginID.Add("Gregory Alderson", "gregory0");
151+
loginID.Add("J. Phillip Alexander", "jphillip0");
152+
loginID.Add("Michelle Alexander", "michelle0");
153+
loginID.Add("Daniel Blanco", "daniel0");
154+
loginID.Add("Cory Booth", "cory0");
155+
loginID.Add("James Bailey", "james3");
156+
}
157+
158+
private string[] title = new string[]
159+
{
160+
"Marketing Assistant",
161+
"Engineering Manager",
162+
"Senior Tool Designer",
163+
"Tool Designer",
164+
"Marketing Manager",
165+
"Production Supervisor - WC60",
166+
"Production Technician - WC10",
167+
"Design Engineer",
168+
"Production Technician - WC10",
169+
"Design Engineer",
170+
"Vice President of Engineering",
171+
"Production Technician - WC10",
172+
"Production Supervisor - WC50",
173+
"Production Technician - WC10",
174+
"Production Supervisor - WC60",
175+
"Production Technician - WC10",
176+
"Production Supervisor - WC60",
177+
"Production Technician - WC10",
178+
"Production Technician - WC30",
179+
"Production Control Manager",
180+
"Production Technician - WC45",
181+
"Production Technician - WC45",
182+
"Production Technician - WC30",
183+
"Production Supervisor - WC10",
184+
"Production Technician - WC20",
185+
"Production Technician - WC40",
186+
"Network Administrator",
187+
"Production Technician - WC50",
188+
"Human Resources Manager",
189+
"Production Technician - WC40",
190+
"Production Technician - WC30",
191+
"Production Technician - WC30",
192+
"Stocker",
193+
"Shipping and Receiving Clerk",
194+
"Production Technician - WC50",
195+
"Production Technician - WC60",
196+
"Production Supervisor - WC50",
197+
"Production Technician - WC20",
198+
"Production Technician - WC45",
199+
"Quality Assurance Supervisor",
200+
"Information Services Manager",
201+
"Production Technician - WC50",
202+
"Master Scheduler",
203+
"Production Technician - WC40",
204+
"Marketing Specialist",
205+
"Recruiter",
206+
"Production Technician - WC50",
207+
"Maintenance Supervisor",
208+
"Production Technician - WC30",
209+
};
210+
211+
private string[] employeeName = new string[]
212+
{
213+
"Sean Jacobson",
214+
"Phyllis Allen",
215+
"Marvin Allen",
216+
"Michael Allen",
217+
"Cecil Allison",
218+
"Oscar Alpuerto",
219+
"Sandra Altamirano",
220+
"Selena Alvarad",
221+
"Emilio Alvaro",
222+
"Maxwell Amland",
223+
"Mae Anderson",
224+
"Ramona Antrim",
225+
"Sabria Appelbaum",
226+
"Hannah Arakawa",
227+
"Kyley Arbelaez",
228+
"Tom Johnston",
229+
"Thomas Armstrong",
230+
"John Arthur",
231+
"Chris Ashton",
232+
"Teresa Atkinson",
233+
"John Ault",
234+
"Robert Avalos",
235+
"Stephen Ayers",
236+
"Phillip Bacalzo",
237+
"Gustavo Achong",
238+
"Catherine Abel",
239+
"Kim Abercrombie",
240+
"Humberto Acevedo",
241+
"Pilar Ackerman",
242+
"Frances Adams",
243+
"Margar Smith",
244+
"Carla Adams",
245+
"Jay Adams",
246+
"Ronald Adina",
247+
"Samuel Agcaoili",
248+
"James Aguilar",
249+
"Robert Ahlering",
250+
"Francois Ferrier",
251+
"Kim Akers",
252+
"Lili Alameda",
253+
"Amy Alberts",
254+
"Anna Albright",
255+
"Milton Albury",
256+
"Paul Alcorn",
257+
"Gregory Alderson",
258+
"J. Phillip Alexander",
259+
"Michelle Alexander",
260+
"Daniel Blanco",
261+
"Cory Booth",
262+
"James Bailey"
263+
};
264+
}
265+
}

0 commit comments

Comments
 (0)