private void CopyActivityType(OActivityType source, ActivityTypeObjWrapper target) { target.Id = source.Id; if (this.IsEditMode) { target.Code = source.Code; target.Name = source.Name; } }
public void SetActivityType(OActivityType activityType) { _edtActivityType = activityType; if (_isEditMode) { this.CreatedDateTime = activityType.CrtDateTime.ToString("dd/MM/yyyy hh:mm:ss tt"); this.LastModifiedDateTime = activityType.MdfDateTime.ToString("dd/MM/yyyy hh:mm:ss tt"); this.CreatedUser = activityType.CrtUsrName; this.LastModifiedUser = activityType.MdfUsrName; } if (this.WrapperObj != null) { this.WrapperObj.ErrorsChanged -= RaiseCanExecuteChanged; this.WrapperObj.Save -= OnSave; } this.WrapperObj = new ActivityTypeObjWrapper(); this.WrapperObj.ErrorsChanged += RaiseCanExecuteChanged; this.WrapperObj.Save += OnSave; this.WrapperObj.IsCodeFocused = true; CopyActivityType(activityType, this.WrapperObj); }
private void UpdateActivityType(ActivityTypeObjWrapper source, OActivityType target) { target.Code = source.Code; target.Name = source.Name; }
public void ClearActivityType() { _edtActivityType = null; _activityType = null; }