Ejemplo n.º 1
0
 /// <summary>
 /// Utility ctor
 /// </summary>
 public UpsertInfo(ref RMWInfo rmwInfo)
 {
     this.SessionType = rmwInfo.SessionType;
     this.Version     = rmwInfo.Version;
     this.Address     = rmwInfo.Address;
     this.RecordInfo  = default;
     this.Action      = UpsertAction.Default;
 }
Ejemplo n.º 2
0
        public UpsertEmployeeCommand(UpsertEmployeeViewModel upsertEmployeeViewModel, IEmployeeRepository employeeRepo, UpsertAction upsertAction, IRenavigator renavigator)
        {
            _employeeRepo            = employeeRepo;
            _upsertEmployeeViewModel = upsertEmployeeViewModel;
            _renavigator             = renavigator;
            _upsertAction            = upsertAction;

            upsertEmployeeViewModel.PropertyChanged += CreateCompanyViewModel_PropertyChanged;
        }
        public UpsertCompanyCommand(UpsertCompanyViewModel addCompanyViewModel, ICompanyRepository compRepo, UpsertAction upsertAction, IRenavigator renavigator)
        {
            _compRepo            = compRepo;
            _addCompanyViewModel = addCompanyViewModel;
            _renavigator         = renavigator;
            _upsertAction        = upsertAction;

            _addCompanyViewModel.PropertyChanged += CreateCompanyViewModel_PropertyChanged;
        }
Ejemplo n.º 4
0
 /// <summary>Gets the stored proc flag for the specified upsert action</summary>
 /// <param name="upsertAction">The upsert action.</param>
 /// <returns>char</returns>
 public static char GetUpsertValue(UpsertAction upsertAction)
 {
     // ASSUME: There is only update 'U' and insert 'I'
     return((upsertAction == UpsertAction.Insert) ? 'I' : 'U');
 }