protected override void OnChanged(string propertyName, object oldValue, object newValue) { base.OnChanged(propertyName, oldValue, newValue); if (!IsLoading) { if (propertyName == nameof(ExpenseDate) && oldValue != newValue) { Period = BasePeriod.GetOpenedPeriodForDate(ObjectSpace, ExpenseDate); } } }
protected override void OnChanged(string propertyName, object oldValue, object newValue) { base.OnChanged(propertyName, oldValue, newValue); if (!IsLoading) { if (propertyName == nameof(Employee) && oldValue != newValue) { CardHourPrice = Employee != null && Employee.ContractType.SalaryType == EnumSalaryType.Hourly ? Employee.SalaryPerHour : 0; HourPrice = Employee != null && Employee.ContractType.SalaryType == EnumSalaryType.Hourly ? Employee.SalaryPerHour : 0; Shop = (Employee != null && Employee.DefaultShop != null) ? Employee.DefaultShop : null; } if (propertyName == nameof(ExpenseDate) && oldValue != newValue) { Period = BasePeriod.GetOpenedPeriodForDate(ObjectSpace, ExpenseDate); } } }
protected override void OnChanged(string propertyName, object oldValue, object newValue) { base.OnChanged(propertyName, oldValue, newValue); if (!IsLoading) { if (propertyName == nameof(TransactionDate) && oldValue != newValue) { Period = BasePeriod.GetOpenedPeriodForDate(ObjectSpace, TransactionDate); } if (propertyName == nameof(TransactionDate) || propertyName == nameof(Shop) || propertyName == nameof(Period) || oldValue != newValue) { OnMasterDataChanged(); } } }
protected override void OnChanged(string propertyName, object oldValue, object newValue) { base.OnChanged(propertyName, oldValue, newValue); if (!IsLoading) { if (propertyName == nameof(TransactionDate) && oldValue != newValue) { Period = BasePeriod.GetOpenedPeriodForDate(ObjectSpace, TransactionDate); } if (propertyName == nameof(TransactionDate) || propertyName == nameof(Shop) || propertyName == nameof(Period) || (this is InventoryTransfer && propertyName == "Destination") && oldValue != newValue) { UpdateItems(); } } }
/// <summary> /// Save the General.Global.ShowInformationTypes settings to the settings file /// </summary> /// <param name="infoNode">XML-node for the General.Global.ShowInformationTypes settings</param> public void Save(XmlNode infoNode) { string xpath; xpath = "./officialStatistics"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, OfficialStatistics.ToString()); xpath = "./unit"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Unit.ToString()); xpath = "./contact"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Contact.ToString()); xpath = "./lastUpdated"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, LastUpdated.ToString()); xpath = "./refPeriod"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, RefPeriod.ToString()); xpath = "./stockFA"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, StockFa.ToString()); xpath = "./cfPrices"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, CFPrices.ToString()); xpath = "./dayADj"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, DayAdj.ToString()); xpath = "./seasAdj"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, SeasAdj.ToString()); xpath = "./basePeriod"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, BasePeriod.ToString()); xpath = "./updateFrequency"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, UpdateFrequency.ToString()); xpath = "./nextUpdate"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, NextUpdate.ToString()); xpath = "./survey"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Survey.ToString()); xpath = "./link"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Link.ToString()); xpath = "./creationDate"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, CreationDate.ToString()); xpath = "./copyright"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Copyright.ToString()); xpath = "./source"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Source.ToString()); xpath = "./matrix"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Matrix.ToString()); xpath = "./database"; SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Database.ToString()); }