public void Add(Template template) { if (list.Exists(item => item.ID == template.ID)) return; list.Add(template); }
protected override void loadFromSql() { DataTable dt = _provider.Select("Template"); foreach (DataRow row in dt.Rows) { Template template = new Template(row); Add(template); } }
public TemplateAddEdit(Template template) { InitializeComponent(); this.template = template; }