This file contains hidden or 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 Customer CurrentCustomer { | |
| get { | |
| if (_currentCustomer == null) { | |
| _currentCustomer = CustomerFromSession(); | |
| if (_currentCustomer == null) { | |
| _currentCustomer = CurrentUser.Customers.First(); | |
| PersistCustomer(_currentCustomer); | |
| } | |
| } |
This file contains hidden or 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 Models.Contact CurrentUser { | |
| get { | |
| if (_currentContact == null) { | |
| _currentContact = GetUser(); | |
| } | |
| return _currentContact; | |
| } | |
| } |
This file contains hidden or 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 ObjectCount { | |
| public Dictionary<int, int> Values { get; private set; } | |
| public ObjectCount(Dictionary<int, int> values) { | |
| this.Values = values; | |
| } | |
| public int Total { | |
| get { | |
| return Values.Sum(v => v.Value); |
This file contains hidden or 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
| function createMainImageContainer($img, $destination) { | |
| var $container, $table, $menu; | |
| $container = $('<div id="image">'); | |
| $table = $('<table class="imageTable"><tr><td align="center"></td></td></table>').appendTo($container); | |
| $menu = $('<div>').attr('id', "removeMainImage") | |
| .addClass("button buttonImage") | |
| .text("Ta bort") | |
| .click(function () { removeMainImage($container, $destination); }) |
This file contains hidden or 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
| function insertElements($obj) { | |
| var $header = $('<div>').addClass("header"); | |
| $('<div>').addClass("headerText image") | |
| .append($('<span>').text($obj.options.header)) | |
| .appendTo($header); | |
| $('<div>').addClass("headerClose image").click(function () { | |
| $obj.disable(); | |
| }).appendTo($header); |
This file contains hidden or 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
| #objectTable { | |
| thead { | |
| th { | |
| &.checkbox { width: 40px; min-width: 40px; } | |
| &.color { text-align: left; padding-left: 20px; } | |
| &.model { width: 200px; } | |
| &.modelraw { width: 200px; } | |
| span { | |
| &.text { height: 50px; line-height: 50px; cursor: pointer; } |
This file contains hidden or 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
| #object_table { max-width: 780px; border-spacing: 0; width: 100%; } | |
| #object_table th { min-width: 80px; height: 60px; } | |
| #object_table div { cursor: pointer; margin-left: 15px; margin-right: 15px; text-align: center; } | |
| #object_table th.checkbox { width: 40px; min-width: 40px; } | |
| #object_table td.checkbox input { margin-left: 6px; } | |
| #object_table .checkbox { width: 10px; } | |
| #object_table th.modelraw { width: 200px; } | |
| #object_table th.color { text-align: left; padding-left: 20px; } | |
| #object_table th.model { max-width: 110px; min-width: 110px; } | |
| #object_table thead th { font-weight: normal; font-size: 18px; text-align: center; } |
This file contains hidden or 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 ObjectStore { | |
| private static Dictionary<int, SalesObject> _objects = new Dictionary<int, SalesObject>(); | |
| public static T GetObject<T>(int contactId) where T : SalesObject { | |
| SalesObject tmpAccessory = null; | |
| _objects.TryGetValue(contactId, out tmpAccessory); | |
| return (T)tmpAccessory; | |
| } |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using BBAdmin.Models; | |
| using BBAdmin.DataAccess.DataHandler; | |
| using BBAdmin.DataAccess; | |
| using BBAdmin.Models.ViewModels; |
This file contains hidden or 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
| set shiftwidth=2 | |
| set tabstop=2 | |
| set expandtab | |
| set smarttab | |
| set ai | |
| set si | |
| filetype plugin on | |
| filetype indent on | |
| colorscheme vividchalk |
OlderNewer