Merge pull request #32 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/Ashishnewcode
newcode
This commit is contained in:
Generated
+2
@@ -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>
|
||||||
|
|||||||
@@ -408,4 +408,14 @@ public class CommonString {
|
|||||||
|
|
||||||
//Gagan Code End
|
//Gagan Code End
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_STOCK_ADDITIONAL_DATA = "ADDITIONAL_STOCK_DATA";
|
||||||
|
public static final String CREATE_TABLE_STOCK_ADDITIONAL_STOCK_DATA = "CREATE TABLE "
|
||||||
|
+ TABLE_INSERT_STOCK_ADDITIONAL_DATA + " (" + KEY_ID
|
||||||
|
+ " INTEGER PRIMARY KEY AUTOINCREMENT," + KEY_STORE_ID + " VARCHAR,"
|
||||||
|
+ KEY_BRAND_ID + " VARCHAR," + KEY_BRAND + " VARCHAR,"
|
||||||
|
+ KEY_SKU_ID + " VARCHAR,"
|
||||||
|
+ KEY_SKUNAME + " VARCHAR,"
|
||||||
|
+ KEY_IMAGE + " VARCHAR)";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-41
@@ -85,11 +85,11 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
|
|
||||||
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";
|
String store_id, date, intime, img_str, togglevalue = "1";
|
||||||
ImageView img_cam, img_clicked;
|
ImageView img_cam, img_clicked;
|
||||||
Button btn_add;
|
Button btn_add, btn_close;
|
||||||
EditText Edt_txt;
|
EditText Edt_txt;
|
||||||
MyAdaptorStock adapterData;
|
MyAdaptorStock adapterData;
|
||||||
ListView listviewlay;
|
ListView listviewlay;
|
||||||
@@ -197,9 +197,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
listdata = db.getAdditionalStock(store_id);
|
listdata = db.getAdditionalStock(store_id);
|
||||||
|
|
||||||
for(int k=0;k<listdata.size();k++)
|
for (int k = 0; k < listdata.size(); k++) {
|
||||||
{
|
String KeyID = listdata.get(k).getKey_id();
|
||||||
String KeyID= listdata.get(k).getKey_id();
|
|
||||||
|
|
||||||
uploadlist = db.getDialogStock(KeyID);
|
uploadlist = db.getDialogStock(KeyID);
|
||||||
|
|
||||||
@@ -225,7 +224,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
adGt.setStore_id(store_id);
|
adGt.setStore_id(store_id);
|
||||||
adGt.setBtn_toogle(togglevalue);
|
adGt.setBtn_toogle(togglevalue);
|
||||||
|
|
||||||
if (validateData(adGt,defdata)) {
|
if (validateData(adGt, defdata)) {
|
||||||
|
|
||||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||||
AdditionalVisibility.this);
|
AdditionalVisibility.this);
|
||||||
@@ -240,7 +239,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
|
||||||
db.InsertAdditionalData(adGt,defdata);
|
db.InsertAdditionalData(adGt, defdata);
|
||||||
|
|
||||||
spinner_brand_list.setSelection(0);
|
spinner_brand_list.setSelection(0);
|
||||||
|
|
||||||
@@ -637,12 +636,14 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
final Dialog dialog = new Dialog(AdditionalVisibility.this);
|
final Dialog dialog = new Dialog(AdditionalVisibility.this);
|
||||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||||
dialog.setContentView(R.layout.t2p_sku_dialog_layout);
|
dialog.setContentView(R.layout.additionalvisibilitydialoglayout);
|
||||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||||
//dialog.setCancelable(false);
|
//dialog.setCancelable(false);
|
||||||
spinner_brand = (Spinner) dialog.findViewById(R.id.spinner_brand);
|
spinner_brand = (Spinner) dialog.findViewById(R.id.spinner_brand);
|
||||||
spinner_sku = (Spinner) dialog.findViewById(R.id.spinner_sku);
|
spinner_sku = (Spinner) dialog.findViewById(R.id.spinner_sku);
|
||||||
btn_add = (Button) dialog.findViewById(R.id.btn_add);
|
btn_add = (Button) dialog.findViewById(R.id.btn_add);
|
||||||
|
btn_close = (Button) dialog.findViewById(R.id.btn_cancel);
|
||||||
|
|
||||||
Edt_txt = (EditText) dialog.findViewById(R.id.et_stock);
|
Edt_txt = (EditText) dialog.findViewById(R.id.et_stock);
|
||||||
listview = (ListView) dialog.findViewById(R.id.lv);
|
listview = (ListView) dialog.findViewById(R.id.lv);
|
||||||
linearlay = (LinearLayout) dialog.findViewById(R.id.list_layout);
|
linearlay = (LinearLayout) dialog.findViewById(R.id.list_layout);
|
||||||
@@ -679,6 +680,14 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
btn_close.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
dialog.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
btn_add.setOnClickListener(new View.OnClickListener() {
|
btn_add.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -699,8 +708,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
// ab.setCategory_id(category_id);
|
// ab.setCategory_id(category_id);
|
||||||
|
|
||||||
|
|
||||||
if(validateDialogData(ab))
|
if (validateDialogData(ab)) {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
defdata.add(ab);
|
defdata.add(ab);
|
||||||
@@ -717,9 +725,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
listview.invalidateViews();
|
listview.invalidateViews();
|
||||||
|
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
Snackbar.make(v, msg, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
Snackbar.make(v, msg, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1075,7 +1081,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean validateData(AddittionalGetterSetter data,ArrayList<AdditionalDialogGetterSetter> dialog) {
|
boolean validateData(AddittionalGetterSetter data, ArrayList<AdditionalDialogGetterSetter> dialog) {
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
|
|
||||||
String brandid = data.getBrand_id();
|
String brandid = data.getBrand_id();
|
||||||
@@ -1087,8 +1093,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
if (toggleid.equalsIgnoreCase("0")) {
|
if (toggleid.equalsIgnoreCase("0")) {
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
|
|
||||||
|
|
||||||
if (brandid.equalsIgnoreCase("") || skuid.equalsIgnoreCase("")) {
|
if (brandid.equalsIgnoreCase("") || skuid.equalsIgnoreCase("")) {
|
||||||
@@ -1101,17 +1106,13 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
|
|
||||||
errormsg = "Please Take a image";
|
errormsg = "Please Take a image";
|
||||||
|
|
||||||
}
|
} else if (dialog.size() == 0) {
|
||||||
else if (dialog.size()==0) {
|
|
||||||
|
|
||||||
errormsg = "Please fill sku data";
|
errormsg = "Please fill sku data";
|
||||||
flag = false;
|
flag = false;
|
||||||
|
|
||||||
|
|
||||||
}
|
} else {
|
||||||
|
|
||||||
|
|
||||||
else {
|
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1125,31 +1126,22 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
|||||||
boolean validateDialogData(AdditionalDialogGetterSetter data) {
|
boolean validateDialogData(AdditionalDialogGetterSetter data) {
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
|
|
||||||
String brandid=data.getBrand_id();
|
String brandid = data.getBrand_id();
|
||||||
String displayid=data.getSku_id();
|
String displayid = data.getSku_id();
|
||||||
String QTy=data.getQuantity();
|
String QTy = data.getQuantity();
|
||||||
|
|
||||||
|
|
||||||
if(brandid.equalsIgnoreCase("")||brandid==null)
|
if (brandid.equalsIgnoreCase("") || brandid == null) {
|
||||||
{
|
|
||||||
flag = false;
|
flag = false;
|
||||||
|
|
||||||
msg="Please Select Dropdown";
|
msg = "Please Select Dropdown";
|
||||||
}
|
} else if (displayid == null || displayid.equalsIgnoreCase("")) {
|
||||||
else if(displayid==null||displayid.equalsIgnoreCase(""))
|
|
||||||
{
|
|
||||||
flag = false;
|
flag = false;
|
||||||
msg="Please Select Dropdown";
|
msg = "Please Select Dropdown";
|
||||||
}
|
} else if (QTy.equalsIgnoreCase("") || QTy == null) {
|
||||||
|
|
||||||
|
|
||||||
else if(QTy.equalsIgnoreCase("") || QTy==null)
|
|
||||||
{
|
|
||||||
flag = false;
|
flag = false;
|
||||||
msg="Please enter Quantity";
|
msg = "Please enter Quantity";
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,180 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
card_view:cardBackgroundColor="@color/colorPrimary"
|
||||||
|
card_view:cardCornerRadius="20dp"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:paddingBottom="20dp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="@string/sku"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/text_size_normal" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/grey_background"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_brand"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="@string/brand" />
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/spinner_brand"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
|
android:layout_weight="2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/grey_background"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="@string/sku" />
|
||||||
|
|
||||||
|
<Spinner
|
||||||
|
android:id="@+id/spinner_sku"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/grey_background"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:text="@string/stock" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_stock"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:inputType="number" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/grey_background"
|
||||||
|
android:padding="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_add"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/add"/>
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_cancel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/cancel"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- <android.support.v7.widget.RecyclerView
|
||||||
|
android:background="@color/grey_background"
|
||||||
|
android:id="@+id/rec_sku"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>-->
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
card_view:cardBackgroundColor="@color/colorOrange"
|
||||||
|
card_view:cardCornerRadius="20dp"
|
||||||
|
|
||||||
|
>
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/list_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="95"
|
||||||
|
android:visibility="gone"
|
||||||
|
>
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/lv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:cacheColorHint="#00000000"
|
||||||
|
|
||||||
|
android:choiceMode="singleChoice"
|
||||||
|
android:divider="#ff9933"
|
||||||
|
android:dividerHeight="2dp"
|
||||||
|
android:fastScrollEnabled="true"
|
||||||
|
android:smoothScrollbar="true"></ListView>
|
||||||
|
</LinearLayout>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
Reference in New Issue
Block a user