コード例 #1
0
ファイル: frmDocTypeEdit.cs プロジェクト: lexxkrt/usno
        private void btnOk_Click(object sender, EventArgs e)
        {
            docTypeBindingSource.EndEdit();
            var docType = docTypeBindingSource.Current as DocumentType;
            docType = new DocumentTypeRepository().Save(docType);

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
コード例 #2
0
ファイル: DocType.cs プロジェクト: lexxkrt/usno
 public static DocumentType GetById(int id)
 {
     DocumentType documentType;
     if (!_types.TryGetValue(id, out documentType))
     {
         documentType = new DocumentTypeRepository().GetDocType(id);
         _types.Add(id, documentType);
     }
     return documentType;
 }