private Employee GetEmployee()
 {
     Employee e = new Employee()
     {
         EmployeeName="Prabhu Singh",
         Address="Bangalore",
         DateOfBirth=new DateTime(1977,1,1),
         Salary=2000
     };
     return e;
 }
 public EmployeeViewModel(Employee emp)
 {
     EmployeeName = emp.FirstName + " " + emp.LastName;
     Salary = emp.Salary.ToString("C");
     if (emp.Salary > 15000)
     {
         SalaryColor = "yellow";
     }
     else
     {
         SalaryColor = "green";
     }
 }
Пример #3
0
 public EmployeeVM(Employee e, User u)
 {
     this.emp = e;
     this.user = u;
 }