Ejemplo n.º 1
0
 private void новыйToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var frm = new frmDocTypeEdit(0);
     if (frm.ShowDialog() == DialogResult.OK)
     {
         docTypeBindingSource.DataSource = new DocumentTypeRepository().GetDocTypes();
     }
 }
Ejemplo n.º 2
0
        private void изменитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var docType = docTypeBindingSource.Current as DocumentType;
            if (docType == null) return;

            var frm = new frmDocTypeEdit(docType.Id);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                docTypeBindingSource.DataSource = new DocumentTypeRepository().GetDocTypes();
            }
        }