Skip to content

Instantly share code, notes, and snippets.

Avatar

Gopikrishna Reddy Gujjula gopigujjula

View GitHub Profile
@gopigujjula
gopigujjula / CsvToDataTable
Created Apr 25, 2013
Reading data from the Csv file and create the DataTable in C#
View CsvToDataTable
using System;
using System.Text;
using System.Data;
using System.IO;
namespace ReadData
{
class DataConvert
{
static void Main(string[] args)
@gopigujjula
gopigujjula / DataTableToCsv
Last active Jun 8, 2022
Conversion from DataTable to Csv file in C#.
View DataTableToCsv
using System;
using System.Text;
using System.Data;
using System.IO;
namespace Conversion
{
class DataConvert
{
static void Main(string[] args)
View Index.cshtml
@model IEnumerable<SC9SolrDemo.Models.HighlightResult>
@if (Model != null)
{
<ul>
@foreach (var highlight in Model)
{
<li>
<h1>
@highlight.Name
View HighlightResult.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace SC9SolrDemo.Models
{
public class HighlightResult
{
public string Name { get; set; }
View HighlighterController.cs
using SC9SolrDemo.Models;
using Sitecore.ContentSearch;
using Sitecore.ContentSearch.SearchTypes;
using Sitecore.ContentSearch.SolrProvider.SolrNetIntegration;
using SolrNet;
using SolrNet.Commands.Parameters;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
View Index.cshtml
@using SolrNet;
@using Sitecore.ContentSearch.SearchTypes
@model SolrQueryResults<SearchResultItem>
@if (Model != null)
{
foreach (var group in Model.Grouping)
{
foreach (var grp in group.Value.Groups)
View GroupController.cs
using Sitecore.ContentSearch;
using Sitecore.ContentSearch.SearchTypes;
using Sitecore.ContentSearch.SolrProvider.SolrNetIntegration;
using SolrNet;
using SolrNet.Commands.Parameters;
using System.Web.Mvc;
namespace SC9SolrDemo.Controllers
{
public class GroupController : Controller
View basic.cshtml
@using Sitecore.Mvc
<!doctype html>
<html>
<head>
<title>Sitecore Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div>
View Sitecore901Install.ps1
#define parameters
$prefix = "sc901demo"
$PSScriptRoot = "D:\9"
$XConnectCollectionService = "$prefix.xconnect"
$sitecoreSiteName = "$prefix.local"
$SolrUrl = "https://localhost:8983/solr"
$SolrRoot = "C:\Sitecore9\solr-6.6.2"
$SolrService = "solr662"
$SqlServer = "(local)"
$SqlAdminUser = "sa"
@gopigujjula
gopigujjula / ExcelToDataTable
Created Apr 19, 2013
Loading Excel sheet to DataTable using Ole DB jet engine in C#
View ExcelToDataTable
using System;
using System.Data;
using System.Data.OleDb;
namespace ExcelToDataTable
{
class LoadExcel
{
static void Main(string[] args)
{