Merge branch 'master' of https://github.com/CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GSKORANGEV2 into GG
This commit is contained in:
Generated
+1
-1
@@ -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">
|
||||
|
||||
@@ -553,7 +553,14 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
dialog.cancel();
|
||||
|
||||
if (checkout_status.equals(CommonString.KEY_INVALID) || checkout_status.equals(CommonString.KEY_VALID)) {
|
||||
GSKOrangeDB db = new GSKOrangeDB(StoreListActivity.this);
|
||||
db.open();
|
||||
|
||||
coverage = db.getCoverageWithStoreID_Data(storeCd);
|
||||
|
||||
if (coverage.size() > 0) {
|
||||
|
||||
if (coverage.get(0).getStatus().equals(CommonString.KEY_INVALID) || coverage.get(0).getStatus().equals(CommonString.KEY_VALID)) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
|
||||
builder.setMessage(R.string.DELETE_ALERT_MESSAGE)
|
||||
.setCancelable(false)
|
||||
@@ -567,7 +574,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
in.putExtra(CommonString.KEY_STORE_ID,current.getSTORE_ID());
|
||||
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||
startActivity(in);
|
||||
|
||||
}
|
||||
@@ -584,8 +591,14 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
AlertDialog alert = builder.create();
|
||||
|
||||
alert.show();
|
||||
} else {
|
||||
}
|
||||
else{
|
||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
in.putExtra(CommonString.KEY_STORE_ID,current.getSTORE_ID());
|
||||
startActivity(in);
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
in.putExtra(CommonString.KEY_STORE_ID,current.getSTORE_ID());
|
||||
|
||||
+349
-10
@@ -39,6 +39,7 @@ import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -78,6 +79,8 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
private FailureGetterSetter failureGetterSetter = null;
|
||||
private SharedPreferences preferences;
|
||||
private int factor, k = 0;
|
||||
ArrayList<CategoryPictureGetterSetter> adddata = new ArrayList<CategoryPictureGetterSetter>();
|
||||
ArrayList<CategoryPictureGetterSetter> listdat = new ArrayList<CategoryPictureGetterSetter>();
|
||||
|
||||
Object result = "";
|
||||
|
||||
@@ -600,11 +603,42 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
String additional_visibility_dialog_xml = "";
|
||||
onXML = "";
|
||||
String onXMLdIALOG = "";
|
||||
|
||||
String imageV1,imageV2,imageV3;
|
||||
|
||||
additionalVisibilityList = db.getAdditionalStockUpload(coverageList.get(i).getStoreId());
|
||||
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
for (int J = 0; J < additionalVisibilityList.size(); J++) {
|
||||
|
||||
if(additionalVisibilityList.get(J).getImage()==null)
|
||||
{
|
||||
imageV1="";
|
||||
}
|
||||
else{
|
||||
imageV1=additionalVisibilityList.get(J).getImage();
|
||||
}
|
||||
|
||||
if(additionalVisibilityList.get(J).getImage2()==null)
|
||||
{
|
||||
imageV2="";
|
||||
}
|
||||
else{
|
||||
imageV2=additionalVisibilityList.get(J).getImage2();
|
||||
}
|
||||
|
||||
if(additionalVisibilityList.get(J).getImage3()==null)
|
||||
{
|
||||
imageV3="";
|
||||
}
|
||||
else{
|
||||
imageV3=additionalVisibilityList.get(J).getImage3();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String KeyID = additionalVisibilityList.get(J).getKey_id();
|
||||
|
||||
additionalVisibilitySkuList = db.getDialogStockUpload(KeyID);
|
||||
@@ -655,13 +689,13 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
+ additionalVisibilityList.get(J).getBrand_id()
|
||||
+ "[/BRAND_ID]"*/
|
||||
+ "[IMAGE_URL]"
|
||||
+ additionalVisibilityList.get(J).getImage()
|
||||
+ imageV1 /*additionalVisibilityList.get(J).getImage()*/
|
||||
+ "[/IMAGE_URL]"
|
||||
+ "[IMAGE_URL1]"
|
||||
+ additionalVisibilityList.get(J).getImage2()
|
||||
+ imageV2 /*additionalVisibilityList.get(J).getImage2()*/
|
||||
+ "[/IMAGE_URL1]"
|
||||
+ "[IMAGE_URL2]"
|
||||
+ additionalVisibilityList.get(J).getImage3()
|
||||
+ imageV3 /*additionalVisibilityList.get(J).getImage3()*/
|
||||
+ "[/IMAGE_URL2]"
|
||||
+ "[DISPLAY_ID]"
|
||||
+ additionalVisibilityList.get(J).getSku_id()
|
||||
@@ -1098,8 +1132,168 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}*/
|
||||
//// ashish visibility image start
|
||||
|
||||
|
||||
|
||||
//Category Picture Data
|
||||
String Category_xml = "";
|
||||
|
||||
onXML = "";
|
||||
String onCategoryList = "";
|
||||
String CategoryLISTDATA = "";
|
||||
String image1,image2,image3,image4;
|
||||
|
||||
|
||||
adddata = db.getCategoryPictureUpload(coverageList.get(i).getStoreId());
|
||||
|
||||
if (adddata.size() > 0) {
|
||||
for (int J = 0; J < adddata.size(); J++) {
|
||||
|
||||
|
||||
if(adddata.get(J).getCategoryImage1()==null)
|
||||
{
|
||||
image1="";
|
||||
}
|
||||
else{
|
||||
image1=adddata.get(J).getCategoryImage1();
|
||||
}
|
||||
|
||||
if(adddata.get(J).getCategoryImage2()==null)
|
||||
{
|
||||
image2="";
|
||||
}
|
||||
else{
|
||||
image2=adddata.get(J).getCategoryImage2();
|
||||
}
|
||||
|
||||
if(adddata.get(J).getCategoryImage3()==null)
|
||||
{
|
||||
image3="";
|
||||
}
|
||||
else{
|
||||
image3=adddata.get(J).getCategoryImage3();
|
||||
}
|
||||
|
||||
if(adddata.get(J).getCategoryImage4()==null)
|
||||
{
|
||||
image4="";
|
||||
}
|
||||
else{
|
||||
image4=adddata.get(J).getCategoryImage4();
|
||||
}
|
||||
|
||||
|
||||
|
||||
String KeyID = adddata.get(J).getKEY_ID();
|
||||
|
||||
|
||||
|
||||
listdat = db.getCategoryPictureListUploaded(KeyID);
|
||||
|
||||
if (listdat.size() > 0) {
|
||||
|
||||
for (int k = 0; k < listdat.size(); k++) {
|
||||
|
||||
onCategoryList = "[SUB_CATEGORY_LIST]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
+ "[/USER_ID]"
|
||||
+ "[KEY_ID]"
|
||||
+ listdat.get(k).getCOMMON_ID()
|
||||
+ "[/KEY_ID]"
|
||||
+ "[SUB_CATEGORY_ID]"
|
||||
+ listdat.get(k).getSUB_CATEGORY_ID()
|
||||
+ "[/SUB_CATEGORY_ID]"
|
||||
+ "[SUB_CategoryImage1]"
|
||||
+ listdat.get(k).getSubCategoryCamera1()
|
||||
+ "[/SUB_CategoryImage1]"
|
||||
+ "[SUB_CategoryImage2]"
|
||||
+ listdat.get(k).getSubCategoryCamera2()
|
||||
+ "[/SUB_CategoryImage2]"
|
||||
+ "[/SUB_CATEGORY_LIST]";
|
||||
|
||||
CategoryLISTDATA = CategoryLISTDATA + onCategoryList;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
onXML = "[CATEGORY_LIST]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
+ "[/USER_ID]"
|
||||
+ "[KEY_ID]"
|
||||
+ adddata.get(J).getKEY_ID()
|
||||
+ "[/KEY_ID]"
|
||||
+ "[CATEGORY_ID]"
|
||||
+ adddata.get(J).getCategoryId()
|
||||
+ "[/CATEGORY_ID]"
|
||||
+ "[CAMERA_ALLOW]"
|
||||
+ adddata.get(J).getCamera_allow()
|
||||
+ "[/CAMERA_ALLOW]"
|
||||
|
||||
+ "[IMAGE_URL_1]"
|
||||
+ image1 /*adddata.get(J).getCategoryImage1()*/
|
||||
+ "[/IMAGE_URL_1]"
|
||||
+ "[IMAGE_URL_2]"
|
||||
+ image2 /*adddata.get(J).getCategoryImage2()*/
|
||||
+ "[/IMAGE_URL_2]"
|
||||
+ "[IMAGE_URL_3]"
|
||||
+ image3 /*adddata.get(J).getCategoryImage3()*/
|
||||
+ "[/IMAGE_URL_3]"
|
||||
+ "[IMAGE_URL_4]"
|
||||
+ image4 /*adddata.get(J).getCategoryImage4()*/
|
||||
+ "[/IMAGE_URL_4]"
|
||||
+ "[SUB_LIST]"
|
||||
+ CategoryLISTDATA
|
||||
+ "[/SUB_LIST]"
|
||||
+ "[/CATEGORY_LIST]";
|
||||
|
||||
|
||||
Category_xml = Category_xml + onXML;
|
||||
|
||||
CategoryLISTDATA = "";
|
||||
|
||||
}
|
||||
|
||||
final String sos_xml = "[DATA]" + Category_xml + "[/DATA]";
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "CATEGORY_PICTURE");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||
}
|
||||
|
||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_NO_DATA)) {
|
||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||
}
|
||||
|
||||
if (result.toString().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
data.value = 35;
|
||||
data.name = getString(R.string.additional_data_uploading);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
// ashish visibility image start
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
for (int i1 = 0; i1 < additionalVisibilityList.size(); i1++) {
|
||||
|
||||
@@ -1173,6 +1367,151 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
|
||||
//// ashish close image
|
||||
|
||||
|
||||
|
||||
// ashish SUB_CATEGORY_PICTURE start
|
||||
if (listdat.size() > 0) {
|
||||
for (int i1 = 0; i1 < listdat.size(); i1++) {
|
||||
|
||||
if (listdat.get(i1).getSubCategoryCamera1() != null && !listdat.get(i1).getSubCategoryCamera1().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera1()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera1(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (listdat.get(i1).getSubCategoryCamera2() != null && !listdat.get(i1).getSubCategoryCamera2().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera2(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ashish CATEGORY_PICTURE start
|
||||
if (adddata.size() > 0) {
|
||||
for (int i1 = 0; i1 < adddata.size(); i1++) {
|
||||
|
||||
if (adddata.get(i1).getCategoryImage1() != null && !adddata.get(i1).getCategoryImage1().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage1()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage1(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (adddata.get(i1).getCategoryImage2() != null && !adddata.get(i1).getCategoryImage2().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage2(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (adddata.get(i1).getCategoryImage3() != null && !adddata.get(i1).getCategoryImage3().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage3()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage3(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (adddata.get(i1).getCategoryImage4() != null && !adddata.get(i1).getCategoryImage4().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage4()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage4(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////Start store images
|
||||
|
||||
if (coverageList.size() > 0) {
|
||||
@@ -1230,14 +1569,14 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
if (new File(CommonString.FILE_PATH + t2PGetterSetters.get(m).getImage1()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage1(), "T2PImages1");
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage1(), "T2PImages");
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages1";
|
||||
return "T2PImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("T2P Images1 Uploaded");
|
||||
message.setText("T2P Images Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
@@ -1250,14 +1589,14 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
||||
if (new File(CommonString.FILE_PATH + t2PGetterSetters.get(m).getImage2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage2(), "T2PImages2");
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage2(), "T2PImages");
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages2";
|
||||
return "T2PImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("T2P Images2 Uploaded");
|
||||
message.setText("T2P Images Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -608,39 +608,30 @@ public class UploadActivity extends AppCompatActivity {
|
||||
onXML = "";
|
||||
String onXMLdIALOG = "";
|
||||
|
||||
String imageV1,imageV2,imageV3;
|
||||
String imageV1, imageV2, imageV3;
|
||||
|
||||
additionalVisibilityList = db.getAdditionalStockUpload(coverageList.get(i).getStoreId());
|
||||
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
for (int J = 0; J < additionalVisibilityList.size(); J++) {
|
||||
|
||||
if(additionalVisibilityList.get(J).getImage()==null)
|
||||
{
|
||||
imageV1="";
|
||||
}
|
||||
else{
|
||||
imageV1=additionalVisibilityList.get(J).getImage();
|
||||
if (additionalVisibilityList.get(J).getImage() == null) {
|
||||
imageV1 = "";
|
||||
} else {
|
||||
imageV1 = additionalVisibilityList.get(J).getImage();
|
||||
}
|
||||
|
||||
if(additionalVisibilityList.get(J).getImage2()==null)
|
||||
{
|
||||
imageV2="";
|
||||
}
|
||||
else{
|
||||
imageV2=additionalVisibilityList.get(J).getImage2();
|
||||
if (additionalVisibilityList.get(J).getImage2() == null) {
|
||||
imageV2 = "";
|
||||
} else {
|
||||
imageV2 = additionalVisibilityList.get(J).getImage2();
|
||||
}
|
||||
|
||||
if(additionalVisibilityList.get(J).getImage3()==null)
|
||||
{
|
||||
imageV3="";
|
||||
if (additionalVisibilityList.get(J).getImage3() == null) {
|
||||
imageV3 = "";
|
||||
} else {
|
||||
imageV3 = additionalVisibilityList.get(J).getImage3();
|
||||
}
|
||||
else{
|
||||
imageV3=additionalVisibilityList.get(J).getImage3();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String KeyID = additionalVisibilityList.get(J).getKey_id();
|
||||
@@ -811,18 +802,18 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
if (brandList.size() > 0) {
|
||||
|
||||
for (int M = 0; M < brandList.size(); M++) {
|
||||
for (int M = 0; M < brandList.size(); M++) {
|
||||
|
||||
brandchild = "[BRAND]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[BRAND_ID]" + brandList.get(M).getBRAND_ID() + "[/BRAND_ID]"
|
||||
brandchild = "[BRAND]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[BRAND_ID]" + brandList.get(M).getBRAND_ID() + "[/BRAND_ID]"
|
||||
/* + "[BRAND]" + brandList.get(M).getBRAND() + "[/BRAND]"*/
|
||||
+ "[COMMON_ID]" + Integer.parseInt(t2PGetterSetters.get(i1).getKey_id()) + "[/COMMON_ID]"
|
||||
+ "[/BRAND]";
|
||||
brandxml = brandxml + brandchild;
|
||||
+ "[COMMON_ID]" + Integer.parseInt(t2PGetterSetters.get(i1).getKey_id()) + "[/COMMON_ID]"
|
||||
+ "[/BRAND]";
|
||||
brandxml = brandxml + brandchild;
|
||||
}
|
||||
}
|
||||
}
|
||||
String present = "";
|
||||
if (t2PGetterSetters.get(i1).isPresent()) {
|
||||
present = "1";
|
||||
@@ -1138,14 +1129,13 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
//Category Picture Data
|
||||
String Category_xml = "";
|
||||
|
||||
onXML = "";
|
||||
String onCategoryList = "";
|
||||
String CategoryLISTDATA = "";
|
||||
String image1,image2,image3,image4;
|
||||
String image1, image2, image3, image4;
|
||||
|
||||
|
||||
adddata = db.getCategoryPictureUpload(coverageList.get(i).getStoreId());
|
||||
@@ -1154,44 +1144,34 @@ public class UploadActivity extends AppCompatActivity {
|
||||
for (int J = 0; J < adddata.size(); J++) {
|
||||
|
||||
|
||||
if(adddata.get(J).getCategoryImage1()==null)
|
||||
{
|
||||
image1="";
|
||||
}
|
||||
else{
|
||||
image1=adddata.get(J).getCategoryImage1();
|
||||
if (adddata.get(J).getCategoryImage1() == null) {
|
||||
image1 = "";
|
||||
} else {
|
||||
image1 = adddata.get(J).getCategoryImage1();
|
||||
}
|
||||
|
||||
if(adddata.get(J).getCategoryImage2()==null)
|
||||
{
|
||||
image2="";
|
||||
}
|
||||
else{
|
||||
image2=adddata.get(J).getCategoryImage2();
|
||||
if (adddata.get(J).getCategoryImage2() == null) {
|
||||
image2 = "";
|
||||
} else {
|
||||
image2 = adddata.get(J).getCategoryImage2();
|
||||
}
|
||||
|
||||
if(adddata.get(J).getCategoryImage3()==null)
|
||||
{
|
||||
image3="";
|
||||
}
|
||||
else{
|
||||
image3=adddata.get(J).getCategoryImage3();
|
||||
if (adddata.get(J).getCategoryImage3() == null) {
|
||||
image3 = "";
|
||||
} else {
|
||||
image3 = adddata.get(J).getCategoryImage3();
|
||||
}
|
||||
|
||||
if(adddata.get(J).getCategoryImage4()==null)
|
||||
{
|
||||
image4="";
|
||||
if (adddata.get(J).getCategoryImage4() == null) {
|
||||
image4 = "";
|
||||
} else {
|
||||
image4 = adddata.get(J).getCategoryImage4();
|
||||
}
|
||||
else{
|
||||
image4=adddata.get(J).getCategoryImage4();
|
||||
}
|
||||
|
||||
|
||||
|
||||
String KeyID = adddata.get(J).getKEY_ID();
|
||||
|
||||
|
||||
|
||||
listdat = db.getCategoryPictureListUploaded(KeyID);
|
||||
|
||||
if (listdat.size() > 0) {
|
||||
@@ -1241,7 +1221,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ image1 /*adddata.get(J).getCategoryImage1()*/
|
||||
+ "[/IMAGE_URL_1]"
|
||||
+ "[IMAGE_URL_2]"
|
||||
+ image2 /*adddata.get(J).getCategoryImage2()*/
|
||||
+ image2 /*adddata.get(J).getCategoryImage2()*/
|
||||
+ "[/IMAGE_URL_2]"
|
||||
+ "[IMAGE_URL_3]"
|
||||
+ image3 /*adddata.get(J).getCategoryImage3()*/
|
||||
@@ -1296,7 +1276,6 @@ public class UploadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
// ashish visibility image start
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
for (int i1 = 0; i1 < additionalVisibilityList.size(); i1++) {
|
||||
@@ -1372,58 +1351,65 @@ public class UploadActivity extends AppCompatActivity {
|
||||
//// ashish close image
|
||||
|
||||
|
||||
|
||||
// ashish SUB_CATEGORY_PICTURE start
|
||||
if (listdat.size() > 0) {
|
||||
for (int i1 = 0; i1 < listdat.size(); i1++) {
|
||||
if (adddata.size() > 0) {
|
||||
for (int J = 0; J < adddata.size(); J++) {
|
||||
|
||||
if (listdat.get(i1).getSubCategoryCamera1() != null && !listdat.get(i1).getSubCategoryCamera1().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera1()).exists()) {
|
||||
String KeyID = adddata.get(J).getKEY_ID();
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera1(), "CategoryImages");
|
||||
listdat = db.getCategoryPictureListUploaded(KeyID);
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
if (listdat.size() > 0) {
|
||||
for (int i1 = 0; i1 < listdat.size(); i1++) {
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
if (listdat.get(i1).getSubCategoryCamera1() != null && !listdat.get(i1).getSubCategoryCamera1().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera1()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera1(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (listdat.get(i1).getSubCategoryCamera2() != null && !listdat.get(i1).getSubCategoryCamera2().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera2(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (listdat.get(i1).getSubCategoryCamera2() != null && !listdat.get(i1).getSubCategoryCamera2().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(listdat.get(i1).getSubCategoryCamera2(), "CategoryImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ashish CATEGORY_PICTURE start
|
||||
if (adddata.size() > 0) {
|
||||
for (int i1 = 0; i1 < adddata.size(); i1++) {
|
||||
@@ -1515,7 +1501,6 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////Start store images
|
||||
|
||||
if (coverageList.size() > 0) {
|
||||
@@ -1573,14 +1558,14 @@ public class UploadActivity extends AppCompatActivity {
|
||||
if (new File(CommonString.FILE_PATH + t2PGetterSetters.get(m).getImage1()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage1(), "T2PImages1");
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage1(), "T2PImages");
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages1";
|
||||
return "T2PImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("T2P Images1 Uploaded");
|
||||
message.setText("T2P Images Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
@@ -1593,14 +1578,14 @@ public class UploadActivity extends AppCompatActivity {
|
||||
if (new File(CommonString.FILE_PATH + t2PGetterSetters.get(m).getImage2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage2(), "T2PImages2");
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage2(), "T2PImages");
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages2";
|
||||
return "T2PImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("T2P Images2 Uploaded");
|
||||
message.setText("T2P Images Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
@@ -1729,7 +1714,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
|
||||
lang = CommonString.KEY_RETURE_LANGUAGE_OMAN;
|
||||
}else{
|
||||
} else {
|
||||
lang = CommonString.KEY_RETURN_LANGUAGE_DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user