BusinessUnitBoxHandlers.cs
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Core;
using Sungero.CoreEntities;
using Sungero.ExchangeCore.BusinessUnitBox;
namespace Sungero.ExchangeCore
{
partial class BusinessUnitBoxSharedHandlers
{
public override void ConnectionStatusChanged(Sungero.Domain.Shared.EnumerationPropertyChangedEventArgs e)
{
base.ConnectionStatusChanged(e);
if (!e.Params.Contains(Constants.BoxBase.JobRunned) && !Equals(e.NewValue, e.OldValue) && Equals(e.NewValue, BusinessUnitBox.ConnectionStatus.Connected))
Functions.Module.Remote.RequeueBoxSync();
}
public override void StatusChanged(Sungero.Domain.Shared.EnumerationPropertyChangedEventArgs e)
{
base.StatusChanged(e);
Functions.BusinessUnitBox.ResetConnectionStatus(_obj);
}
public virtual void LoginChanged(Sungero.Domain.Shared.StringPropertyChangedEventArgs e)
{
Functions.BusinessUnitBox.ResetConnectionStatus(_obj);
_obj.Password = string.Empty;
}
public virtual void ExchangeServiceChanged(Sungero.ExchangeCore.Shared.BusinessUnitBoxExchangeServiceChangedEventArgs e)
{
Functions.BusinessUnitBox.SetBusinessUnitBoxName(_obj);
Functions.BusinessUnitBox.ResetConnectionStatus(_obj);
}
public virtual void BusinessUnitChanged(Sungero.ExchangeCore.Shared.BusinessUnitBoxBusinessUnitChangedEventArgs e)
{
Functions.BusinessUnitBox.SetBusinessUnitBoxName(_obj);
Functions.BusinessUnitBox.ResetConnectionStatus(_obj);
if (e.NewValue != null && e.NewValue != e.OldValue)
_obj.ExchangeService = Functions.BusinessUnitBox.Remote.GetDefaultExchangeService(_obj);
}
}
}