public void Add(Policy policy) { if (list.Exists(item => item == policy)) return; list.Add(policy); }
public Policy_AddEdit(Policy policy) { InitializeComponent(); _loadCompleted = false; _policy = policy; }
private double GetSum(Policy policy, Account account) { return (account.IsPolicyKaskoAndPayment2()) ? policy.Pay2ToDouble : policy.PayToDouble; }
protected override void loadFromSql() { DataTable dt = _provider.Select("Policy"); clearList(); foreach (DataRow row in dt.Rows) { Policy policy = new Policy(row); Add(policy); } }