public void SaveOrUpdateEmployee()
        {
            Employee employee = null;

            if (CurrentAppUser.Employee == null)
            {
                employee = new Employee();
            }
            else
            {
                employee = CurrentAppUser.Employee;
            }
            employee.FirstName     = View.GetFirstName;
            employee.LastName      = View.GetLastName;
            employee.Gender        = View.GetGender;
            employee.DateOfBirth   = View.GetDateOfBirth;
            employee.MaritalStatus = View.GetMaritalStatus;
            employee.Nationality   = View.GetNationality;
            employee.Address       = View.GetAddress;
            employee.City          = View.GetCity;
            employee.Country       = View.GetCountry;
            employee.Phone         = View.GetPhone;
            employee.CellPhone     = View.GetCellPhone;
            employee.PersonalEmail = View.GetPersonalEmail;
            employee.Status        = true;
            employee.ChaiEMail     = View.GetChaiEmail;
            if (employee.Id <= 0)
            {
                employee.SDLeaveBalance   = 0;
                employee.LeaveSettingDate = DateTime.Now.Date;
            }
            employee.Photo                  = View.GetPhoto;
            CurrentAppUser.Employee         = employee;
            CurrentAppUser.Employee.AppUser = CurrentAppUser;

            _controller.SaveOrUpdateEntity(CurrentAppUser);
            _controller.CurrentObject = null;
        }
Exemplo n.º 2
0
 public void SaveOrUpdateEmployeeActivity(Employee employeeactivity)
 {
     _controller.SaveOrUpdateEntity(employeeactivity);
 }