private void UpdateBonusCashDict(ComboBoxWithDefault sender, TupleDictionary <PropositionType, BonusPercent, BonusIndex> dict) { string changed = sender.Tag.ToString(); string[] sides = changed.Split('.'); string errandType = sides[0]; string percentage = sides[1]; BonusPercent percent = (BonusPercent)Enum.Parse(typeof(BonusPercent), percentage); PropositionType type = (PropositionType)Enum.Parse(typeof(PropositionType), errandType); dict[type, percent] = (BonusIndex)(sender.SelectedIndex); }
private void SetValuesBonusCashComboBoxes( TupleDictionary <PropositionType, BonusPercent, BonusIndex> dict, TupleDictionary <PropositionType, BonusPercent, BonusIndex> def, IList <ComboBoxWithDefault> boxes) { foreach (var box in boxes) { string tag = box.Tag.ToString(); string[] sides = tag.Split('.'); string errandType = sides[0]; string percentage = sides[1]; PropositionType type = (PropositionType)Enum.Parse(typeof(PropositionType), errandType); BonusPercent percent = (BonusPercent)Enum.Parse(typeof(BonusPercent), percentage); box.SetIndexAndDefault((int)dict[type, percent], (int)def[type, percent]); } }
public override string ToString() { var content = "Id =" + Id + Environment.NewLine + "Parent Id =" + ParentId + Environment.NewLine + "Check Balance Required =" + CheckBalanceRequired + Environment.NewLine + "To Role Id =" + ToRole.Id + Environment.NewLine + "To Role Name =" + ToRole.Name + Environment.NewLine + "Min Value=" + MinValue.ToString("N0") + Environment.NewLine + "Max Value =" + MaxValue.ToString("N0") + Environment.NewLine + "Tax Per =" + TaxPercent.ToString("N2") + Environment.NewLine + "Bonus Per =" + BonusPercent.ToString("N2") + Environment.NewLine + "Bonus Tax Per =" + BonusTaxPercent.ToString("N2") + Environment.NewLine + "Fixed Factor =" + FixedFactor.ToString("N6") + Environment.NewLine + "Created On=" + CreatedOn.ToString("yyyy/MM/dd H:mm:ss") + Environment.NewLine + "Created By=" + CreatedBy.Id + Environment.NewLine + "Created By Account=" + CreatedBy.Account + Environment.NewLine + "Last Edit On=" + LastEditOn.ToString("yyyy/MM/dd H:mm:ss"); return(content); }