public void SetEmployee(OEmployee emp)
        {
            _edtEmployee = emp;

            if (_isEditMode)
            {
                this.CreatedUser          = emp.CrtUsrName;
                this.CreatedDateTime      = emp.CrtDateTime.ToString("dd/MM/yyyy hh:mm:ss tt");
                this.LastModifiedUser     = emp.MdfUsrName;
                this.LastModifiedDateTime = emp.MdfDateTime.ToString("dd/MM/yyyy hh:mm:ss tt");
            }

            if (this.WrapperObj != null)
            {
                this.WrapperObj.ErrorsChanged -= RaiseCanExecuteChanged;
                this.WrapperObj.Save          -= OnSave;
            }
            this.WrapperObj = new EmployeeObjWrapper();
            this.WrapperObj.ErrorsChanged      += RaiseCanExecuteChanged;
            this.WrapperObj.Save               += OnSave;
            this.WrapperObj.IsEmployeeIDFocused = true;
            CopyEmployee(emp, this.WrapperObj);
        }
Beispiel #2
0
 public EOperation()
 {
     EmployeeDb = new OEmployee();
 }
 public void ClearEmployee()
 {
     _edtEmployee = null;
     _Employee    = null;
 }
 public EmployeeObjWrapper()
 {
     _allDepts       = OEmployee.GetAllDepts();
     _allFunctions   = OEmployee.GetAllFunctions();
     EnterKeyCommand = new RelayCommand <string>(OnEnterKeyPress);
 }