Skip to content

Instantly share code, notes, and snippets.

@Daviddonadze
Daviddonadze / Entity Framework and LINQ(Lambda)
Last active August 17, 2016 01:00
Entity Framework and LINQ(Lambda)
using EsSample.Data;
using EsSample.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity;
namespace EsSample
{
@Daviddonadze
Daviddonadze / ArrayLoops
Created August 17, 2016 01:06
ArrayLoops
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ArrayLoops
{
class Program
{
// Adult------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Data
{
public class Adult : Person
@Daviddonadze
Daviddonadze / Repeater ( using DataBase to bind Data) and display
Last active September 5, 2016 04:01
Repeater ( using DataBase to bind Data) and display
// Repeater 1-------------------------------
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RepeaterXML._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<table>
<tr style="font-weight: bold;">
<td valign="top"><span id="lblDesc" runat="server"><b>SKU</b></span> </td>
<td valign="top"><span id="lblCond" runat="server"><b>PRICE</b></span></td>
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="XmlSetToControls._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:HiddenField ID="hdnNo" runat="server" Value = "No" />
<asp:HiddenField ID="hdnYes" runat="server" Value = "Yes" />
<asp:HiddenField ID="HiddenField2" runat="server" />
 
@Daviddonadze
Daviddonadze / Display INFO ( txtboxes and ddl) And (GridView)
Last active September 5, 2016 23:42
Display INFO ( txtboxes and ddl) And (Bind GridView)
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="NewDog.aspx.cs" Inherits="DogsAndPoppies.NewDog" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<fieldset>
<legend> Dog Info </legend>
<table>
<tr>
<td>
Name:
</td>
@Daviddonadze
Daviddonadze / Auction
Created September 6, 2016 01:26
Auction
//----------MakeModel.aspx-------------------------------------------
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MakeModel.aspx.cs" Inherits="Auction.MakeModel" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<table>
<tr>
<td>All Make:
</td>
<td>
public class ListMatchController : Controller
//-----------------------------Controller--------------------
[HttpPost]
public ActionResult GetXlFile()
{
List<ListMatchDetails> lstPreview = new List<ListMatchDetails>();
if (System.Web.HttpContext.Current.Request.Files.AllKeys.Any())
{
using Org.BouncyCastle.Bcpg;
using Org.BouncyCastle.Bcpg.OpenPgp;
using Org.BouncyCastle.Security;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#Controller Code
------------------------
using MVCTutorial.Models;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;