protected override void OnEdit()
        {
            base.OnEdit();

            int id = (int)gvTemplates.SelectedRows[0].Cells["Id"].Value;

            var form = new CreateMatchingTemplate(FormMode.Edit, id);

            form.ShowDialog();
        }
        protected override void OnCreate()
        {
            base.OnCreate();

            var form = new CreateMatchingTemplate(FormMode.Add);

            form.ShowDialog();

            LoadTemplates();
        }