admin

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

196 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); …

Read More »

Payroll Tables in sql database

198 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 …

Read More »

Calculate time difference for attendance

223 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 …

Read More »

C Sharp DataGridView Database Operations

338 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 …

Read More »

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

141783 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 …

Read More »

Encrypt and Decrypt Using Class

406 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 …

Read More »

Encrypt and Decrypt with Character Choice

240 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 = …

Read More »

Encrypting & Decrypting a String in C#

282 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, …

Read More »

print RDLC direct without reportviewer

351 Viewsevery body i have a windows form with gridview which bind from datatable and i have adataset which gets values from datatable it works fine and i try it in reportviewer it works correctly but how can i print RDLC direct without reportviewer report.render( image deviceinfo addressof createstream warnings)  …

Read More »
Skip to toolbar