コード例 #1
0
        public void InsertTransfer(Guid tenant, Guid transfer, string status, Guid fromAccount, Guid toAccount, decimal amount)
        {
            using (var db = new QueryDbContext(DatabaseConnectionString))
            {
                var summary = new TransferSummary
                {
                    TenantIdentifier      = tenant,
                    TransferIdentifier    = transfer,
                    TransferStatus        = status,
                    TransferAmount        = amount,
                    FromAccountIdentifier = fromAccount,
                    ToAccountIdentifier   = toAccount
                };
                db.TransferSummaries.Add(summary);
                db.SaveChanges();
            }

            Denormalize();
        }
コード例 #2
0
ファイル: INCCKnew.cs プロジェクト: hnordquist/INCC6
 public static unsafe TransferSummary ConstructSummary(INCCTransferFile itf, int index)
 {
     TransferSummary t = new TransferSummary();
     results_rec results = itf.results_rec_list[0];
     t.path = itf.Path;
     t.det = TransferUtils.str(results.results_detector_id, INCC.MAX_DETECTOR_ID_LENGTH);
     t.stratum = TransferUtils.str(results.stratum_id, INCC.MAX_STRATUM_ID_LENGTH);
     t.item = TransferUtils.str(results.item_id, INCC.MAX_ITEM_ID_LENGTH);
     t.dto = INCC.DateTimeFrom(TransferUtils.str(results.meas_date, INCC.DATE_TIME_LENGTH), TransferUtils.str(results.meas_time, INCC.DATE_TIME_LENGTH));
     t.comment = TransferUtils.str(results.comment, INCC.MAX_COMMENT_LENGTH);
     t.material = TransferUtils.str(results.results_item_type, INCC.MAX_ITEM_TYPE_LENGTH);
     t.meastype = (AssaySelector.MeasurementOption)results.meas_option;
     t.select = false;
     t.index = index;
     return t;
 }