コード例 #1
0
ファイル: MiChkInvTest.cs プロジェクト: pengmin/BlueCloud
        public void InTest()
        {
            var ado = new AdoProxy("Data Source=.;Initial Catalog=CMIPSDB;Integrated Security=True");
            var rep = CertificateOutFactory.GetRepository(CertificateCategory.MiChkInv, ado);
            var cer = rep.GetCertificate("0001-13070300001");

            var inRep = new CertificateInRep(new AdoProxy("Data Source=.;Initial Catalog=U8DB;Integrated Security=True"));
            inRep.In(cer);
        }
コード例 #2
0
ファイル: Controller.cs プロジェクト: pengmin/BlueCloud
 public void BuildReceiptToCertificate(string receiptFlag, string[] ids)
 {
     var outAdo = this._cfg.GetReceiptAdo();
     var outRep = this._cfg.GetReceiptRepository(this._cfg.GetReceiptAdo(), receiptFlag);
     var inRep = new CertificateInRep(this._cfg.GetCertificateAdo());
     try
     {
         outAdo.Open();
         foreach (var id in ids)
         {
             var cer = outRep.GetCertificate(id);
             cer.Cbill = this._user;
             var cerId = inRep.In(cer);
             if (cerId > -1)
             {
                 outAdo.ExecuteNonQuery(string.Format("insert into History values('{0}','{1}','{2}','{3}')", id, cerId, this._user, cer.Dbill_date.Value));
             }
         }
     }
     finally
     {
         outAdo.Close();
     }
 }