First create solution
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
var username = ko.observable("SysAdmin");
|
||||
var password = ko.observable("SysAdmin");
|
||||
var database = ko.observable(null);
|
||||
var query = ko.observable(null);
|
||||
|
||||
var resultstatus= ko.observable(0);
|
||||
var result = ko.observable(null)
|
||||
|
||||
var loadPanelVisible = ko.observable(false);
|
||||
var URL_IP = ko.observable("192.168.1.22");
|
||||
var URL_DIR = ko.observable("NuvolarWCF");
|
||||
//var URL = ko.observable("http://"+URL_IP()+"/"+URL_DIR()+"/Service.svc/GetInfo?callback=?");
|
||||
var URL = ko.observable("http://localhost:49766/Service.svc/GetInfo?callback=?");
|
||||
var IsLoggedOn = false;
|
||||
|
||||
var dxListDataSource;
|
||||
var dataSourcePDARows;
|
||||
var dataSourceDiscount;
|
||||
var ProductPicture;
|
||||
var simpleProducts;
|
||||
var JSON_Text;
|
||||
|
||||
|
||||
|
||||
var Barcode = ko.observable("");
|
||||
var BarcodeProducts = ko.observable("");
|
||||
var BarcodeLocations = ko.observable("");
|
||||
var BarcodeDisabled = ko.observable(false);
|
||||
var QTT = ko.observable("1");
|
||||
var PriceBruttoHUF = ko.observable("0");
|
||||
var ActualDate = ko.observable(null);
|
||||
var ExpirationDate = ko.observable(null);
|
||||
|
||||
var DiscountOkVisible = ko.observable(false);
|
||||
var DiscountCancelVisible = ko.observable(false);
|
||||
|
||||
ActualDate = new Date(new Date().getTime() + (0 * 24 * 60 * 60 * 1000));
|
||||
ExpirationDate = new Date(new Date().getTime() + (3 * 24 * 60 * 60 * 1000));
|
||||
|
||||
var currentnavigate = ko.observable("navigation");
|
||||
|
||||
var SimpleQuery = {
|
||||
"UserName": username,
|
||||
"Password": password,
|
||||
"Database": database,
|
||||
"Query":query
|
||||
};
|
||||
|
||||
var SimpleAnswer = {
|
||||
"ResultStatus": resultstatus,
|
||||
"Result": result
|
||||
};
|
||||
Date.prototype.yyyymmdd = function () {
|
||||
var yyyy = this.getFullYear().toString();
|
||||
var mm = (this.getMonth() + 1).toString(); // getMonth() is zero-based
|
||||
var dd = this.getDate().toString();
|
||||
return yyyy +'/'+ (mm[1] ? mm : "0" + mm[0]) +'/'+ (dd[1] ? dd : "0" + dd[0]); // padding
|
||||
};
|
||||
|
||||
var navigation = [
|
||||
{
|
||||
title: "Termék információ",
|
||||
onExecute: "#ProductsInfo",
|
||||
icon: "product"
|
||||
},
|
||||
{
|
||||
title: "PDA adatgyűjtés",
|
||||
onExecute: "#StoragePDACollectionSelect",
|
||||
icon: "todo",
|
||||
},
|
||||
{
|
||||
title: "Névjegy",
|
||||
onExecute: "#About",
|
||||
icon: "info"
|
||||
},
|
||||
{
|
||||
title: "Kijelentkezés",
|
||||
onExecute: "#Login",
|
||||
icon: "runner",
|
||||
root: "true"
|
||||
},
|
||||
{
|
||||
title: "Teszt",
|
||||
onExecute: "#Test",
|
||||
icon: ""
|
||||
}
|
||||
];
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/// <reference path="../js/jquery-1.11.3.min.js" />
|
||||
/// <reference path="../js/knockout-3.3.0.js" />
|
||||
/// <reference path="../js/dx.all.js" />
|
||||
|
||||
(function() {
|
||||
var isWinJS = "WinJS" in window;
|
||||
var endpointSelector = new DevExpress.EndpointSelector(Nuvolar_Scanner_Android.config.endpoints);
|
||||
var serviceConfig = $.extend(true, {}, Nuvolar_Scanner_Android.config.services, {
|
||||
db: {
|
||||
url: endpointSelector.urlFor("db"),
|
||||
|
||||
// To enable JSONP support, uncomment the following line
|
||||
//jsonp: !isWinJS,
|
||||
|
||||
// To allow cookies and HTTP authentication with CORS, uncomment the following line
|
||||
// withCredentials: true,
|
||||
|
||||
errorHandler: handleServiceError
|
||||
}
|
||||
});
|
||||
|
||||
function handleServiceError(error) {
|
||||
if(isWinJS) {
|
||||
try {
|
||||
new Windows.UI.Popups.MessageDialog(error.message).showAsync();
|
||||
} catch(e) {
|
||||
// Another dialog is shown
|
||||
}
|
||||
} else {
|
||||
alert(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
// Enable partial CORS support for IE < 10
|
||||
$.support.cors = true;
|
||||
|
||||
Nuvolar_Scanner_Android.db = new DevExpress.data.ODataContext(serviceConfig.db);
|
||||
|
||||
}());
|
||||
Reference in New Issue
Block a user