Author Archives: admin

HTML Mobile usability website complete articles

By | March 13, 2018

60 ViewsIntroduction As the web scene turns out to be progressively intricate, it’s ending up critical to convey strong web encounters to a developing number of settings. Gratefully, responsive website architecture gives web designers a few instruments for making formats that react to any screen measure. We’ll utilize liquid matrices, adaptable pictures and media inquiries… Read More »

How to Find Previous Month’s First and Last Day C#

By | March 13, 2018

58 ViewsHere’s a simple query that gives you the first and last day of the previous month. static void Main(string[] args) { var yr = DateTime.Today.Year; var mth = DateTime.Today.Month; var firstDay = new DateTime(yr, mth, 1).AddMonths(-1); var lastDay = new DateTime(yr, mth, 1).AddDays(-1); Console.WriteLine(“First day Previous Month: {0}”, firstDay); Console.WriteLine(“Last day Previous Month: {0}”,… Read More »

Payroll Tables in sql database

By | March 13, 2018

43 ViewsCommonly Used Tables: 1 – Employee Master 2 – Address Master 3 – Tax Information Master 4– Pay Code Master 5– Deduction Master 6 – Benefit Master 7 – State Tax Master 8 – Local Tax Master 9 – Employee Summary 10 – Year End Header 11– Year End Wage 12– Work Master 13– Work Master Detail 14– Work Header 15 – Payroll… Read More »

Calculate time difference for attendance

By | March 7, 2018

53 Views I have a table with the below sample output. UserID Checktime CheckStatus 3175 2013-12-22 07:02:10.000 I 3175 2013-12-22 13:01:01.000 O 3175 2013-12-22 13:49:54.000 I 3175 2013-12-22 13:49:55.000 I 3175 2013-12-22 15:58:42.000 O 3175 2013-12-23 06:02:58.000 I 3175 2013-12-23 14:00:29.000 O 3175 2013-12-24 05:17:09.000 I 3175 2013-12-24 12:34:25.000 O 3175 2013-12-24 12:34:26.000 O I… Read More »

C Sharp DataGridView Database Operations

By | February 24, 2018

57 ViewsThe DataGridView can display data in Bound mode, unbound mode and Virtual mode . Bound mode is suitable for managing data using automatic interaction with the data store. One very common use of the DataGridView control is binding to a table in a database. Unbound mode is suitable for displaying relatively small amounts of… Read More »

How to Start, Stop, Pause, Resume, Restart SQL Server Services

By | February 19, 2018

38793 ViewsThis topic describes how to start, stop, pause, resume, or restart the SQL Server Database Engine, the SQL Server Agent, or the SQL Server Browser service by using SQL Server Configuration Manager, SQL Server Management Studio, net commands from a command prompt, Transact-SQL, or PowerShell. What is the SQL Server Database Engine service, the SQL Server… Read More »

Encrypt and Decrypt Using Class

By | February 19, 2018

62 Views public string DecryptString(string encrString) {     byte[] b;     string decrypted;     try     {         b = Convert.FromBase64String(encrString);         decrypted = System.Text.ASCIIEncoding.ASCII.GetString(b);     }     catch (FormatException fe)     {         decrypted = “”;     }     return decrypted; } public string EnryptString(string strEncrypted) {     byte[] b = System.Text.ASCIIEncoding.ASCII.GetBytes(strEncrypted);     string encrypted = Convert.ToBase64String(b);     return encrypted; } Still The above code is not enough for me because I want to do something with my choice. Then I had implemented the code with specify charter to use in Encrypt method.

Encrypt and Decrypt with Character Choice

By | February 19, 2018

44 Viewspublic string encrypt(string encryptString) { string EncryptionKey = “0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ”; byte[] clearBytes = Encoding.Unicode.GetBytes(encryptString); using(Aes encryptor = Aes.Create()) { Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); encryptor.Key = pdb.GetBytes(32); encryptor.IV = pdb.GetBytes(16); using(MemoryStream ms = new MemoryStream()) { using(CryptoStream cs… Read More »

Encrypting & Decrypting a String in C#

By | February 19, 2018

57 Viewsusing System.IO; using System.Text; using System.Security.Cryptography; public static class EncryptionHelper { public static string Encrypt(string clearText) { string EncryptionKey = “abc123”; byte[] clearBytes = Encoding.Unicode.GetBytes(clearText); using (Aes encryptor = Aes.Create()) { Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(EncryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); encryptor.Key… Read More »