This commit is contained in:
yadavendras
2017-01-24 12:23:35 +05:30
parent ecfb8e5406
commit 87f30fa116
4 changed files with 7 additions and 5 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">
+2
View File
@@ -3,6 +3,8 @@
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" filepath="$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" /> <module fileurl="file://$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" filepath="$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" />
<module fileurl="file://$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" filepath="$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" />
<module fileurl="file://$PROJECT_DIR$/GSKORANGEV1.iml" filepath="$PROJECT_DIR$/GSKORANGEV1.iml" />
<module fileurl="file://$PROJECT_DIR$/GSKORANGEV1.iml" filepath="$PROJECT_DIR$/GSKORANGEV1.iml" /> <module fileurl="file://$PROJECT_DIR$/GSKORANGEV1.iml" filepath="$PROJECT_DIR$/GSKORANGEV1.iml" />
</modules> </modules>
</component> </component>
@@ -3319,7 +3319,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
return filled; return filled;
} }
public boolean isMappingT2PData() { public boolean isMappingT2PData(String store_id, String categoryId) {
boolean filled = false; boolean filled = false;
Cursor dbcursor = null; Cursor dbcursor = null;
@@ -135,7 +135,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
data = new DailyDataMenuGetterSetter(); data = new DailyDataMenuGetterSetter();
data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p)); data.setCategory_name(getResources().getString(R.string.daily_data_menu_t2p));
if (db.isMappingT2PData()) { if (db.isMappingT2PData(store_id, categoryId)) {
if (db.isFilledT2P(store_id, categoryId)) { if (db.isFilledT2P(store_id, categoryId)) {
data.setCategory_img(R.mipmap.t2p_compliance_done); data.setCategory_img(R.mipmap.t2p_compliance_done);
} else { } else {
@@ -266,7 +266,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background)); holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
} }
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) { } else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) {
if (db.isMappingT2PData()) { if (db.isMappingT2PData(store_id, categoryId)) {
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark)); holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
} else { } else {
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background)); holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
@@ -299,7 +299,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
startActivity(intent); startActivity(intent);
} }
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) { } else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_t2p)))) {
if (db.isMappingT2PData()) { if (db.isMappingT2PData(store_id, categoryId)) {
Intent intent = new Intent(DailyDataMenuActivity.this, T2PComplianceActivity.class); Intent intent = new Intent(DailyDataMenuActivity.this, T2PComplianceActivity.class);
intent.putExtra("categoryName", dailyData.getCategory_name()); intent.putExtra("categoryName", dailyData.getCategory_name());
intent.putExtra("categoryId", categoryId); intent.putExtra("categoryId", categoryId);