|
|
@@ -18,6 +18,7 @@ import com.bonait.bnframework.common.constant.ConfigName; |
|
|
|
import com.bonait.bnframework.common.constant.DataBus; |
|
|
|
import com.bonait.bnframework.common.db.QueryDB; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; |
|
|
|
import com.bonait.bnframework.common.helper.I.MyClickListener; |
|
|
@@ -272,6 +273,12 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis |
|
|
|
ArrayList<BPA_GOODPROPERTY> ddd=QueryDB.GetGoodsPropertyALL(((BPA_GOODPROPERTY) data).id); |
|
|
|
for (BPA_GOODPROPERTY item:ddd) |
|
|
|
{ |
|
|
|
for(BPA_GOODSRECIPENAME goodsrecipename : QueryDB.GetGoodsSrecipeNameALL()){ |
|
|
|
if(goodsrecipename.name.contains(item.name)){ |
|
|
|
ToastUtils.info("已有配方正在使用该属性,请先删除配方【"+goodsrecipename.name+"】再删除该属性"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
QueryDB.DeleteGoodsProperty(item); |
|
|
|
} |
|
|
|
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data); |
|
|
@@ -310,6 +317,12 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis |
|
|
|
AlertDialogUtils.showDialog(context, title1, message1, new QMUIDialogAction.ActionListener() { |
|
|
|
@Override |
|
|
|
public void onClick(QMUIDialog dialog, int index) { |
|
|
|
for(BPA_GOODSRECIPENAME goodsrecipename : QueryDB.GetGoodsSrecipeNameALL()){ |
|
|
|
if(goodsrecipename.name.contains(((BPA_GOODPROPERTY) data).name)){ |
|
|
|
ToastUtils.info("已有配方正在使用该属性,请先删除配方【"+goodsrecipename.name+"】再删除该属性"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data); |
|
|
|
Initdata_sx(); |
|
|
|
ToastUtils.info("删除成功"); |
|
|
|