First create solution
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<div data-options="dxView : { name: 'Discount', title: 'Leértékelés' } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div class="dx-fieldset">
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Vonalkód:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="BarcodeText" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcode, placeholder: 'EAN13, EAN8', value: Barcode, disabled: BarcodeDisabled }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Ár:</div>
|
||||
<div class="dx-field-value">
|
||||
<div data-bind="dxNumberBox: { value: PriceBruttoHUF },dxValidator: priceValidationRules"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Érvényes:</div>
|
||||
<div class="dx-field-value">
|
||||
<div data-bind="dxDateBox: { value: ActualDate }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Lejárat:</div>
|
||||
<div class="dx-field-value">
|
||||
<div data-bind="dxDateBox: {value: ExpirationDate}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="width: 5%"></td>
|
||||
<td style="text-align: center">
|
||||
<div data-bind="dxButton: { text: 'Leértékel',visible: DiscountOkVisible,onClick: onClickOk }"></div>
|
||||
<div data-bind="dxButton: { text: 'Mégsem',visible:DiscountCancelVisible,onClick: onClickCancel }"></div>
|
||||
</td>
|
||||
<td style="width: 5%"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<div data-bind="dxScrollView: {scrollByContent: true, scrollByThumb: true}">
|
||||
<div id="gridContainer"></div>
|
||||
<div id="gridContainerDiscount"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,134 @@
|
||||
Nuvolar_Scanner_Android.Discount = function (params) {
|
||||
priceValidationRules = {
|
||||
validationRules: [{
|
||||
type: "range",
|
||||
min: 1,
|
||||
message: "A leértékelt ár nem lehet 0"
|
||||
}]
|
||||
};
|
||||
var viewModel = {
|
||||
onEnterKeyBarcode: function (e) {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetProductsInfo_dxDatagrid;' + Barcode();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows });
|
||||
if (dataSourcePDARows.length > 1) {
|
||||
BarcodeDisabled(true);
|
||||
DiscountCancelVisible(true);
|
||||
DiscountOkVisible(true);
|
||||
}
|
||||
else {
|
||||
Barcode("");
|
||||
DiscountCancelVisible(false);
|
||||
DiscountOkVisible(false);
|
||||
}
|
||||
$("#BarcodeText").dxTextBox("instance").focus();
|
||||
}).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetDiscountInfo_dxDatagrid;' + Barcode();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dataSourceDiscount = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainerDiscount").dxDataGrid({ dataSource: dataSourceDiscount });
|
||||
}).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
},
|
||||
onClickOk: function (e) {
|
||||
var result = e.validationGroup.validate();
|
||||
if (result.isValid) {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_InsertDiscount_dxDataGrid;' + Barcode() + ';' + PriceBruttoHUF() + ';' + ActualDate.yyyymmdd() + ';' + ExpirationDate.yyyymmdd();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dataSourceDiscount = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainerDiscount").dxDataGrid({ dataSource: dataSourceDiscount });
|
||||
Barcode("");
|
||||
DiscountCancelVisible(false);
|
||||
DiscountOkVisible(false);
|
||||
BarcodeDisabled(false);
|
||||
$("BarcodeText").dxTextBox("instance").focus();
|
||||
}).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
}
|
||||
},
|
||||
onClickCancel: function (e) {
|
||||
BarcodeDisabled(false);
|
||||
DiscountCancelVisible(false);
|
||||
DiscountOkVisible(false);
|
||||
Barcode("");
|
||||
},
|
||||
viewShown: function (e) {
|
||||
dataSourcePDARows = null;
|
||||
if (IsLoggedOn == false) {
|
||||
currentnavigate("Discount");
|
||||
Nuvolar_Scanner_Android.app.navigate("Login", { root: true });
|
||||
}
|
||||
else {
|
||||
$("#gridContainer").dxDataGrid({
|
||||
dataSource: dataSourcePDARows,
|
||||
allowColumnReordering: true,
|
||||
allowColumnResizing: true,
|
||||
columnAutoWidth: true,
|
||||
rowAlternationEnabled: true,
|
||||
columnChooser: {
|
||||
enabled: false
|
||||
},
|
||||
scrolling: { mode: 'infinite' },
|
||||
columnFixing: {
|
||||
enabled: true
|
||||
},
|
||||
columns: [{
|
||||
dataField: "Oid",
|
||||
visible: false,
|
||||
key: true
|
||||
},
|
||||
{ dataField: "ShortName", caption: 'Megnevezés' },
|
||||
{ dataField: "Value", caption: 'Érték' }
|
||||
]
|
||||
});
|
||||
$("#gridContainerDiscount").dxDataGrid({
|
||||
dataSource: dataSourceDiscount,
|
||||
allowColumnReordering: true,
|
||||
allowColumnResizing: true,
|
||||
columnAutoWidth: true,
|
||||
rowAlternationEnabled: true,
|
||||
columnChooser: {
|
||||
enabled: false
|
||||
},
|
||||
scrolling: { mode: 'infinite' },
|
||||
columnFixing: {
|
||||
enabled: true
|
||||
},
|
||||
columns: [{
|
||||
dataField: "Oid",
|
||||
visible: false,
|
||||
key: true
|
||||
},
|
||||
{ dataField: "Barcode", caption: 'Vonalkód' },
|
||||
{ dataField: "PriceBruttoHUF", caption: 'Bruttó ár' },
|
||||
{ dataField: "ExpirationDate", caption: 'Érvényes' }
|
||||
]
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<div data-options="dxView : { name: 'StorageLocationFoldEdit', title: 'Szétrakás polcra' } " >
|
||||
<div data-bind="dxCommand: { title: 'x', id: 'delete', icon:'remove',onExecute:removerows }"></div>
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " class="dx-content-background">
|
||||
<div class="dx-fieldset">
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Termék vonalkód:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="BarcodeTextProducts" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcodeProducts, placeholder: 'EAN13, EAN8', value: BarcodeProducts }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Lokáció vonalkód:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="BarcodeTextLocations" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcodeLocations, placeholder: 'EAN13', value: BarcodeLocations }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Mennyiség:</div>
|
||||
<div class="dx-field-value">
|
||||
<div data-bind="dxNumberBox: { onEnterKey: onEnterKeyBarcodeProducts, value: QTT }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gridContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,113 @@
|
||||
Nuvolar_Scanner_Android.StorageLocationFoldEdit = function (params) {
|
||||
"use strict";
|
||||
|
||||
var viewModel = {
|
||||
viewShown: function (e) {
|
||||
$("#gridContainer").dxDataGrid({
|
||||
dataSource: dataSourcePDARows,
|
||||
allowColumnReordering: true,
|
||||
allowColumnResizing: true,
|
||||
showColumnLines: true,
|
||||
showRowLines: true,
|
||||
rowAlternationEnabled: true,
|
||||
columnAutoWidth: true,
|
||||
height:450,
|
||||
columnChooser: {
|
||||
enabled: false
|
||||
},
|
||||
//paging: {
|
||||
// pageSize: 10
|
||||
//},
|
||||
scrolling: {
|
||||
mode: 'infinite'
|
||||
},
|
||||
//pager: {
|
||||
// showPageSizeSelector: true,
|
||||
// allowedPageSizes: [5, 10, 20]
|
||||
//},
|
||||
columnFixing: {
|
||||
enabled: true
|
||||
},
|
||||
selection: {
|
||||
mode: 'multiple',
|
||||
allowSelectAll: false
|
||||
},
|
||||
//editing: {
|
||||
// //editEnabled: true,
|
||||
// editMode: 'row',
|
||||
// //insertEnabled: true,
|
||||
// removeEnabled: true
|
||||
//},
|
||||
store: {key: "Oid"},
|
||||
onRowRemoving: function(e) {
|
||||
var dataGrid = $('#gridContainer').dxDataGrid('instance');
|
||||
|
||||
alert(dataGrid.getSelectedRowsData());
|
||||
e.cancel = true;
|
||||
//e.data.RecordStatus = 'Deleted';
|
||||
//var rowIndex = e.component.getRowIndexByKey(e.key);
|
||||
//var $commandEditCell = e.component.getCellElement(rowIndex, "command:edit");
|
||||
//$commandEditCell.empty();
|
||||
//$commandEditCell.parent().addClass("deleted");
|
||||
},
|
||||
columns: [{ dataField: "Oid",
|
||||
visible: false,
|
||||
key:true},
|
||||
{ dataField: "QTT",caption:'M.',dataType:'number' },
|
||||
{ dataField: "ShortName", caption:'Megnevezés'},
|
||||
{ dataField: "Barcode", caption: 'Vonalkód' },
|
||||
{
|
||||
dataField: "RowIndex", caption: 'S.',
|
||||
allowSorting: true,
|
||||
sortIndex: 1,
|
||||
sortOrder: 'desc',
|
||||
dataType: 'number'
|
||||
}
|
||||
]
|
||||
});
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
dataSourcePDARows = null;
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
SimpleQuery.Query = 'DX_GetStoragePDACollectionRows_dxDataGrid;' + params.id;
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id='+JSON_Text, function (results) {
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({dataSource: dataSourcePDARows})
|
||||
}
|
||||
).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
|
||||
},
|
||||
onEnterKeyBarcodeProducts: function (e) {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_InsertStorageLocationFold_dxDataGrid;' + BarcodeProducts() + ';' + params.id + ';' + QTT() + ';' + BarcodeLocations();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
Barcode("");
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
$("#BarcodeTextProducts").dxTextBox("instance").focus();
|
||||
}
|
||||
).done(function () {
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
},
|
||||
onEnterKeyBarcodeLocations: function (e) {
|
||||
$("#BarcodeTextProducts").dxTextBox("instance").focus();
|
||||
},
|
||||
removerows: function (e) {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
<div data-options="dxView : { name: 'StorageLocationFoldSelect', title: 'Szétrakás polcra' } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " class="dx-content-background">
|
||||
<div id="dxlist" data-bind="dxList: { dataSource: dxListDataSource, noDataText: 'Nincs semmi!', onItemClick: dxListItemClickAction}">
|
||||
<div data-options="dxTemplate:{name:'item'}">
|
||||
<span style="text-align: center; vertical-align: middle" data-bind="text: $data.title"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
Nuvolar_Scanner_Android.StorageLocationFoldSelect = function (params) {
|
||||
"use strict";
|
||||
|
||||
var viewModel = {
|
||||
viewShown: function (e) {
|
||||
dxListDataSource = null;
|
||||
currentnavigate("StorageLocationFoldSelect");
|
||||
if (IsLoggedOn == false) {
|
||||
Nuvolar_Scanner_Android.app.navigate("Login", { root: false });
|
||||
}
|
||||
else {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetStorageLocationFoldSelect_dxList';
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dxListDataSource = JSON.parse(JSON.parse(results).Result);
|
||||
$("#dxlist").dxList({ dataSource: dxListDataSource });
|
||||
}).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
};
|
||||
},
|
||||
dxListItemClickAction: function (e) {
|
||||
if (e.itemData.key != '') {
|
||||
//alert(e.itemData.key);
|
||||
Nuvolar_Scanner_Android.app.navigate({ view: "StorageLocationFoldEdit", id: e.itemData.key });
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
/*.dx-button-content {
|
||||
background: #00bcd4 none repeat scroll 0 0;
|
||||
}
|
||||
.dx-button-text {
|
||||
color: #ffffff;
|
||||
|
||||
}*/
|
||||
@@ -0,0 +1,46 @@
|
||||
<div data-options="dxView: { modal: true, name: 'Login', title: 'Bejelentkezés' }">
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } ">
|
||||
<div class="dx-fieldset">
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Felhasználó:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="username" data-bind="dxTextBox: { value: username }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Jelszó:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="password" data-bind="dxTextBox: { value: password,mode: 'password' }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">IP:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="URL_IP" data-bind="dxTextBox: { value: URL_IP }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">DIR:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="URL_DIR" data-bind="dxTextBox: { value: URL_DIR }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="dx-field">
|
||||
<div class="dx-field-label">Egység:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="products-simple" data-bind="dxSelectBox: {displayValue: database}"></div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="width: 20%"></td>
|
||||
<td style="text-align:center">
|
||||
<div class="logout-button" data-bind="dxButton: { text: 'Bejelentkezés',onClick: getlogin }"></div>
|
||||
</td>
|
||||
<td style="width: 20%"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div data-bind="dxLoadPanel: { message: 'Kapcsolódás...', visible: loadPanelVisible }"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,72 @@
|
||||
Nuvolar_Scanner_Android.Login = function (params, viewInfo) {
|
||||
$.each(Nuvolar_Scanner_Android.app.navigation, function (_, command) {
|
||||
command.option("root", false);
|
||||
})
|
||||
var viewModel = {
|
||||
commands: Nuvolar_Scanner_Android.app.navigation,
|
||||
getlogin: function (e) {
|
||||
IsLoggedOn = false;
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_Login';
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
if (URL_DIR() != "" && URL_DIR() != null) {
|
||||
URL("http://" + URL_IP() + "/" + URL_DIR() + "/Service.svc/GetInfo?callback=?");
|
||||
}
|
||||
else {
|
||||
URL("http://" + URL_IP() + "/Service.svc/GetInfo?callback=?");
|
||||
}
|
||||
//Most kell bejelentkeztetni
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
if (JSON.parse(results).ResultStatus == 1) {
|
||||
IsLoggedOn = true;
|
||||
//Ideiglenesen !!!
|
||||
database("pcs_324");
|
||||
|
||||
Nuvolar_Scanner_Android.app.createNavigation(navigation);
|
||||
Nuvolar_Scanner_Android.app.renderNavigation();
|
||||
Nuvolar_Scanner_Android.app.navigate(currentnavigate(), { root: true });
|
||||
|
||||
window.localStorage.setItem("username", username());
|
||||
window.localStorage.setItem("database", database());
|
||||
window.localStorage.setItem("URL_IP", URL_IP());
|
||||
window.localStorage.setItem("URL_DIR", URL_DIR());
|
||||
|
||||
};
|
||||
}
|
||||
).done(function () {
|
||||
loadPanelVisible(false);
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
loadPanelVisible(false);
|
||||
alert(textStatus);
|
||||
alert(jqXHR.responseText);
|
||||
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
},
|
||||
viewShown: function (e) {
|
||||
loadPanelVisible(true);
|
||||
IsLoggedOn = false;
|
||||
//Nuvolar_Scanner_Android.app.navigate("Login", { root: true,target:"current",clearHistory: true });
|
||||
if (window.localStorage.getItem("database") != null)
|
||||
{
|
||||
database(window.localStorage.getItem("database"));
|
||||
username(window.localStorage.getItem("username"));
|
||||
URL_IP(window.localStorage.getItem("URL_IP"));
|
||||
URL_DIR(window.localStorage.getItem("URL_DIR"));
|
||||
if (URL_DIR() != "" && URL_DIR() != null) {
|
||||
URL("http://" + URL_IP() + "/" + URL_DIR() + "/Service.svc/GetInfo?callback=?");
|
||||
}
|
||||
else
|
||||
{
|
||||
URL("http://" + URL_IP() + "/Service.svc/GetInfo?callback=?");
|
||||
}
|
||||
}
|
||||
loadPanelVisible(false);
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<div data-options="dxView : { name: 'ProductsInfo', title: 'Termék információ', root: true } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div class="dx-fieldset">
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Vonalkód</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="BarcodeText" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcode, placeholder: 'EAN13, EAN8', value: Barcode }"></div>
|
||||
<!--<div data-bind="dxButton: { onClick: 'onClickScan', text: 'SCAN' }"></div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div id="gridContainer"></div>
|
||||
<img id="img" src="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,70 @@
|
||||
Nuvolar_Scanner_Android.ProductsInfo = function (params) {
|
||||
|
||||
var viewModel = {
|
||||
onEnterKeyBarcode: function (e)
|
||||
{
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetProductsInfo_Picture;' + Barcode();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
ProductPicture = JSON.parse(results).Result;
|
||||
document.getElementById('img').setAttribute('src', 'data:image/png;base64,'+ProductPicture);
|
||||
}).done(function () {
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetProductsInfo_dxDatagrid;' + Barcode();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows });
|
||||
Barcode("");
|
||||
$("#BarcodeText").dxTextBox("instance").focus();
|
||||
}).done(function () {
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
},
|
||||
viewShown: function (e) {
|
||||
dataSourcePDARows = null;
|
||||
if (IsLoggedOn == false) {
|
||||
currentnavigate("ProductsInfo");
|
||||
Nuvolar_Scanner_Android.app.navigate("Login", { root: true });
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#gridContainer").dxDataGrid({
|
||||
dataSource: dataSourcePDARows,
|
||||
allowColumnReordering: true,
|
||||
allowColumnResizing: true,
|
||||
columnAutoWidth: true,
|
||||
rowAlternationEnabled: true,
|
||||
columnChooser: {
|
||||
enabled: false
|
||||
},
|
||||
scrolling: { mode: 'infinite' },
|
||||
columnFixing: {
|
||||
enabled: true
|
||||
},
|
||||
columns: [{
|
||||
dataField: "Oid",
|
||||
visible: false,
|
||||
key: true
|
||||
},
|
||||
{ dataField: "ShortName", caption: 'Megnevezés' },
|
||||
{ dataField: "Value", caption: 'Érték' }
|
||||
]
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
|
||||
//Kép feldolgozása
|
||||
@@ -0,0 +1,4 @@
|
||||
<div data-options="dxView : { name: 'StorageInHeaderSelect', title: 'Betárolás' } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
Nuvolar_Scanner_Android.StorageInHeaderSelect = function (params) {
|
||||
|
||||
var viewModel = {
|
||||
viewShown: function (e) {
|
||||
if (IsLoggedOn == false) {
|
||||
currentnavigate("StorageInHeaderSelect");
|
||||
Nuvolar_Scanner_Android.app.navigate("Login", { root: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
<div data-options="dxView : { name: 'StorageInRowsEdit', title: 'Betárolási sorok rögzítése' } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div class="dx-fieldset">
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Vonalkód:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="BarcodeText" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcode, placeholder: 'EAN13, EAN8', value: Barcode }"></div>
|
||||
<!--<div data-bind="dxButton: { onClick: 'onClickScan', text: 'SCAN' }"></div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Mennyiség:</div>
|
||||
<div class="dx-field-value">
|
||||
<div data-bind="dxNumberBox: { onEnterKey: onEnterKeyBarcode, value: QTT }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gridContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
Nuvolar_Scanner_Android.StorageInRowsEdit = function (params) {
|
||||
|
||||
var viewModel = {
|
||||
// Put the binding properties here
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
<div data-options="dxView : { name: 'StorageOutHeaderSelect', title: 'Kitárolás kiválasztása' } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div id="dxlist" data-bind="dxList: { itemClickAction: dxListItemClickAction, noDataText: 'Nincs semmi!', dataSource: dxListDataSource, grouped: false, pullRefreshEnabled: false }">
|
||||
<div data-options="dxTemplate:{name:'item'}">
|
||||
<span style="text-align: center; vertical-align: middle" data-bind="text: $data.title"><b></b></span>
|
||||
<span style="text-align: center; vertical-align: middle; font-weight: bold;" data-bind="text: $data.group"></span>
|
||||
<span style="text-align: center; vertical-align: middle;font-style: italic;" data-bind="text: $data.customername"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
Nuvolar_Scanner_Android.StorageOutHeaderSelect = function (params) {
|
||||
|
||||
var viewModel = {
|
||||
viewShown: function (e) {
|
||||
dxListDataSource = null;
|
||||
currentnavigate("StorageOutHeaderSelect");
|
||||
if (IsLoggedOn == false) {
|
||||
Nuvolar_Scanner_Android.app.navigate("Login", { root: false });
|
||||
}
|
||||
else {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetStorageOutHeader_dxList';
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dxListDataSource = JSON.parse(JSON.parse(results).Result);
|
||||
$("#dxlist").dxList({ dataSource: dxListDataSource });
|
||||
}).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
};
|
||||
},
|
||||
dxListItemClickAction: function (e) {
|
||||
if (e.itemData.key != '') {
|
||||
//alert(e.itemData.key);
|
||||
Nuvolar_Scanner_Android.app.navigate({ view: "StorageOutRowsEdit", id: e.itemData.key });
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
<div data-options="dxView : { name: 'StorageOutRowsEdit', title: 'Kitárolási sorok rögzítése' } " >
|
||||
<div data-bind="dxCommand: { title: 'x', id: 'delete', icon: 'remove', onExecute: removerows }"></div>
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div class="dx-fieldset">
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Vonalkód:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="BarcodeText" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcode, placeholder: 'EAN13, EAN8', value: Barcode }"></div>
|
||||
<!--<div data-bind="dxButton: { onClick: 'onClickScan', text: 'SCAN' }"></div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Mennyiség:</div>
|
||||
<div class="dx-field-value">
|
||||
<div data-bind="dxNumberBox: { onEnterKey: onEnterKeyBarcode, value: QTT }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gridContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,115 @@
|
||||
Nuvolar_Scanner_Android.StorageOutRowsEdit = function (params) {
|
||||
|
||||
var viewModel = {
|
||||
viewShown: function (e) {
|
||||
$("#gridContainer").dxDataGrid({
|
||||
dataSource: dataSourcePDARows,
|
||||
allowColumnReordering: true,
|
||||
allowColumnResizing: true,
|
||||
showColumnLines: true,
|
||||
showRowLines: true,
|
||||
rowAlternationEnabled: true,
|
||||
columnAutoWidth: true,
|
||||
height: 450,
|
||||
columnChooser: {
|
||||
enabled: false
|
||||
},
|
||||
scrolling: {
|
||||
mode: 'infinite'
|
||||
},
|
||||
columnFixing: {
|
||||
enabled: true
|
||||
},
|
||||
selection: {
|
||||
mode: 'multiple',
|
||||
allowSelectAll: false
|
||||
},
|
||||
columns: [{
|
||||
dataField: "Oid",
|
||||
visible: false,
|
||||
key: true
|
||||
},
|
||||
{ dataField: "QTT", caption: 'M.' },
|
||||
{ dataField: "ShortName", caption: 'Megnevezés' },
|
||||
{ dataField: "ProductNumber", caption: 'Cikkszám' },
|
||||
{
|
||||
dataField: "RowIndex", caption: 'S.',
|
||||
allowSorting: true,
|
||||
sortIndex: 1,
|
||||
sortOrder: 'desc'
|
||||
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetStorageOutRows_dxDataGrid;' + params.id;
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
}
|
||||
).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
|
||||
},
|
||||
onEnterKeyBarcode: function (e) {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_InsertStorageOutRows_dxDataGrid;' + Barcode() + ';' + params.id + ';' + QTT();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
Barcode("");
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
$("#BarcodeText").dxTextBox("instance").focus();
|
||||
}
|
||||
).done(function () {
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
},
|
||||
removerows: function (e) {
|
||||
var dataGrid = $('#gridContainer').dxDataGrid('instance');
|
||||
var items = dataGrid.getSelectedRowsData();
|
||||
for (i = 0; i < items.length; i++) {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_DeleteStorageOutRows_dxDataGrid;' + items[i].Oid;
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
}
|
||||
).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
};
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetStorageOutRows_dxDataGrid;' + params.id;
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
}
|
||||
).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
.dx-datagrid .dx-row > td {
|
||||
padding: 4px;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<div data-options="dxView : { name: 'StoragePDACollectionEdit', title: 'PDA adatgyűjtés' } " >
|
||||
<div data-bind="dxCommand: { icon: 'remove', id: 'delete', onExecute: removerows }"></div>
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div class="dx-fieldset">
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Vonalkód:</div>
|
||||
<div class="dx-field-value">
|
||||
<div id="BarcodeText" data-bind="dxTextBox: { onEnterKey: onEnterKeyBarcode, placeholder: 'EAN13, EAN8', value: Barcode }"></div>
|
||||
<!--<div data-bind="dxButton: { onClick: 'onClickScan', text: 'SCAN' }"></div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="dx-field">
|
||||
<div class="dx-field-label">Mennyiség:</div>
|
||||
<div class="dx-field-value">
|
||||
<div data-bind="dxNumberBox: { onEnterKey: onEnterKeyBarcode, value: QTT }"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gridContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,142 @@
|
||||
Nuvolar_Scanner_Android.StoragePDACollectionEdit = function (params) {
|
||||
|
||||
var viewModel = {
|
||||
viewShown: function (e) {
|
||||
//alert(params.id);
|
||||
|
||||
$("#gridContainer").dxDataGrid({
|
||||
dataSource: dataSourcePDARows,
|
||||
allowColumnReordering: true,
|
||||
allowColumnResizing: true,
|
||||
showColumnLines: true,
|
||||
showRowLines: true,
|
||||
rowAlternationEnabled: true,
|
||||
columnAutoWidth: true,
|
||||
height:450,
|
||||
columnChooser: {
|
||||
enabled: false
|
||||
},
|
||||
//paging: {
|
||||
// pageSize: 10
|
||||
//},
|
||||
scrolling: {
|
||||
mode: 'infinite'
|
||||
},
|
||||
//pager: {
|
||||
// showPageSizeSelector: true,
|
||||
// allowedPageSizes: [5, 10, 20]
|
||||
//},
|
||||
columnFixing: {
|
||||
enabled: true
|
||||
},
|
||||
selection: {
|
||||
mode: 'multiple',
|
||||
allowSelectAll: false
|
||||
},
|
||||
//editing: {
|
||||
// //editEnabled: true,
|
||||
// editMode: 'row',
|
||||
// //insertEnabled: true,
|
||||
// removeEnabled: true
|
||||
//},
|
||||
store: {key: "Oid"},
|
||||
onRowRemoving: function(e) {
|
||||
var dataGrid = $('#gridContainer').dxDataGrid('instance');
|
||||
|
||||
alert(dataGrid.getSelectedRowsData());
|
||||
e.cancel = true;
|
||||
//e.data.RecordStatus = 'Deleted';
|
||||
//var rowIndex = e.component.getRowIndexByKey(e.key);
|
||||
//var $commandEditCell = e.component.getCellElement(rowIndex, "command:edit");
|
||||
//$commandEditCell.empty();
|
||||
//$commandEditCell.parent().addClass("deleted");
|
||||
},
|
||||
columns: [{ dataField: "Oid",
|
||||
visible: false,
|
||||
key:true},
|
||||
{ dataField: "QTT",caption:'M.',dataType:'number' },
|
||||
{ dataField: "ShortName", caption:'Megnevezés'},
|
||||
{ dataField: "Barcode", caption: 'Vonalkód' },
|
||||
{
|
||||
dataField: "RowIndex", caption: 'S.',
|
||||
allowSorting: true,
|
||||
sortIndex: 1,
|
||||
sortOrder: 'desc',
|
||||
dataType: 'number'
|
||||
}
|
||||
]
|
||||
});
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
dataSourcePDARows = null;
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
SimpleQuery.Query = 'DX_GetStoragePDACollectionRows_dxDataGrid;' + params.id;
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id='+JSON_Text, function (results) {
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({dataSource: dataSourcePDARows})
|
||||
}
|
||||
).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
|
||||
},
|
||||
onEnterKeyBarcode: function (e) {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_InsertStoragePDACollectionRows_dxDataGrid;' + Barcode() + ';' + params.id+';'+QTT();
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
Barcode("");
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
$("#BarcodeText").dxTextBox("instance").focus();
|
||||
}
|
||||
).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
//DevExpress.ui.notify("Enterkey fired", "success", 2000);
|
||||
//$.getJSON(URL(), null, function (results) {
|
||||
// //simpleProducts = JSON.parse(results).dataResult;
|
||||
// //alert(results);
|
||||
// simpleProducts = JSON.parse(results);
|
||||
// var productsWidget = $("#products-simple").dxSelectBox({
|
||||
// items: simpleProducts
|
||||
// }).dxSelectBox("instance");
|
||||
//}
|
||||
//).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
// alert('getJSON request failed! ' + textStatus);
|
||||
//});
|
||||
},
|
||||
removerows: function (e) {
|
||||
var dataGrid = $('#gridContainer').dxDataGrid('instance');
|
||||
var items = dataGrid.getSelectedRowsData();
|
||||
for (i = 0; i < items.length; i++) {
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_DeleteStoragePDACollectionRows_dxDataGrid;' + items[i].Oid;
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
|
||||
$.getJSON(URL(), 'id=' + JSON_Text, function (results) {
|
||||
dataSourcePDARows = JSON.parse(JSON.parse(results).Result);
|
||||
$("#gridContainer").dxDataGrid({ dataSource: dataSourcePDARows })
|
||||
}
|
||||
).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
<div data-options="dxView : { name: 'StoragePDACollectionSelect', title: 'PDA adatgyűjtés' } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div id="dxlist" data-bind="dxList: { dataSource: dxListDataSource, noDataText: 'Nincs semmi!', onItemClick: dxListItemClickAction}">
|
||||
<div data-options="dxTemplate:{name:'item'}">
|
||||
<span style="text-align: center; vertical-align: middle" data-bind="text: $data.title"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
Nuvolar_Scanner_Android.StoragePDACollectionSelect = function (params) {
|
||||
// = ko.observable([{ "key": 1, "title": "a" }, { "key": 2, "title": "b" }]);
|
||||
var viewModel = {
|
||||
|
||||
viewShown: function (e) {
|
||||
dxListDataSource = null;
|
||||
currentnavigate("StoragePDACollectionSelect");
|
||||
if (IsLoggedOn == false) {
|
||||
Nuvolar_Scanner_Android.app.navigate("Login",{ root: false });
|
||||
}
|
||||
else
|
||||
{
|
||||
SimpleQuery.UserName = username();
|
||||
SimpleQuery.Password = password();
|
||||
SimpleQuery.Database = database();
|
||||
SimpleQuery.Query = 'DX_GetStoragePDACollectionHeader_dxList';
|
||||
JSON_Text = JSON.stringify(SimpleQuery, null);
|
||||
$.getJSON(URL(), 'id='+JSON_Text, function (results) {
|
||||
dxListDataSource = JSON.parse(JSON.parse(results).Result);
|
||||
$("#dxlist").dxList({ dataSource: dxListDataSource });
|
||||
}).done(function () {
|
||||
//alert("second success");
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
|
||||
});
|
||||
};
|
||||
},
|
||||
dxListItemClickAction: function (e) {
|
||||
if (e.itemData.key != '') {
|
||||
//alert(e.itemData.key);
|
||||
Nuvolar_Scanner_Android.app.navigate({ view: "StoragePDACollectionEdit", id: e.itemData.key });
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
<div data-options="dxView : { name: 'Test', title: 'Test' } " >
|
||||
<div data-options="dxContent : { targetPlaceholder: 'content' } " class="dx-content-background">
|
||||
<p style="padding: 5px">To learn more about DevExtreme, check out the <a href="http://go.devexpress.com/DevExtreme_LearningCenter.aspx" target="_blank">Learning Center</a>.</p>
|
||||
<p style="padding: 5px">Note: To disable the simulator debugging environment, set the project's 'Run in Simulator' property to false.</p>
|
||||
<div data-bind="dxButton: { text: 'Button1',onClick: onClick }"></div>
|
||||
<div id="status" name="status">Status Message</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
Nuvolar_Scanner_Android.Test = function (params) {
|
||||
"use strict";
|
||||
|
||||
function errorHandler(transaction, error) {
|
||||
alert("Error : " + error.message + " in " + query);
|
||||
}
|
||||
|
||||
var viewModel = {
|
||||
onClick: function (e) {
|
||||
var db = openDatabase('mydb', '1.0', 'Test DB', 10 * 1024 * 1024);
|
||||
var msg;
|
||||
|
||||
db.transaction(function (tx) {
|
||||
//tx.executeSql('CREATE TABLE IF NOT EXISTS LOGS (id unique, log)',null,errorHandler);
|
||||
tx.executeSql('CREATE TABLE IF NOT EXISTS Products (id unique, ProductNumber, ShortName,Barcode)');
|
||||
//tx.executeSql('INSERT INTO LOGS (id, log) VALUES (1, "foobar")');
|
||||
//tx.executeSql('INSERT INTO LOGS (id, log) VALUES (2, "logmsg")');
|
||||
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (4, "Varuba")');
|
||||
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (3, "minyime")');
|
||||
msg = '<p>Log message created and row inserted.</p>';
|
||||
document.querySelector('#status').innerHTML = msg;
|
||||
});
|
||||
|
||||
db.transaction(function (tx) {
|
||||
tx.executeSql('SELECT * FROM LOGS', [], function (tx, results) {
|
||||
var len = results.rows.length, i;
|
||||
msg = "<p>Found rows: " + len + "</p>";
|
||||
document.querySelector('#status').innerHTML += msg;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
msg = "<p><b>" + results.rows.item(i).log + "</b></p>";
|
||||
document.querySelector('#status').innerHTML += msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}, null);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
<div data-options="dxView : { name: 'navigation', title: 'Menu' } " >
|
||||
<div class="home-view" data-options="dxContent : { targetPlaceholder: 'content' } " >
|
||||
<div data-bind="dxList: {}" style="height: 100%" data-options="dxCommandContainer : { id: 'global-navigation' } " >
|
||||
<div data-bind="visible: visible, css: { 'dx-state-disabled': disabled }" data-options="dxTemplate : { name: 'item' } " >
|
||||
<div data-bind="dxAction: onExecute">
|
||||
<div class="dx-navigation-item" data-bind="text: title"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
Nuvolar_Scanner_Android.navigation = function (params) {
|
||||
|
||||
$.each(Nuvolar_Scanner_Android.app.navigation, function (_, command) {
|
||||
command.option("root", false);
|
||||
})
|
||||
|
||||
var viewModel = {
|
||||
commands: Nuvolar_Scanner_Android.app.navigation
|
||||
};
|
||||
|
||||
return viewModel;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
Use this folder as a place for the project's views. To learn how to define views, refer to the http://js.devexpress.com/Documentation/Howto/SPA_Framework/Views_and_Layouts section in the documentation.
|
||||
Reference in New Issue
Block a user