dot net軟體工程師的筆記

顯示具有 C Sharp 標籤的文章。 顯示所有文章
顯示具有 C Sharp 標籤的文章。 顯示所有文章

2019年9月30日 星期一

DevExpress Excel SetValue方法介紹

之前的專案 有些DataTable欄位寫入excel cell需要明確轉型,比如數字要轉Decimal ,但如果遇到DBNULL可能就要做一堆判斷或是寫擴充方法處理。

DevExpress有一個方法叫SetValue 例如

worksheet.Rows["5"][i + 1].SetValue(array[i]);

這個就會自動轉成應有的型別,可以省很多工~

 

如何比對兩個DataTable是否相同的正確方法

之前有將兩個資料比對的需求,雖然只要搜索這個關鍵字就能找到很多答案,但很多都是錯的! 感謝這個作者提供正確的程式碼,在現在網路資訊量越來越龐大的情況下,還是自己記錄一下這個寫法比較保險。

比對兩個DataTable是否相同

public bool DataTableTheSame(DataTable Table1, DataTable Table2)
        {
            if (Table1 == null || Table2 == null)
            {
                return false;
            }
            if (Table1.Rows.Count != Table2.Rows.Count)
            {
                return false;
            }
            if (Table1.Columns. Count != Table2.Columns.Count)
            {
                return false;
            }
            for (int i = 0; i < Table1.Rows.Count; i++)
            {
                for (int j = 0; j < Table1.Columns.Count; j++)
                {
                    if (Table1.Rows[i][ j].ToString() != Table2.Rows[i][j].ToString())
                    {
                        return false;
                    }
                }
            }
            return true;
        }

程式來源出處:http://www.pc6.com/infoview/Article_45538.html

2019年9月15日 星期日

ASP.NET Core開發人員RoadMap


覺得這圖還滿實用的,有些翻成台灣的習慣用語,方便日後閱讀~
點此看未壓縮的圖

  1. Prerequisites
  2. General Development Skills
    • Learn GIT, create a few repositories on GitHub, share your code with other people
    • Know HTTP(S) protocol, request methods (GET, POST, PUT, PATCH, DELETE, OPTIONS)
    • Don't be afraid of using Google, Power Searching with Google
    • Learn dotnet CLI
    • Read a few books about algorithms and data structures
  3. Dependency Injection
    1. DI Containers
    2. Life Cycles
    3. Scrutor
  4. Databases
    1. Relational
      1. SQL Server
      2. PostgreSQL
      3. MariaDB
      4. MySQL
    2. Cloud Databases
    3. Search Engines
    4. NoSQL
  5. Caching
    1. Entity Framework 2nd Level Cache
      1. EFSecondLevelCache.Core
      2. EntityFrameworkCore.Cacheable
    2. Distributed Cache
      1. Redis
      2. Memcached
    3. Memory Cache
  6. Logging
    1. Log Frameworks
    2. Log Management System
  7. Template Engines
    1. Razor
    2. DotLiquid
    3. Scriban
    4. Fluid
  8. Real-Time Communication
    1. SignalR
  9. Object Mapping
  10. API Clients
    1. REST
    2. GraphQL
  11. Good to Know
  12. Testing
    1. Unit Testing
      1. Frameworks
      2. Mocking
      3. Assertion
    2. Behavior Testing
    3. Integration Testing
    4. E2E Testing
  13. Task Scheduling
  14. MicroServices
    1. Message-Broker
    2. Message-Bus
  15. SOLID
  16. Design-Patterns

搜尋此網誌

總網頁瀏覽量

Copyright © John Coding 技術筆記 | Powered by Blogger

Design by Anders Noren | Blogger Theme by NewBloggerThemes.com

T