Esempio n. 1
0
        private static void Main()
        {
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            using ApplicationDbContext dataAccess = LibDataAccess.CreateDataAccess(Config);
            IImportData infoImport;

            infoImport = new ACCFTTImport(dataAccess); infoImport.ExecuteImport();
            infoImport = new ReceiptInfoImportBANK(dataAccess); infoImport.ExecuteImport();
            infoImport = new ReceiptInfoImportPOST(dataAccess); infoImport.ExecuteImport();
            infoImport = new ReceiptInfoImportMARKET(dataAccess); infoImport.ExecuteImport();
            //infoImport = new ReceiptInfoImportMARKETSPI(dataAccess); infoImport.ExecuteImport();
            //infoImport = new ReceiptInfoImportFARM(dataAccess); infoImport.ExecuteImport();
            infoImport = new RemitInfoImport(dataAccess); infoImport.ExecuteImport();
        }
Esempio n. 2
0
 /// <summary>
 /// 紀錄操作日誌
 /// </summary>
 /// <param name="userId"></param>
 /// <param name="ip"></param>
 /// <param name="browser"></param>
 /// <param name="progId"></param>
 /// <param name="pk"></param>
 /// <param name="action"></param>
 public static void SetOperateLog(string userId, string ip, string browser, string progId, string pk, string action, string memo)
 {
     try
     {
         using ApplicationDbContext dataAccess = LibDataAccess.CreateDataAccess();
         dataAccess.OperateLog.Add(new OperateLog()
         {
             UserId      = userId,
             IP          = ip,
             Browser     = browser,
             ProgId      = progId,
             PK          = pk,
             OperateTime = DateTime.Now,
             Action      = action,
             Memo        = memo,
         });
         dataAccess.SaveChanges();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
         throw ex;
     }
 }
Esempio n. 3
0
 public void CreateDataAccess()
 {
     DataAccess = LibDataAccess.CreateDataAccess();
 }