Beispiel #1
0
 public void UpdateEmployee(Models.Employee employee)
 {
     EmployeeDirectory.Employee employeeModel = AutoMap.Mapper.Map <Models.Employee, EmployeeDirectory.Employee>(employee);
     employeeModel.ModifyAuditFieldsOnUpdate <EmployeeDirectory.Employee>();
     string[] args = { "FirstName", "LastName", "Gender", "Salary", "Email", "Mobile", "Department", "Team", "Skype", "BirthDate", "JoiningDate", "Address", "ProfessionalSummary", "Image", "ModifiedBy", "ModifiedDate" };
     database.Update(employeeModel, employeeModel.ID, args);
 }
		protected Employee[] ParseEmployeeResultSet(string data)
		{

			Employee[] emp = new Employee[data["resultSet"].Count];
			emp = JsonConvert.DeserializeObject<Employee[]> (obj ["resultSet"].ToString ());

			return emp;
		}
Beispiel #3
0
 public int AddEmployee(Models.Employee employee)
 {
     EmployeeDirectory.Employee employeeModel = AutoMap.Mapper.Map <Models.Employee, EmployeeDirectory.Employee>(employee);
     if (employee.Image != null)
     {
         employeeModel.Image = employee.Image;
     }
     else
     {
         employeeModel.Image = null;
     }
     employeeModel.FillAuditFieldsOnCreate <EmployeeDirectory.Employee>();
     return((int)database.Insert(employeeModel));
 }
 public DataModel.Employee Convert(Employee selectedEmployee)
 {
     DataModel.Employee employ = Mapper.Map <DataModel.Employee>(selectedEmployee);
     return(employ);
 }
Beispiel #5
0
 public DisplayDetails(Employee employee, MainWindow window) : this()
 {
     mainWindow             = window;
     mainWindow.header.Text = "Employee Details";
     this.DataContext       = employee;
 }