First create solution
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user