コード例 #1
0
		public List<EmployeeInfo> GetEmployeeDetails (int count)
		{
			List<EmployeeInfo> employeeDetails = new List<EmployeeInfo> ();

			for (int i = 1; i <= count; i++) {
				var ord = new EmployeeInfo () {
					EmployeeID = EmployeeID [random.Next (15)],
					Name = Customers [random.Next (15)],
					Age=Age[random.Next(10)],
					Company = Company [random.Next(10)],
					Title = Title [random.Next (10)],
					Salary = Salary[random.Next (13)],
					Bonus=Bonus[random.Next(7)]
				};
				employeeDetails.Add (ord);
			}
			return employeeDetails;
		}
コード例 #2
0
		public List<EmployeeInfo> GetEmployeeDetails (int count)
		{
			this.EmployeeDates = GetDateBetween (2000, 2014, count);
			List<EmployeeInfo> employeeDetails = new List<EmployeeInfo> ();

			for (int i = 1; i <= count; i++) {
				var ord = new EmployeeInfo () {
					EmployeeID = EmployeeID [random.Next (15)],
					Name = Customers [random.Next (15)],
					Age = Age [random.Next (10)],
					Company = Company [random.Next (10)],
					Title = Title [random.Next (10)],
					Salary = Salary [random.Next (13)],
					Bonus = Bonus [random.Next (7)],
					IsAvailable = ((i % random.Next (1, 10) > 5) ? true : false),
					DOJ = this.EmployeeDates [i - 1],
					ImageName = getImageName (random.Next (0, 2)),
				};
				employeeDetails.Add (ord);
			}
			return employeeDetails;
		}