Skip to content

Instantly share code, notes, and snippets.

Avatar

Lohith lohithgn

View GitHub Profile
@lohithgn
lohithgn / MSFTStockPrice
Last active Aug 29, 2015
Code Snippets for RadRangeSelector WinForms Demo
View MSFTStockPrice
Date,Open,High,Low,Close,Volume,Adj Close
3/13/1986,25.5,29.75,25.5,27.5,155827200,0.07
4/1/1986,27.5,35.13,26.75,32.25,26274700,0.08
5/1/1986,32.25,35.5,31,35,17167500,0.09
6/2/1986,35,35,29.5,30.75,16959000,0.08
7/1/1986,30.75,31.5,26,28.5,21656200,0.07
8/1/1986,28.5,30.75,27.25,28.5,13889800,0.07
9/2/1986,28.5,31.5,26.25,28.25,13824000,0.07
10/1/1986,28.25,40.25,27.5,38.75,70845400,0.1
11/3/1986,39,51.25,39,49.75,57646900,0.13
View Car.cs
public class Car
{
public int Id { get; set; }
public string Name { get; set; }
public string Category { get; set; }
public static List<Car> GetCars()
{
return new List<Car>{
new Car{Id=1, Name="Volvo", Category="Swedish Cars"},
View Index.cshtml
<div class="row">
<div class="col-md-4">
<h2>HTML OptGroup Demo</h2>
@Html.DropDownList("CarsList")
</div>
</div>
View HomeController.cs
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.CarsList = GetCarsSelectList();
return View();
}
private SelectList GetCarsSelectList()
{
View partnervm-initial.js
var app = app || {};
app.Partners=(function(){
'use strict'
//functionality here
}());
View partners-complete.js
var app = app || {};
app.Partners=(function(){
'use strict'
var partnersModel=(function(){
var partnerModel ={
id:"BusinessPartnerID",
fields:{
Company:{field:'CompanyName'},
View appsettings.js
var appSettings = {
dataSettings:
{
partnersReadUrl : "http://<your server>/sap/opu/odata/sap/ZGWSAMPLE_SRV/BusinessPartnerCollection",
}
};
View partnermodel.js
var partnersModel=(function(){
//Data Model
var partnerModel ={
id:"BusinessPartnerID",
fields:{
Company:{field:'CompanyName'},
Email:{field:'EmailAddress'},
Phone:{field:'PhoneNumber'},
Fax:{field:'FaxNumber'},
Web:{field:'WebAddress'},
View partnermodel-complete.js
var partnersModel=(function(){
var partnerModel ={
id:"BusinessPartnerID",
fields:{
Company:{field:'CompanyName'},
Email:{field:'EmailAddress'},
Phone:{field:'PhoneNumber'},
Fax:{field:'FaxNumber'},
Web:{field:'WebAddress'},
LegalForm:{field:'LegalForm'},
View index-initial.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<link href="kendo/styles/kendo.mobile.all.min.css" rel="stylesheet" />
<link href="styles/main.css" rel="stylesheet" />
<script src="cordova.js"></script>
<script src="kendo/js/jquery.min.js"></script>