This commit is contained in:
ashishandroid
2017-01-18 13:38:39 +05:30
parent 370fc8127a
commit 9ff366cbeb
8 changed files with 545 additions and 159 deletions
+1 -1
View File
@@ -41,7 +41,7 @@
<ConfirmationsSetting value="0" id="Add" /> <ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" /> <ConfirmationsSetting value="0" id="Remove" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">
@@ -15,6 +15,7 @@ import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
import cpm.com.gskmtorange.GetterSetter.CoverageBean; import cpm.com.gskmtorange.GetterSetter.CoverageBean;
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans; import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
import cpm.com.gskmtorange.GetterSetter.StoreBean; import cpm.com.gskmtorange.GetterSetter.StoreBean;
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter; import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
@@ -116,6 +117,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_SKU); db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_SKU);
db.execSQL(TableBean.getMappingPlanogram()); db.execSQL(TableBean.getMappingPlanogram());
db.execSQL(TableBean.getAdditionalDisplay());
} }
@Override @Override
@@ -2614,6 +2617,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
long key_id = db.insert(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, null, values); long key_id = db.insert(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, null, values);
if(skulist!=null)
{
for (int j = 0; j < skulist.size(); j++) { for (int j = 0; j < skulist.size(); j++) {
values1.put(CommonString.KEY_Common_ID, key_id); values1.put(CommonString.KEY_Common_ID, key_id);
values1.put(CommonString.KEY_STORE_ID, skulist.get(j).getStore_id()); values1.put(CommonString.KEY_STORE_ID, skulist.get(j).getStore_id());
@@ -2626,7 +2632,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, null, values1); db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, null, values1);
} }
}
} catch (Exception ex) { } catch (Exception ex) {
Log.d("Database Exception ", ex.getMessage()); Log.d("Database Exception ", ex.getMessage());
@@ -2966,4 +2972,119 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
} }
public ArrayList<AddittionalGetterSetter> getAdditionalMainStock(String store_id, String categoryId) {
Cursor cursordata = null;
ArrayList<AddittionalGetterSetter> productData = new ArrayList<AddittionalGetterSetter>();
try {
// cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '"+store_id + "'categoryId = '"+categoryId + "'", null);
cursordata = db.rawQuery("Select * from Stock_Additional_visibility_Main " + "where categoryId='" + categoryId + "' and Store_Id='" + store_id + "'", null);
if (cursordata != null) {
cursordata.moveToFirst();
while (!cursordata.isAfterLast()) {
AddittionalGetterSetter sb = new AddittionalGetterSetter();
sb.setKey_id(cursordata.getString(cursordata
.getColumnIndexOrThrow("KEY_ID")));
sb.setStore_id(cursordata.getString(cursordata
.getColumnIndexOrThrow("Store_Id")));
sb.setCategoryId(cursordata.getString(cursordata
.getColumnIndexOrThrow("categoryId")));
sb.setBrand_id(cursordata.getString(cursordata
.getColumnIndexOrThrow("brand_id")));
sb.setBrand(cursordata.getString(cursordata
.getColumnIndexOrThrow("brand_name")));
sb.setImage(cursordata.getString(cursordata
.getColumnIndexOrThrow("image_url")));
sb.setSku_id(cursordata.getString(cursordata
.getColumnIndexOrThrow("sku_id")));
sb.setSku(cursordata.getString(cursordata
.getColumnIndexOrThrow("sku_name")));
sb.setBtn_toogle(cursordata.getString(cursordata
.getColumnIndexOrThrow("toggle_value")));
productData.add(sb);
cursordata.moveToNext();
}
cursordata.close();
}
} catch (Exception ex) {
}
return productData;
}
public void InsertADDITIONAL_DISPLAY(ADDITIONAL_DISPLAY_MASTERGetterSetter data) {
db.delete("ADDITIONAL_DISPLAY_MASTER", null, null);
ContentValues values = new ContentValues();
try {
for (int i = 0; i < data.getDISPLAY_ID().size(); i++) {
values.put("DISPLAY_ID", data.getDISPLAY_ID().get(i));
values.put("DISPLAY", data.getDISPLAY().get(i));
values.put("IMAGE_PATH", data.getIMAGE_PATH().get(i));
values.put("IMAGE_URL", data.getIMAGE_URL().get(i));
db.insert("ADDITIONAL_DISPLAY_MASTER", null, values);
}
} catch (Exception ex) {
Log.d("Exception ", " ADDITIONAL_DISPLAY_MASTER " + ex.toString());
}
}
public ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> getADDITIONAL_DISPLAYData(String store_id) {
Cursor cursordata = null;
ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> Data = new ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter>();
try {
cursordata = db.rawQuery("SELECT * FROM ADDITIONAL_DISPLAY_MASTER ", null);
if (cursordata != null) {
cursordata.moveToFirst();
while (!cursordata.isAfterLast()) {
ADDITIONAL_DISPLAY_MASTERGetterSetter sb = new ADDITIONAL_DISPLAY_MASTERGetterSetter();
sb.setDISPLAY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("DISPLAY_ID")));
sb.setDISPLAY(cursordata.getString(cursordata.getColumnIndexOrThrow("DISPLAY")));
sb.setIMAGE_URL(cursordata.getString(cursordata.getColumnIndexOrThrow("IMAGE_URL")));
sb.setIMAGE_PATH(cursordata.getString(cursordata.getColumnIndexOrThrow("IMAGE_PATH")));
Data.add(sb);
cursordata.moveToNext();
}
cursordata.close();
}
} catch (Exception ex) {
}
return Data;
}
} }
@@ -60,6 +60,7 @@ import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
import cpm.com.gskmtorange.R; import cpm.com.gskmtorange.R;
import cpm.com.gskmtorange.constant.CommonString; import cpm.com.gskmtorange.constant.CommonString;
import cpm.com.gskmtorange.gsk_dailyentry.DailyDataMenuActivity; import cpm.com.gskmtorange.gsk_dailyentry.DailyDataMenuActivity;
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
@@ -71,6 +72,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
public class AdditionalVisibility extends AppCompatActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener { public class AdditionalVisibility extends AppCompatActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener {
ArrayList<AdditionalDialogGetterSetter> list = new ArrayList<AdditionalDialogGetterSetter>(); ArrayList<AdditionalDialogGetterSetter> list = new ArrayList<AdditionalDialogGetterSetter>();
ArrayList<AddittionalGetterSetter> listdata = new ArrayList<AddittionalGetterSetter>(); ArrayList<AddittionalGetterSetter> listdata = new ArrayList<AddittionalGetterSetter>();
ArrayList<AddittionalGetterSetter> listMain = new ArrayList<AddittionalGetterSetter>();
ArrayList<AdditionalDialogGetterSetter> additionalVisibilitySkuList; ArrayList<AdditionalDialogGetterSetter> additionalVisibilitySkuList;
ArrayList<AdditionalDialogGetterSetter> additionalVisibilityinsertSkuList; ArrayList<AdditionalDialogGetterSetter> additionalVisibilityinsertSkuList;
ArrayList<AdditionalDialogGetterSetter> uploadlist = new ArrayList<AdditionalDialogGetterSetter>(); ArrayList<AdditionalDialogGetterSetter> uploadlist = new ArrayList<AdditionalDialogGetterSetter>();
@@ -92,25 +94,27 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
ArrayList<BrandMasterGetterSetter> brandList; ArrayList<BrandMasterGetterSetter> brandList;
ArrayList<BrandMasterGetterSetter> brand_list; ArrayList<BrandMasterGetterSetter> brand_list;
ArrayList<SkuMasterGetterSetter> skuMaster_list; ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> DisplayMaster_list;
//ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> DisplayMaster_list;
ArrayList<SkuGetterSetter> empty_list = new ArrayList<>(); ArrayList<SkuGetterSetter> empty_list = new ArrayList<>();
String _pathforcheck, _path, str, msg; String _pathforcheck, _path, str, msg;
private SharedPreferences preferences; private SharedPreferences preferences;
String store_id, date, intime, img_str, togglevalue = "1",CATEGORY_ID,camera_allow; String store_id, date, intime, img_str, togglevalue = "1", CATEGORY_ID, camera_allow;
ImageView img_cam, img_clicked; ImageView img_cam, img_clicked;
Button btn_add, btn_close; Button btn_add, btn_close;
EditText Edt_txt; EditText Edt_txt;
MyAdaptorStock adapterData; MyAdaptorStock adapterData;
ListView listviewlay; ListView listviewlay;
String errormsg,categoryName,categoryId; String errormsg, categoryName, categoryId;
MyAdaptorAdditionalStock adapteradditional; MyAdaptorAdditionalStock adapteradditional;
AddittionalGetterSetter adGt,newadd; AddittionalGetterSetter adGt, newadd;
LinearLayout brandlayout, diaplylayout, cameralayout; LinearLayout brandlayout, diaplylayout, cameralayout;
FloatingActionButton fab; FloatingActionButton fab;
//RelativeLayout skulayout; //RelativeLayout skulayout;
CardView cardvew,maincard; CardView cardvew, maincard;
String gallery_package = ""; String gallery_package = "";
Uri outputFileUri; Uri outputFileUri;
@@ -128,7 +132,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
preferences = PreferenceManager.getDefaultSharedPreferences(this); preferences = PreferenceManager.getDefaultSharedPreferences(this);
store_id = preferences.getString(CommonString.KEY_STORE_ID, null); store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, ""); camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, "")); updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
categoryName = getIntent().getStringExtra("categoryName"); categoryName = getIntent().getStringExtra("categoryName");
categoryId = getIntent().getStringExtra("categoryId"); categoryId = getIntent().getStringExtra("categoryId");
@@ -161,7 +165,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
///band List ///band List
brand_list = db.getBrandMasterData(store_id); brand_list = db.getBrandMasterData(store_id);
BrandMasterGetterSetter brand = new BrandMasterGetterSetter(); BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
String str= getResources().getString(R.string.select); String str = getResources().getString(R.string.select);
brand.setBRAND(str); brand.setBRAND(str);
brand_list.add(0, brand); brand_list.add(0, brand);
CustomAdapter adapter = new CustomAdapter(AdditionalVisibility.this, R.layout.custom_spinner_item, brand_list); CustomAdapter adapter = new CustomAdapter(AdditionalVisibility.this, R.layout.custom_spinner_item, brand_list);
@@ -170,12 +174,12 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
///Display List ///Display List
skuMaster_list = db.getSKUMasterData(store_id); DisplayMaster_list = db.getADDITIONAL_DISPLAYData(store_id);
SkuMasterGetterSetter select = new SkuMasterGetterSetter(); ADDITIONAL_DISPLAY_MASTERGetterSetter select = new ADDITIONAL_DISPLAY_MASTERGetterSetter();
select.setSKU(str); select.setDISPLAY_ID(str);
skuMaster_list.add(0, select); DisplayMaster_list.add(0, select);
CustomSkuMasterAdpter skuadapter = new CustomSkuMasterAdpter(AdditionalVisibility.this, R.layout.custom_spinner_item, skuMaster_list); CustomSkuMasterAdpter skuadapter = new CustomSkuMasterAdpter(AdditionalVisibility.this, R.layout.custom_spinner_item, DisplayMaster_list);
spinner_sku_list.setAdapter(skuadapter); spinner_sku_list.setAdapter(skuadapter);
spinner_brand_list.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { spinner_brand_list.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@@ -202,8 +206,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
if (position != 0) { if (position != 0) {
sku_list_name = skuMaster_list.get(position).getSKU().get(0); sku_list_name = DisplayMaster_list.get(position).getDISPLAY().get(0);
sku_list_id = skuMaster_list.get(position).getSKU_ID().get(0); sku_list_id = DisplayMaster_list.get(position).getDISPLAY_ID().get(0);
} }
} }
@@ -214,19 +218,18 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
} }
}); });
listdata = db.getAdditionalStock(store_id,categoryId); /// maintable
listMain = db.getAdditionalMainStock(store_id, categoryId);
for (int k = 0; k < listdata.size(); k++) { for (int k = 0; k < listMain.size(); k++) {
String tooglevalue= listdata.get(k).getBtn_toogle(); String tooglevalue = listMain.get(k).getBtn_toogle();
if(tooglevalue.equalsIgnoreCase("0")) if (tooglevalue.equalsIgnoreCase("0")) {
{
btnaddlayout.setVisibility(View.INVISIBLE); btnaddlayout.setVisibility(View.INVISIBLE);
cardvew.setVisibility(View.INVISIBLE); cardvew.setVisibility(View.INVISIBLE);
listviewlay.setVisibility(View.INVISIBLE); listviewlay.setVisibility(View.INVISIBLE);
maincard.setVisibility(View.INVISIBLE); maincard.setVisibility(View.INVISIBLE);
btntoggle.setChecked(false); btntoggle.setChecked(false);
brandlayout.setVisibility(View.INVISIBLE); brandlayout.setVisibility(View.INVISIBLE);
@@ -241,6 +244,27 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
} }
listdata = db.getAdditionalStock(store_id, categoryId);
for (int k = 0; k < listdata.size(); k++) {
String tooglevalue = listdata.get(k).getBtn_toogle();
if (tooglevalue.equalsIgnoreCase("0")) {
btnaddlayout.setVisibility(View.INVISIBLE);
cardvew.setVisibility(View.INVISIBLE);
listviewlay.setVisibility(View.INVISIBLE);
maincard.setVisibility(View.INVISIBLE);
btntoggle.setChecked(false);
brandlayout.setVisibility(View.INVISIBLE);
diaplylayout.setVisibility(View.INVISIBLE);
cameralayout.setVisibility(View.INVISIBLE);
btnsku.setVisibility(View.INVISIBLE);
}
}
if (listdata.size() > 0) { if (listdata.size() > 0) {
for (int i = 0; i < listdata.size(); i++) { for (int i = 0; i < listdata.size(); i++) {
@@ -266,64 +290,112 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
@Override @Override
public void onClick(View view) { public void onClick(View view) {
listdata = db.getAdditionalStock(store_id,categoryId); if (togglevalue.equals("1")) {
if(listdata.size()>0) listdata = db.getAdditionalStock(store_id, categoryId);
{
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
AdditionalVisibility.this);
// set title
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_save));
// set dialog message
alertDialogBuilder
.setMessage(getResources().getString(R.string.title_activity_save_data))
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
db.deleteStockEntryMainTable(store_id,categoryId); if (listdata.size() > 0) {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
AdditionalVisibility.this);
// set title
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_save));
// set dialog message
alertDialogBuilder
.setMessage(getResources().getString(R.string.title_activity_save_data))
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
for (int J = 0; J < listdata.size(); J++) { db.deleteStockEntryMainTable(store_id, categoryId);
newadd = new AddittionalGetterSetter();
newadd.setBrand(listdata.get(J).getBrand_id());
newadd.setBrand_id(listdata.get(J).getBrand_id());
newadd.setImage(listdata.get(J).getImage());
newadd.setSku(listdata.get(J).getSku());
newadd.setSku_id(listdata.get(J).getSku_id());
newadd.setStore_id(listdata.get(J).getStore_id());
newadd.setBtn_toogle(listdata.get(J).getBtn_toogle());
newadd.setCategoryId(listdata.get(J).getCategoryId());
String KeyID = listdata.get(J).getKey_id();
additionalVisibilitySkuList = db.getDialogStock(KeyID);
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList,categoryId); for (int J = 0; J < listdata.size(); J++) {
newadd = new AddittionalGetterSetter();
newadd.setBrand(listdata.get(J).getBrand_id());
newadd.setBrand_id(listdata.get(J).getBrand_id());
newadd.setImage(listdata.get(J).getImage());
newadd.setSku(listdata.get(J).getSku());
newadd.setSku_id(listdata.get(J).getSku_id());
newadd.setStore_id(listdata.get(J).getStore_id());
newadd.setBtn_toogle(listdata.get(J).getBtn_toogle());
newadd.setCategoryId(listdata.get(J).getCategoryId());
String KeyID = listdata.get(J).getKey_id();
additionalVisibilitySkuList = db.getDialogStock(KeyID);
KeyID=""; db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList, categoryId);
additionalVisibilitySkuList.clear();
KeyID = "";
additionalVisibilitySkuList.clear();
}
finish();
}
})
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// if this button is clicked, just close
// the dialog box and do nothing
dialog.cancel();
}
});
// create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create();
// show it
alertDialog.show();
} else {
Snackbar.make(view, getResources().getString(R.string.title_activity_Want_add), Snackbar.LENGTH_LONG).setAction("Action", null).show();
}
} else {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
AdditionalVisibility.this);
// set title
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_save));
// set dialog message
alertDialogBuilder
.setMessage(getResources().getString(R.string.title_activity_save_data))
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
db.deleteStockEntryall(store_id, categoryId);
newadd = new AddittionalGetterSetter();
newadd.setBrand(brand_list_name);
newadd.setBrand_id(brand_list_id);
newadd.setImage(img_str);
newadd.setSku(sku_list_name);
newadd.setSku_id(sku_list_id);
newadd.setStore_id(store_id);
newadd.setBtn_toogle(togglevalue);
newadd.setCategoryId(categoryId);
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList, categoryId);
finish();
} }
finish(); })
} .setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
}) public void onClick(DialogInterface dialog, int id) {
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() { // if this button is clicked, just close
public void onClick(DialogInterface dialog, int id) { // the dialog box and do nothing
// if this button is clicked, just close dialog.cancel();
// the dialog box and do nothing }
dialog.cancel(); });
}
});
// create alert dialog // create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create(); AlertDialog alertDialog = alertDialogBuilder.create();
// show it // show it
alertDialog.show(); alertDialog.show();
}
}else
{
Snackbar.make(view, getResources().getString(R.string.title_activity_Want_add), Snackbar.LENGTH_LONG).setAction("Action", null).show();
}
}}); }
});
btnaddlayout.setOnClickListener(new View.OnClickListener() { btnaddlayout.setOnClickListener(new View.OnClickListener() {
@@ -352,7 +424,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() { .setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
db.InsertAdditionalData(adGt, defdata,categoryId); db.InsertAdditionalData(adGt, defdata, categoryId);
spinner_brand_list.setSelection(0); spinner_brand_list.setSelection(0);
spinner_sku_list.setSelection(0); spinner_sku_list.setSelection(0);
img_str = ""; img_str = "";
@@ -362,29 +434,22 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
sku_list_id = ""; sku_list_id = "";
defdata.clear(); defdata.clear();
if(camera_allow.equals("1")) if (camera_allow.equals("1")) {
{
btnimage.setBackgroundResource(R.mipmap.camera_orange); btnimage.setBackgroundResource(R.mipmap.camera_orange);
}else } else {
{
btnimage.setBackgroundResource(R.mipmap.camera_grey); btnimage.setBackgroundResource(R.mipmap.camera_grey);
} }
listdata = db.getAdditionalStock(store_id, categoryId);
listdata = db.getAdditionalStock(store_id,categoryId);
if (listdata.size() > 0) { if (listdata.size() > 0) {
for(int i=0;i<listdata.size();i++) for (int i = 0; i < listdata.size(); i++) {
{ if (listdata.get(i).getBtn_toogle().equalsIgnoreCase("0")) {
if(listdata.get(i).getBtn_toogle().equalsIgnoreCase("0"))
{
listviewlay.setVisibility(View.INVISIBLE); listviewlay.setVisibility(View.INVISIBLE);
maincard.setVisibility(View.INVISIBLE); maincard.setVisibility(View.INVISIBLE);
cardvew.setVisibility(View.INVISIBLE); cardvew.setVisibility(View.INVISIBLE);
btnaddlayout.setVisibility(View.INVISIBLE); btnaddlayout.setVisibility(View.INVISIBLE);
} } else {
else
{
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata); adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
listviewlay.setAdapter(adapteradditional); listviewlay.setAdapter(adapteradditional);
listviewlay.invalidateViews(); listviewlay.invalidateViews();
@@ -427,10 +492,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if (btntoggle.isChecked()) { if (btntoggle.isChecked()) {
listdata = db.getAdditionalStock(store_id,categoryId); listdata = db.getAdditionalStock(store_id, categoryId);
if(listdata.size()>0) if (listdata.size() > 0) {
{
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
AdditionalVisibility.this); AdditionalVisibility.this);
// set title // set title
@@ -442,7 +506,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() { .setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
togglevalue = "1"; togglevalue = "1";
db.deleteStockEntryall(store_id,categoryId); btntoggle.setChecked(true);
db.deleteStockEntryall(store_id, categoryId);
brandlayout.setVisibility(View.VISIBLE); brandlayout.setVisibility(View.VISIBLE);
diaplylayout.setVisibility(View.VISIBLE); diaplylayout.setVisibility(View.VISIBLE);
cameralayout.setVisibility(View.VISIBLE); cameralayout.setVisibility(View.VISIBLE);
@@ -450,8 +515,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
btnaddlayout.setVisibility(View.VISIBLE); btnaddlayout.setVisibility(View.VISIBLE);
cardvew.setVisibility(View.VISIBLE); cardvew.setVisibility(View.VISIBLE);
listviewlay.setVisibility(View.VISIBLE); listviewlay.setVisibility(View.VISIBLE);
maincard.setVisibility(View.VISIBLE); maincard.setVisibility(View.INVISIBLE);
listdata = db.getAdditionalStock(store_id,categoryId); listdata = db.getAdditionalStock(store_id, categoryId);
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata); adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
listviewlay.setAdapter(adapteradditional); listviewlay.setAdapter(adapteradditional);
@@ -463,6 +528,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
// if this button is clicked, just close // if this button is clicked, just close
// the dialog box and do nothing // the dialog box and do nothing
dialog.cancel(); dialog.cancel();
btntoggle.setChecked(false);
} }
}); });
@@ -471,26 +537,75 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
// show it // show it
alertDialog.show(); alertDialog.show();
}else } else {
{
togglevalue = "1"; listMain = db.getAdditionalMainStock(store_id, categoryId);
brandlayout.setVisibility(View.VISIBLE);
diaplylayout.setVisibility(View.VISIBLE); if(listMain.size()>0)
cameralayout.setVisibility(View.VISIBLE); {
btnsku.setVisibility(View.VISIBLE);
btnaddlayout.setVisibility(View.VISIBLE); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
cardvew.setVisibility(View.VISIBLE); AdditionalVisibility.this);
listviewlay.setVisibility(View.VISIBLE); // set title
maincard.setVisibility(View.VISIBLE); alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_to_delete));
// set dialog message
alertDialogBuilder
.setMessage(getResources().getString(R.string.title_activity_click_delete))
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
db.deleteStockEntryall(store_id, categoryId);
togglevalue = "1";
btntoggle.setChecked(true);
brandlayout.setVisibility(View.VISIBLE);
diaplylayout.setVisibility(View.VISIBLE);
cameralayout.setVisibility(View.VISIBLE);
btnsku.setVisibility(View.VISIBLE);
btnaddlayout.setVisibility(View.VISIBLE);
cardvew.setVisibility(View.VISIBLE);
listviewlay.setVisibility(View.INVISIBLE);
maincard.setVisibility(View.INVISIBLE);
}
})
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// if this button is clicked, just close
// the dialog box and do nothing
dialog.cancel();
btntoggle.setChecked(false);
}
});
// create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create();
// show it
alertDialog.show();
}
else{
togglevalue = "1";
btntoggle.setChecked(true);
brandlayout.setVisibility(View.VISIBLE);
diaplylayout.setVisibility(View.VISIBLE);
cameralayout.setVisibility(View.VISIBLE);
btnsku.setVisibility(View.VISIBLE);
btnaddlayout.setVisibility(View.VISIBLE);
cardvew.setVisibility(View.VISIBLE);
listviewlay.setVisibility(View.INVISIBLE);
maincard.setVisibility(View.INVISIBLE);
}
} }
} else { } else {
listdata = db.getAdditionalStock(store_id,categoryId); listdata = db.getAdditionalStock(store_id, categoryId);
if(listdata.size()>0) if (listdata.size() > 0) {
{
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
AdditionalVisibility.this); AdditionalVisibility.this);
// set title // set title
@@ -502,27 +617,31 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
.setCancelable(false) .setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() { .setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
db.deleteStockEntryall(store_id,categoryId); db.deleteStockEntryall(store_id, categoryId);
togglevalue = "0"; togglevalue = "0";
btntoggle.setChecked(false);
defdata.clear(); defdata.clear();
btnaddlayout.setVisibility(View.INVISIBLE);
brandlayout.setVisibility(View.INVISIBLE); brandlayout.setVisibility(View.INVISIBLE);
diaplylayout.setVisibility(View.INVISIBLE); diaplylayout.setVisibility(View.INVISIBLE);
cameralayout.setVisibility(View.INVISIBLE); cameralayout.setVisibility(View.INVISIBLE);
btnsku.setVisibility(View.INVISIBLE); btnsku.setVisibility(View.INVISIBLE);
maincard.setVisibility(View.INVISIBLE);
listdata = db.getAdditionalStock(store_id,categoryId); listdata = db.getAdditionalStock(store_id, categoryId);
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata); adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
listviewlay.setAdapter(adapteradditional); listviewlay.setAdapter(adapteradditional);
listviewlay.invalidateViews(); listviewlay.invalidateViews();
} }
}) })
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() { .setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { public void onClick(DialogInterface dialog, int id) {
// if this button is clicked, just close // if this button is clicked, just close
// the dialog box and do nothing // the dialog box and do nothing
btntoggle.setChecked(true);
dialog.cancel(); dialog.cancel();
} }
}); });
@@ -532,14 +651,16 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
// show it // show it
alertDialog.show(); alertDialog.show();
} }
else else {
{
togglevalue = "0"; togglevalue = "0";
defdata.clear(); defdata.clear();
btntoggle.setChecked(false);
btnaddlayout.setVisibility(View.INVISIBLE);
brandlayout.setVisibility(View.INVISIBLE); brandlayout.setVisibility(View.INVISIBLE);
diaplylayout.setVisibility(View.INVISIBLE); diaplylayout.setVisibility(View.INVISIBLE);
cameralayout.setVisibility(View.INVISIBLE); cameralayout.setVisibility(View.INVISIBLE);
btnsku.setVisibility(View.INVISIBLE); btnsku.setVisibility(View.INVISIBLE);
maincard.setVisibility(View.INVISIBLE);
} }
} }
@@ -547,15 +668,13 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
}); });
if (camera_allow.equals("1")) {
if(camera_allow.equals("1")){
btnimage.setOnClickListener(new View.OnClickListener() { btnimage.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
_pathforcheck = store_id + getResources().getString(R.string.store) _pathforcheck = store_id + getResources().getString(R.string.store)
+getResources().getString(R.string.image) + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg"; + getResources().getString(R.string.image) + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
_path = CommonString.FILE_PATH + _pathforcheck; _path = CommonString.FILE_PATH + _pathforcheck;
intime = getCurrentTime(); intime = getCurrentTime();
@@ -564,22 +683,13 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
} }
}); });
} } else {
else {
btnimage.setBackgroundResource(R.mipmap.camera_grey); btnimage.setBackgroundResource(R.mipmap.camera_grey);
} }
btnsku.setOnClickListener(new View.OnClickListener() { btnsku.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@@ -745,7 +855,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
private Activity activity; private Activity activity;
private ArrayList data; private ArrayList data;
SkuMasterGetterSetter tempValues = null; ADDITIONAL_DISPLAY_MASTERGetterSetter tempValues = null;
LayoutInflater inflater; LayoutInflater inflater;
/************* /*************
@@ -785,7 +895,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
/***** Get each Model object from Arraylist ********/ /***** Get each Model object from Arraylist ********/
tempValues = null; tempValues = null;
tempValues = (SkuMasterGetterSetter) data.get(position); tempValues = (ADDITIONAL_DISPLAY_MASTERGetterSetter) data.get(position);
TextView label = (TextView) row.findViewById(R.id.tv_text); TextView label = (TextView) row.findViewById(R.id.tv_text);
@@ -796,7 +906,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
//sub.setText(""); //sub.setText("");
} else { } else {
// Set values for spinner each row // Set values for spinner each row
label.setText(tempValues.getSKU().get(0)); label.setText(tempValues.getDISPLAY().get(0));
} }
return row; return row;
@@ -853,8 +963,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri); intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
intent.setPackage(defaultCameraPackage); intent.setPackage(defaultCameraPackage);
startActivityForResult(intent, 0); startActivityForResult(intent, 0);
} } catch (ActivityNotFoundException e) {
catch (ActivityNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
@@ -862,11 +971,11 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
intent.setPackage(gallery_package); intent.setPackage(gallery_package);
startActivityForResult(intent, 0); startActivityForResult(intent, 0);
} } catch (Exception e) {
catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
@@ -1318,11 +1427,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
db.deleteStockEntry(listdata.get(position1).getKey_id()); db.deleteStockEntry(listdata.get(position1).getKey_id());
adapteradditional.notifyDataSetChanged(); adapteradditional.notifyDataSetChanged();
listdata = db.getAdditionalStock(store_id,categoryId); listdata = db.getAdditionalStock(store_id, categoryId);
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata); adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
@@ -1402,9 +1509,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
errormsg = getResources().getString(R.string.title_activity_select_dropdown); errormsg = getResources().getString(R.string.title_activity_select_dropdown);
} } else if (camera_allow.equals("1")) {
else if(camera_allow.equals("1"))
{
if (imageu == null || imageu.equalsIgnoreCase("")) { if (imageu == null || imageu.equalsIgnoreCase("")) {
flag = false; flag = false;
@@ -1412,8 +1517,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
} }
} } else if (dialog.size() == 0) {
else if (dialog.size() == 0) {
errormsg = getResources().getString(R.string.title_activity_fill_sku); errormsg = getResources().getString(R.string.title_activity_fill_sku);
flag = false; flag = false;
@@ -1459,21 +1563,19 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, "")); updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
} }
private static boolean updateResources(Context context, String language) { private static boolean updateResources(Context context, String language) {
String lang ; String lang;
if(language.equalsIgnoreCase("English")){ if (language.equalsIgnoreCase("English")) {
lang = "EN"; lang = "EN";
} } else if (language.equalsIgnoreCase("UAE")) {
else if(language.equalsIgnoreCase("UAE")) {
lang = "AR"; lang = "AR";
} } else {
else {
lang = "TR"; lang = "TR";
} }
@@ -38,6 +38,7 @@ import java.util.Locale;
import cpm.com.gskmtorange.Database.GSKOrangeDB; import cpm.com.gskmtorange.Database.GSKOrangeDB;
import cpm.com.gskmtorange.R; import cpm.com.gskmtorange.R;
import cpm.com.gskmtorange.constant.CommonString; import cpm.com.gskmtorange.constant.CommonString;
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
@@ -76,6 +77,8 @@ public class DownloadActivity extends AppCompatActivity {
MappingPromotionGetterSetter mappingPromotionGetterSetter; MappingPromotionGetterSetter mappingPromotionGetterSetter;
MAPPING_ADDITIONAL_PROMOTION_MasterGetterSetter mapping_additional_promotion_masterGetterSetter; MAPPING_ADDITIONAL_PROMOTION_MasterGetterSetter mapping_additional_promotion_masterGetterSetter;
STORE_PERFORMANCE_MasterGetterSetter store_performance_masterGetterSetter; STORE_PERFORMANCE_MasterGetterSetter store_performance_masterGetterSetter;
ADDITIONAL_DISPLAY_MASTERGetterSetter additional_display_getter_setter;
MAPPING_PLANOGRAM_MasterGetterSetter mapping_planogram_masterGetterSetter; MAPPING_PLANOGRAM_MasterGetterSetter mapping_planogram_masterGetterSetter;
private Dialog dialog; private Dialog dialog;
private ProgressBar pb; private ProgressBar pb;
@@ -639,6 +642,42 @@ public class DownloadActivity extends AppCompatActivity {
publishProgress(data); publishProgress(data);
//ADDITIONAL_DISPLAY_MASTER
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
request.addProperty("Type", "ADDITIONAL_DISPLAY_MASTER");
request.addProperty("cultureid", culture_id);
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
androidHttpTransport = new HttpTransportSE(CommonString.URL);
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
result = envelope.getResponse();
if (result.toString() != null) {
xpp.setInput(new StringReader(result.toString()));
xpp.next();
eventType = xpp.getEventType();
additional_display_getter_setter = XMLHandlers.ADDITIONAL_DISPLAY_MASTERXMLHandler(xpp, eventType);
if (additional_display_getter_setter.getDISPLAY_ID().size() > 0) {
String table_store_display = additional_display_getter_setter.getTable_STORE_ADDITIONAL_DISPLAY();
if (table_store_display != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setAdditionalDisplay(table_store_display);
}
} else {
//return "ADDITIONAL_DISPLAY_MASTER";
}
data.value = 100;
data.name = "ADDITIONAL_DISPLAY_MASTER Data Download";
}
publishProgress(data);
//MAPPING_PLANOGRAM //MAPPING_PLANOGRAM
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD); request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId); request.addProperty("UserName", userId);
@@ -754,6 +793,9 @@ public class DownloadActivity extends AppCompatActivity {
db.InsertSTORE_PERFORMANCE(store_performance_masterGetterSetter); db.InsertSTORE_PERFORMANCE(store_performance_masterGetterSetter);
db.InsertMAPPING_PLANOGRAM(mapping_planogram_masterGetterSetter); db.InsertMAPPING_PLANOGRAM(mapping_planogram_masterGetterSetter);
db.InsertADDITIONAL_DISPLAY(additional_display_getter_setter);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
/*final AlertMessage message = new AlertMessage( /*final AlertMessage message = new AlertMessage(
@@ -0,0 +1,64 @@
package cpm.com.gskmtorange.xmlGetterSetter;
import java.util.ArrayList;
/**
* Created by ashishc on 18-01-2017.
*/
public class ADDITIONAL_DISPLAY_MASTERGetterSetter {
ArrayList<String> DISPLAY_ID = new ArrayList<>();
public String getTable_STORE_ADDITIONAL_DISPLAY() {
return table_STORE_ADDITIONAL_DISPLAY;
}
public void setTable_STORE_ADDITIONAL_DISPLAY(String table_STORE_ADDITIONAL_DISPLAY) {
this.table_STORE_ADDITIONAL_DISPLAY = table_STORE_ADDITIONAL_DISPLAY;
}
String table_STORE_ADDITIONAL_DISPLAY;
public ArrayList<String> getDISPLAY() {
return DISPLAY;
}
public void setDISPLAY(String DISPLAY) {
this.DISPLAY.add(DISPLAY);
}
public ArrayList<String> getDISPLAY_ID() {
return DISPLAY_ID;
}
public void setDISPLAY_ID(String DISPLAY_ID) {
this.DISPLAY_ID.add(DISPLAY_ID);
}
public ArrayList<String> getIMAGE_URL() {
return IMAGE_URL;
}
public void setIMAGE_URL(String IMAGE_URL) {
this.IMAGE_URL.add(IMAGE_URL);
}
ArrayList<String> DISPLAY = new ArrayList<>();
ArrayList<String> IMAGE_URL = new ArrayList<>();
public ArrayList<String> getIMAGE_PATH() {
return IMAGE_PATH;
}
public void setIMAGE_PATH(String IMAGE_PATH) {
this.IMAGE_PATH.add(IMAGE_PATH);
}
ArrayList<String> IMAGE_PATH = new ArrayList<>();
}
@@ -24,6 +24,16 @@ public class TableBean {
public static String STORE_PERFORMANCE; public static String STORE_PERFORMANCE;
public static String MAPPING_PLANOGRAM; public static String MAPPING_PLANOGRAM;
public static String getAdditionalDisplay() {
return ADDITIONAL_DISPLAY;
}
public static void setAdditionalDisplay(String additionalDisplay) {
ADDITIONAL_DISPLAY = additionalDisplay;
}
public static String ADDITIONAL_DISPLAY;
//Gagan end code //Gagan end code
public static String getJourneyPlan() { public static String getJourneyPlan() {
@@ -5,6 +5,7 @@ import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException; import java.io.IOException;
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter; import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
@@ -708,4 +709,49 @@ public class XMLHandlers {
return st; return st;
} }
//Gagan End Code //Gagan End Code
public static ADDITIONAL_DISPLAY_MASTERGetterSetter ADDITIONAL_DISPLAY_MASTERXMLHandler(XmlPullParser xpp, int eventType) {
ADDITIONAL_DISPLAY_MASTERGetterSetter st = new ADDITIONAL_DISPLAY_MASTERGetterSetter();
try {
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
if (xpp.getEventType() == XmlPullParser.START_TAG) {
if (xpp.getName().equals("META_DATA")) {
st.setTable_STORE_ADDITIONAL_DISPLAY(xpp.nextText());
}
if (xpp.getName().equals("DISPLAY_ID")) {
st.setDISPLAY_ID(xpp.nextText());
}
if (xpp.getName().equals("DISPLAY")) {
st.setDISPLAY(xpp.nextText());
}
if (xpp.getName().equals("IMAGE_URL")) {
st.setIMAGE_URL(xpp.nextText());
}
if (xpp.getName().equals("IMAGE_PATH")) {
st.setIMAGE_PATH(xpp.nextText());
}
}
xpp.next();
}
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return st;
}
} }
+14 -13
View File
@@ -92,7 +92,7 @@
<string name="promo_compliance_inStock">Ürün Bulunuyor</string> <string name="promo_compliance_inStock">Ürün Bulunuyor</string>
<string name="promo_compliance_promoAnnouncer">Duyuru Var</string> <string name="promo_compliance_promoAnnouncer">Duyuru Var</string>
<string name="promo_compliance_runningPOS">Kasa Okuyor</string> <string name="promo_compliance_runningPOS">Kasa Okuyor</string>
<string name="promo_compliance_add">Add</string> <string name="promo_compliance_add">Ekle</string>
<string name="category_performance_period">Zaman</string> <string name="category_performance_period">Zaman</string>
<string name="category_performance_msl_availability">Bulunurluk</string> <string name="category_performance_msl_availability">Bulunurluk</string>
@@ -146,22 +146,23 @@
<string name="uploadimge">Fotoğraflar paylaşılıyor</string> <string name="uploadimge">Fotoğraflar paylaşılıyor</string>
<string name="success">Başarı</string> <string name="success">Başarı</string>
<string name="wantcheckout">Mağazadan çıkmak istiyor musunuz?</string> <string name="wantcheckout">Mağazadan çıkmak istiyor musunuz?</string>
<string name="nonetwork">No Network Connection. Please check your Internet Connection</string> <string name="nonetwork">Bağlantı kurulamıyor. İnternet bağlantınızı kontrol ediniz</string>
<string name="click_image">En az bir fotoğraf çekiniz</string> <string name="click_image">En az bir fotoğraf çekiniz</string>
<string name="title_store_list_activity_already_store_closed">Store Already Closed</string> <string name="title_store_list_activity_already_store_closed">Mağaza kapalı</string>
<string name="title_store_list_activity_store_closed">Store Closed</string> <string name="title_store_list_activity_store_closed">Mağaza kapalı</string>
<string name="title_store_list_activity_store_already_done">Store Already Uploaded</string> <string name="title_store_list_activity_store_already_done">Paylaşılan mağaza</string>
<string name="title_store_list_activity_store_data_uploaded">Store Data Uploaded</string> <string name="title_store_list_activity_store_data_uploaded">Paylaşılan mağaza</string>
<string name="title_store_list_activity_store_already_checkout">Store Already Checkout</string> <string name="title_store_list_activity_store_already_checkout">Mağaza zaten çıkılmış</string>
<string name="title_store_list_activity_store_again_uploaded">Please Store data again Uploaded</string> <string name="title_store_list_activity_store_again_uploaded">Please Store data again Uploaded</string>
<string name="title_store_list_checkout_current">Please checkout from current store</string> <string name="title_store_list_checkout_current">Lütfen önce mağazadan çık</string>
<string name="title_store_list_checkout_Already_filled">Data already filled</string> <string name="title_store_list_checkout_Already_filled">Doldurulmuş veriler</string>
<string name="NetworkError">Network Error ,</string> <string name="NetworkError">Bağlantı kurulamıyor ,</string>
<string name="uploadeddata"> Uploaded Data ,</string> <string name="uploadeddata">Veriler Paylaşılıyor ,</string>
<string name="DataNot"> Data Not Uploaded ,</string> <string name="DataNot">Veriler Paylaşılmadı ,</string>
<string name="delete">Delete</string> <string name="delete">Sil</string>
<string name="adddatatoclick">Click Yes To Add Data</string> <string name="adddatatoclick">Click Yes To Add Data</string>
<string name="displayname">Teşhir Türü</string>