This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DataContract] | |
public class ProductModel | |
{ | |
private int productID; | |
[DataMember] | |
public int ProductID | |
{ | |
get { return productID; } | |
set { productID = value; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[OperationContract] | |
public List<ProductModel> GetTop10ProductsByPrice() | |
{ | |
var prodList = new List<ProductModel>(); | |
string connectionString = ConfigurationManager.ConnectionStrings["NorthwindConnection"] as string; | |
string query = "SELECT TOP 10 ProductID, Name, UnitPrice FROM Product ORDER BY UnitPrice DESC"; | |
using (SqlConnection connection = new SqlConnection(connectionString)) | |
{ | |
SqlCommand command = new SqlCommand(query, connection); | |
command.CommandType = System.Data.CommandType.Text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<telerik:RadCartesianChart Grid.Row="1" x:Name="chartView" Palette="Metro"> | |
<telerik:RadCartesianChart.VerticalAxis> | |
<telerik:LinearAxis Title="Price (USD)"/> | |
</telerik:RadCartesianChart.VerticalAxis> | |
<telerik:RadCartesianChart.HorizontalAxis> | |
<telerik:CategoricalAxis Title="Products"/> | |
</telerik:RadCartesianChart.HorizontalAxis> | |
<telerik:RadCartesianChart.Series> | |
<telerik:BarSeries x:Name="barSeries1" ItemsSource="{Binding}" | |
ValueBinding="Price" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public MainPage() | |
{ | |
InitializeComponent(); | |
this.Loaded += MainPage_Loaded; | |
} | |
void MainPage_Loaded(object sender, RoutedEventArgs e) | |
{ | |
ChartServiceClient client = new ChartServiceClient(); | |
client.GetTop10ProductsCompleted += client_GetTop10ProductsCompleted; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
ViewBag.CarsList = GetCarsSelectList(); | |
return View(); | |
} | |
private SelectList GetCarsSelectList() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="col-md-4"> | |
<h2>HTML OptGroup Demo</h2> | |
@Html.DropDownList("CarsList") | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Layout--> | |
<div data-role="layout" data-id="applayout"> | |
<!--Header--> | |
<div data-role="header"> | |
<div data-role="navbar"> | |
<span data-role="view-title"></span> | |
</div> | |
</div> | |