Asp.net C#

How to display a QR code in ASP.NET and WPF

I’ve half-jokingly said that there’s never a good reason to use a QR Code. However, I’m working on an MVP (minimally viable product) for a small startup with Greg Shackles and we actually have a good reason to use one. We have a mobile device, a Web Site, and a Windows Application, and a QR Code is a prettyContinue Reading “How to display a QR code in ASP.NET and WPF”

C#

Grouping and sum with Datatable Using IEnumerable

Use for Groupping and sum with datatble Pass Datatable as dttemp var query = from r in dttemp.AsEnumerable() group r by new { StyleDetail_COLOR_NAME = r.Field<string>(“StyleDetail_COLOR_NAME”), StyleDetail_QLY_NAME = r.Field<string>(“StyleDetail_QLY_NAME”), StyleDetail_SHAPENAME = r.Field<string>(“StyleDetail_SHAPENAME”), StyleDetail_SHAPENO = r.Field<int>(“StyleDetail_SHAPENO”), StyleDetail_QLY_ID = r.Field<int>(“StyleDetail_QLY_ID”), StyleDetail_COLOR_ID = r.Field<int>(“StyleDetail_COLOR_ID”) } into groupedTable select new { StyleDetail_SHAPENO = groupedTable.Key.StyleDetail_SHAPENO, StyleDetail_QLY_ID = groupedTable.Key.StyleDetail_QLY_ID, StyleDetail_COLOR_ID =Continue Reading “Grouping and sum with Datatable Using IEnumerable”

C#

Export Datatable To excel .cvs File with c#

DataTable dtUsers = Session[“UsersForApproval”] as DataTable; DataTable dtexprot = new DataTable(); if (Session[“UsersForApproval”] == null) { dtexprot = UserDetails.GetUsersForApproval(); Session[“UsersForApproval”] = dtUsers; } else { dtexprot = Session[“UsersForApproval”] as DataTable; } HttpContext context = HttpContext.Current; context.Response.Clear(); foreach (DataColumn column in dtexprot.Columns) { context.Response.Write(column.ColumnName + “,”); } context.Response.Write(Environment.NewLine); foreach (DataRow row in dtexprot.Rows) { for (intContinue Reading “Export Datatable To excel .cvs File with c#”