Author Archives: jinweijie

Entity Framework Generic Repository

Introduction A generic Entity Framework repository pattern implementation. Code https://github.com/jinweijie/EF.GenericRepository Usage Unzip Database\Database.7z, attach to LocalDB, or restore to your favoriate Sql Server instance and change the connection string in App.Config. Open solution and run the application. Base Repository The base repository exists in Common\AbstractRepository.cs, it handles the basic CRUD operations, for example, methods like… Read More »

Dapper Custom Pagination Sample

Introduction Sample for custom pagination using Dapper. Supporting sorting + criteria + pagination. Source Code https://github.com/jinweijie/Dapper.PagingSample Usage Unzip Database\Database.7z, attach to LocalDB, or restore to your favoriate Sql Server instance and change the connection string in App.Config. Open solution and run the application. Caller sample: Tuple<IEnumerable<Log>, int> Find(LogSearchCriteria criteria , int pageIndex , int pageSize… Read More »

How to print Chinese characters in ZPL

1. You need to have Chinese font on the printer, use Zebra font downloader application to install. 2. The is a sample code to print Chinese characters: ^XA ^CI28 ^A@N,50,50,E:SIMSUN.FNT ^FO50,110^FDChinese 中文字符^FS ^XZ Another format can be: ^XA ^CI28 ^CWA,E:SIMSUN.FNT ^FO240,30^AAN,36,36^FDChinese 中文字符^FS ^XZ Use CW command to change font, so that you need only to… Read More »

Category: zpl

Hide Back Button of Modern UI for WPF

I searched the web seems no answer for this topic, so i create a style to hide the button: <Style TargetType=”{x:Type mui:ModernButton}”> <Style.Triggers> <Trigger Property=”Command” Value=”NavigationCommands.BrowseBack”> <Setter Property=”Visibility” Value=”Collapsed” /> </Trigger> </Style.Triggers> </Style> Hope it helps.

Category: wpf

Pluralsight Continuous Play User Scripts

By default, it will stop after each module when you studying on Pluralsight. If you want to save the mouse click to automatically view the next module. You can use the following methods. Install Greasemonkey addon for firefox: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Install my user scripts: http://userscripts.org/scripts/show/485571 Now when you reach each end of module, the next module… Read More »

Fix Hyper-V Time Synchronization Issue

We’re running Windows Server 2008 R2 for host and Windows Server 2008 R2 as a virtual machine using Hyper-V. For some reason, the time synchronization doesn’t work well. No matter we disable the hyper-v time synchronization option on the host side or enable it. After the gap is more than 5 seconds, some issues will… Read More »