T2P upload data newss

This commit is contained in:
yadavendras
2017-01-20 12:50:56 +05:30
parent f8daaac242
commit 1bebe6d0f9
8 changed files with 145 additions and 134 deletions
+1 -1
View File
@@ -41,7 +41,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</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" />
</component>
<component name="ProjectType">
@@ -3,9 +3,11 @@ package cpm.com.gskmtorange.Database;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.HashMap;
@@ -55,9 +57,12 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
public static final int DATABASE_VERSION = 13;
TableBean tableBean;
private SQLiteDatabase db;
Context context;
public GSKOrangeDB(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
this.context = context;
}
public void open() {
@@ -71,53 +76,58 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(TableBean.getJourneyPlan());
try {
db.execSQL(TableBean.getJourneyPlan());
//Gagan Start
db.execSQL(TableBean.getBrandMaster());
db.execSQL(TableBean.getSkuMaster());
db.execSQL(TableBean.getCategoryMaster());
db.execSQL(TableBean.getSubCategoryMaster());
db.execSQL(TableBean.getDisplayMaster());
db.execSQL(TableBean.getMappingStock());
db.execSQL(TableBean.getMappingT2p());
db.execSQL(TableBean.getNonWorkingReason());
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
db.execSQL(CommonString.CREATE_TABLE_COVERAGE_DATA);
db.execSQL(TableBean.getDisplayChecklistMaster());
db.execSQL(TableBean.getMappingDisplayChecklist());
db.execSQL(TableBean.getMappingAdditionalPromotion());
db.execSQL(TableBean.getMappingPromotion());
//Gagan Start
db.execSQL(TableBean.getBrandMaster());
db.execSQL(TableBean.getSkuMaster());
db.execSQL(TableBean.getCategoryMaster());
db.execSQL(TableBean.getSubCategoryMaster());
db.execSQL(TableBean.getDisplayMaster());
db.execSQL(TableBean.getMappingStock());
db.execSQL(TableBean.getMappingT2p());
db.execSQL(TableBean.getNonWorkingReason());
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
db.execSQL(CommonString.CREATE_TABLE_COVERAGE_DATA);
db.execSQL(TableBean.getDisplayChecklistMaster());
db.execSQL(TableBean.getMappingDisplayChecklist());
db.execSQL(TableBean.getMappingAdditionalPromotion());
db.execSQL(TableBean.getMappingPromotion());
db.execSQL(CommonString.CREATE_TABLE_INSERT_MSL_AVAILABILITY);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_HEADER);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_CHILD);
db.execSQL(CommonString.CREATE_TABLE_STOCK_DIALOG);
db.execSQL(CommonString.CREATE_TABLE_STOCK_ADDITIONAL_STOCK_DATA);
db.execSQL(CommonString.CREATE_TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE);
db.execSQL(CommonString.CREATE_TABLE_INSERT_PROMO_SKU);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY_MAIN);
db.execSQL(CommonString.CREATE_TABLE_STOCK_DIALOG_MAIN);
db.execSQL(CommonString.CREATE_TABLE_INSERT_MSL_AVAILABILITY);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_HEADER);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_CHILD);
db.execSQL(CommonString.CREATE_TABLE_STOCK_DIALOG);
db.execSQL(CommonString.CREATE_TABLE_STOCK_ADDITIONAL_STOCK_DATA);
db.execSQL(CommonString.CREATE_TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE);
db.execSQL(CommonString.CREATE_TABLE_INSERT_PROMO_SKU);
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY_MAIN);
db.execSQL(CommonString.CREATE_TABLE_STOCK_DIALOG_MAIN);
db.execSQL(TableBean.getStorePerformance());
db.execSQL(TableBean.getStorePerformance());
//Gagan End
//Gagan End
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
db.execSQL(CommonString.CREATE_TABLE_COVERAGE_DATA);
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
db.execSQL(CommonString.CREATE_TABLE_COVERAGE_DATA);
db.execSQL(TableBean.getDisplayChecklistMaster());
db.execSQL(TableBean.getMappingDisplayChecklist());
db.execSQL(TableBean.getDisplayChecklistMaster());
db.execSQL(TableBean.getMappingDisplayChecklist());
db.execSQL(TableBean.getNonWorkingReason());
db.execSQL(TableBean.getNonWorkingReason());
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_COMPLIANCE);
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_GAPS);
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_SKU);
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_COMPLIANCE);
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_GAPS);
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_SKU);
db.execSQL(TableBean.getMappingPlanogram());
db.execSQL(TableBean.getAdditionalDisplay());
db.execSQL(TableBean.getMappingPlanogram());
db.execSQL(TableBean.getAdditionalDisplay());
} catch (SQLException e) {
e.printStackTrace();
Toast.makeText(context,"Error -" +e.toString(),Toast.LENGTH_SHORT).show();
}
}
@@ -143,6 +153,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
db.delete(CommonString.TABLE_INSERT_PROMO_SKU, "STORE_ID='" + storeid + "'", null);
//Gagan end code
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, "STORE_ID='" + storeid + "'", null);
}
public void deleteAllTables() {
@@ -162,6 +173,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
db.delete(CommonString.TABLE_INSERT_PROMO_SKU, null, null);
//Gagan end code
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, null, null);
}
public void InsertJCP(JourneyPlanGetterSetter data) {
@@ -311,7 +324,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
}
//get Brand data for T2P
public ArrayList<BrandMasterGetterSetter> getBrandT2PData(String store_type_id, String class_id, String key_account_id) {
public ArrayList<BrandMasterGetterSetter> getBrandT2PData(String store_type_id, String class_id, String key_account_id, String category_id) {
ArrayList<BrandMasterGetterSetter> brandList = new ArrayList<>();
Cursor dbcursor = null;
@@ -319,7 +332,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
try {
dbcursor = db.rawQuery("SELECT * FROM(SELECT DISTINCT BR.BRAND_ID, SCM.SUB_CATEGORY||'-'||BR.BRAND AS BRAND FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='" + key_account_id + "' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = '" + class_id + "' AND BR.COMPANY_ID ='1' ORDER BY SCM.SUB_CATEGORY_SEQUENCE, BR.BRAND_SEQUENCE) As Brand", null);
dbcursor = db.rawQuery("SELECT * FROM(SELECT DISTINCT BR.BRAND_ID, SCM.SUB_CATEGORY||'-'||BR.BRAND AS BRAND FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='" + key_account_id + "' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = '" + class_id + "' AND BR.COMPANY_ID ='1' AND SCM.CATEGORY_ID = '"+ category_id +"' ORDER BY SCM.SUB_CATEGORY_SEQUENCE, BR.BRAND_SEQUENCE ) As Brand", null);
if (dbcursor != null) {
dbcursor.moveToFirst();
@@ -1005,7 +1005,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
public void showSkuDialog() {
final ArrayList<BrandMasterGetterSetter> brandList = db.getBrandT2PData("1", "1", "1");
final ArrayList<BrandMasterGetterSetter> brandList = db.getBrandT2PData("1", "1", "1", categoryId);
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
brand.setBRAND(getResources().getString(R.string.select));
brandList.add(0, brand);
@@ -413,7 +413,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
final SkuGetterSetter[] sku_selected = new SkuGetterSetter[1];
final BrandMasterGetterSetter[] brand_selected = new BrandMasterGetterSetter[1];
final ArrayList<BrandMasterGetterSetter> brandList = db.getBrandT2PData(storeType_id, class_id, keyAccount_id);
final ArrayList<BrandMasterGetterSetter> brandList = db.getBrandT2PData(storeType_id, class_id, keyAccount_id, categoryId);
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
brand.setBRAND("select");
brandList.add(0, brand);
@@ -35,6 +35,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.text.DecimalFormat;
import java.util.Locale;
import cpm.com.gskmtorange.Database.GSKOrangeDB;
import cpm.com.gskmtorange.R;
import cpm.com.gskmtorange.constant.CommonString;
@@ -94,7 +95,7 @@ public class DownloadActivity extends AppCompatActivity {
preferences = PreferenceManager.getDefaultSharedPreferences(this);
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
userId = preferences.getString(CommonString.KEY_USERNAME, null);
culture_id = preferences.getString(CommonString.KEY_CULTURE_ID, "");
@@ -102,7 +103,6 @@ public class DownloadActivity extends AppCompatActivity {
}
class Data {
int value;
String name;
@@ -137,7 +137,7 @@ public class DownloadActivity extends AppCompatActivity {
data = new Data();
data.value = 10;
data.name = "JCP "+getResources().getString(R.string.download_data);
data.name = "JCP " + getResources().getString(R.string.download_data);
publishProgress(data);
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
@@ -178,7 +178,7 @@ public class DownloadActivity extends AppCompatActivity {
}
data.value = 10;
data.name = "JCP "+getResources().getString(R.string.download_data);
data.name = "JCP " + getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -214,7 +214,7 @@ public class DownloadActivity extends AppCompatActivity {
}
data.value = 20;
data.name = "SKU_MASTER "+getResources().getString(R.string.download_data);
data.name = "SKU_MASTER " + getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -250,7 +250,7 @@ public class DownloadActivity extends AppCompatActivity {
}
data.value = 25;
data.name = "BRAND_MASTER "+getResources().getString(R.string.download_data);
data.name = "BRAND_MASTER " + getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -285,7 +285,7 @@ public class DownloadActivity extends AppCompatActivity {
return "SUB_CATEGORY_MASTER";
}
data.value = 30;
data.name = "SUB_CATEGORY_MASTER "+getResources().getString(R.string.download_data);
data.name = "SUB_CATEGORY_MASTER " + getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -320,7 +320,7 @@ public class DownloadActivity extends AppCompatActivity {
return "CATEGORY_MASTER";
}
data.value = 35;
data.name = "CATEGORY_MASTER "+getResources().getString(R.string.download_data);
data.name = "CATEGORY_MASTER " + getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -355,11 +355,10 @@ public class DownloadActivity extends AppCompatActivity {
return "DISPLAY_MASTER";
}
data.value = 40;
data.name = "DISPLAY_MASTER "+getResources().getString(R.string.download_data);
data.name = "DISPLAY_MASTER " + getResources().getString(R.string.download_data);
}
publishProgress(data);
// MAPPING_STOCK
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
@@ -380,17 +379,20 @@ public class DownloadActivity extends AppCompatActivity {
xpp.next();
eventType = xpp.getEventType();
mappingStockGetterSetter = XMLHandlers.mappingStockXMLHandler(xpp, eventType);
if (mappingStockGetterSetter.getSKU_ID().size() > 0) {
String stocktable = mappingStockGetterSetter.getTable_MAPPING_STOCK();
if (stocktable != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingStock(stocktable);
}
} else {
return "MAPPING_STOCK";
String stocktable = mappingStockGetterSetter.getTable_MAPPING_STOCK();
if (stocktable != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingStock(stocktable);
}
data.value = 45;
data.name = "MAPPING_STOCK "+getResources().getString(R.string.download_data);
if (mappingStockGetterSetter.getSKU_ID().size() > 0) {
data.value = 45;
data.name = "MAPPING_STOCK " + getResources().getString(R.string.download_data);
} else {
// return "MAPPING_STOCK";
}
}
publishProgress(data);
@@ -415,17 +417,21 @@ public class DownloadActivity extends AppCompatActivity {
xpp.next();
eventType = xpp.getEventType();
mappingt2PGetterSetter = XMLHandlers.mappingT2pXMLHandler(xpp, eventType);
String t2ptable = mappingt2PGetterSetter.getTable_MAPPING_T2P();
if (t2ptable != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingT2p(t2ptable);
}
if (mappingt2PGetterSetter.getSTORE_ID().size() > 0) {
String t2ptable = mappingt2PGetterSetter.getTable_MAPPING_T2P();
if (t2ptable != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingT2p(t2ptable);
}
data.value = 50;
data.name = "MAPPING_T2P " + getResources().getString(R.string.download_data);
} else {
//return "MAPPING_T2P";
}
data.value = 50;
data.name = "MAPPING_T2P "+getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -459,7 +465,7 @@ public class DownloadActivity extends AppCompatActivity {
return "DISPLAY_CHECKLIST_MASTER";
}
data.value = 55;
data.name = "DISPLAY_CHECKLIST_MASTER "+getResources().getString(R.string.download_data);
data.name = "DISPLAY_CHECKLIST_MASTER " + getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -483,17 +489,20 @@ public class DownloadActivity extends AppCompatActivity {
xpp.next();
eventType = xpp.getEventType();
mappingChecklistGetterSetter = XMLHandlers.mappingMappingDisplayChecklistXMLHandler(xpp, eventType);
String mapping_display_checklisttable = mappingChecklistGetterSetter.getTable_MAPPING_DISPLAY_CHECKLIST();
if (mapping_display_checklisttable != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingDisplayChecklist(mapping_display_checklisttable);
}
if (mappingChecklistGetterSetter.getCHECKLIST_ID().size() > 0) {
String mapping_display_checklisttable = mappingChecklistGetterSetter.getTable_MAPPING_DISPLAY_CHECKLIST();
if (mapping_display_checklisttable != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingDisplayChecklist(mapping_display_checklisttable);
}
data.value = 60;
data.name = "MAPPING_DISPLAY_CHECKLIST " + getResources().getString(R.string.download_data);
} else {
//return "MAPPING_DISPLAY_CHECKLIST";
}
data.value = 60;
data.name = "MAPPING_DISPLAY_CHECKLIST "+getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -528,7 +537,7 @@ public class DownloadActivity extends AppCompatActivity {
return "NON_WORKING_REASON";
}
data.value = 65;
data.name = "NON_WORKING_REASON "+getResources().getString(R.string.download_data);
data.name = "NON_WORKING_REASON " + getResources().getString(R.string.download_data);
}
publishProgress(data);
@@ -553,17 +562,19 @@ public class DownloadActivity extends AppCompatActivity {
xpp.next();
eventType = xpp.getEventType();
mappingPromotionGetterSetter = XMLHandlers.mappingPromotionXMLHandler(xpp, eventType);
//if (mappingPromotionGetterSetter.getSTORE_ID().size() > 0) {
String mapping_promotion_table = mappingPromotionGetterSetter.getTable_MAPPING_PROMOTION();
if (mapping_promotion_table != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingPromotion(mapping_promotion_table);
}
/*} else {
//return "MAPPING_PROMOTION";
}*/
data.value = 70;
data.name = "MAPPING_PROMOTION "+getResources().getString(R.string.download_data);
if (mappingPromotionGetterSetter.getSTORE_ID().size() > 0) {
data.value = 70;
data.name = "MAPPING_PROMOTION " + getResources().getString(R.string.download_data);
}
}
publishProgress(data);
@@ -597,11 +608,13 @@ public class DownloadActivity extends AppCompatActivity {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingAdditionalPromotion(mapping_additional_promotion_table);
}
/*} else {
//return "MAPPING_ADDITIONAL_PROMOTION";
}*/
data.value = 75;
data.name = "MAPPING_ADDITIONAL_PROMOTION "+getResources().getString(R.string.download_data);
if (mapping_additional_promotion_masterGetterSetter.getSTORE_ID().size() > 0) {
data.value = 75;
data.name = "MAPPING_ADDITIONAL_PROMOTION " + getResources().getString(R.string.download_data);
}
}
publishProgress(data);
@@ -627,22 +640,23 @@ public class DownloadActivity extends AppCompatActivity {
eventType = xpp.getEventType();
store_performance_masterGetterSetter = XMLHandlers.STORE_PERFORMANCEXMLHandler(xpp, eventType);
String table_store_performace = store_performance_masterGetterSetter.getTable_STORE_PERFORMANCE();
if (table_store_performace != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setStorePerformance(table_store_performace);
}
if (store_performance_masterGetterSetter.getSTORE_ID().size() > 0) {
String table_store_performace = store_performance_masterGetterSetter.getTable_STORE_PERFORMANCE();
if (table_store_performace != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setStorePerformance(table_store_performace);
}
data.value = 80;
data.name = "STORE_PERFORMANCE Data Download";
} else {
//return "STORE_PERFORMANCE";
}
data.value = 80;
data.name = "STORE_PERFORMANCE Data Download";
}
publishProgress(data);
//ADDITIONAL_DISPLAY_MASTER
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
request.addProperty("UserName", userId);
@@ -699,17 +713,18 @@ public class DownloadActivity extends AppCompatActivity {
eventType = xpp.getEventType();
mapping_planogram_masterGetterSetter = XMLHandlers.MAPPING_PLANOGRAM_XMLHandler(xpp, eventType);
String table_mapping_planogram = mapping_planogram_masterGetterSetter.getTable_MAPPING_PLANOGRAM();
if (table_mapping_planogram != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingPlanogram(table_mapping_planogram);
}
if (mapping_planogram_masterGetterSetter.getKEYACCOUNT_ID().size() > 0) {
String table_mapping_planogram = mapping_planogram_masterGetterSetter.getTable_MAPPING_PLANOGRAM();
if (table_mapping_planogram != null) {
resultHttp = CommonString.KEY_SUCCESS;
TableBean.setMappingPlanogram(table_mapping_planogram);
}
data.value = 85;
data.name = "MAPPING_PLANOGRAM Data Download";
} else {
//return "MAPPING_PLANOGRAM";
}
data.value = 85;
data.name = "MAPPING_PLANOGRAM Data Download";
}
publishProgress(data);
@@ -775,7 +790,7 @@ public class DownloadActivity extends AppCompatActivity {
//Display Master Image save into folder
if (displayMasterGetterSetter != null) {
for (int i = 0; i < displayMasterGetterSetter.getIMAGE_URL().size(); i++) {
for (int i = 0; i < displayMasterGetterSetter.getIMAGE_URL().size(); i++) {
//publishing image download
data.value = data.value + 1;
if (data.value < 100) {
@@ -851,7 +866,6 @@ public class DownloadActivity extends AppCompatActivity {
db.InsertADDITIONAL_DISPLAY(additional_display_getter_setter);
} catch (MalformedURLException e) {
/*final AlertMessage message = new AlertMessage(
CompleteDownloadActivity.this,
@@ -923,21 +937,19 @@ public class DownloadActivity extends AppCompatActivity {
@Override
protected void 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) {
String lang ;
String lang;
if(language.equalsIgnoreCase("English")){
if (language.equalsIgnoreCase("English")) {
lang = "EN";
}
else if(language.equalsIgnoreCase("UAE")) {
} else if (language.equalsIgnoreCase("UAE")) {
lang = "AR";
}
else {
} else {
lang = "TR";
}
@@ -1043,30 +1043,15 @@ public class UploadActivity extends AppCompatActivity {
dialog.dismiss();
db.deleteAllTables();
showAlert(getString(R.string.menu_upload_data));
if (result.equals("")) {
showAlert(getString(R.string.menu_upload_data));
//showAlert(getString(R.string.menu_upload_data));
}
}
}
public void showAlert(String str) {
AlertDialog.Builder builder = new AlertDialog.Builder(UploadActivity.this);
builder.setTitle("Parinaam");
builder.setMessage(str).setCancelable(false)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
/* Intent i = new Intent(activity, StorelistActivity.class);
activity.startActivity(i);
activity.finish();*/
finish();
}
});
AlertDialog alert = builder.create();
alert.show();
}
@Override
@@ -159,9 +159,9 @@
<string name="title_store_list_activity_store_again_uploaded">Please Store data again Uploaded</string>
<string name="title_store_list_checkout_current">Lütfen önce mağazadan çık</string>
<string name="title_store_list_checkout_Already_filled">Doldurulmuş veriler</string>
<string name="NetworkError">Bağlantı kurulamıyor ,</string>
<string name="uploadeddata">Veriler Paylaşılıyor ,</string>
<string name="DataNot">Veriler Paylaşılmadı ,</string>
<string name="NetworkError">Bağlantı kurulamıyor</string>
<string name="uploadeddata">Veriler Paylaşılıyor</string>
<string name="DataNot">Veriler Paylaşılmadı</string>
<string name="delete">Sil</string>
<string name="adddatatoclick">Veri Eklemek İçin Evet tıklayın</string>
<string name="displayname">Teşhir Türü</string>
@@ -224,5 +224,6 @@
<string name="data_downloaded_successfully">Data downloaded successfully</string>
<string name="export_database">Export Database</string>
<string name="data_exported_successfully">Database Exported Successfully</string>
<string name="uploadeddata">Uploaded Data</string>
</resources>