예제 #1
0
파일: frmDocType.cs 프로젝트: lexxkrt/usno
 private void новыйToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var frm = new frmDocTypeEdit(0);
     if (frm.ShowDialog() == DialogResult.OK)
     {
         docTypeBindingSource.DataSource = new DocumentTypeRepository().GetDocTypes();
     }
 }
예제 #2
0
파일: frmDocType.cs 프로젝트: lexxkrt/usno
        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();
            }
        }