package cn.net.caoyao.cpzshandset.service.bll;

import java.util.List;

import android.content.Context;
import cn.net.caoyao.cpzshandset.db.dal.yth.YthConsigneeDal;
import cn.net.caoyao.cpzshandset.db.presenter.ConsigneeDal;
import cn.net.cpzslibs.prot.handset.bean.ConsigneeBean;

public class ConsigneeBll {
	private ConsigneeDal dal;
	public ConsigneeBll(Context context) {
		dal = new YthConsigneeDal(context);
	}

	/**
	 * 插入一条客户信息
	 * @param cBean
	 */
	public void insertConsignee(ConsigneeBean cBean){
		if (dal == null || cBean == null) {
			return;
		}
		dal.insertConsignee(cBean);
	}
	/**
	 * 插入所有的客户信息
	 * @param cBeans
	 */
	public void insertAllConsignee(List<ConsigneeBean> cBeans){
		if (dal == null || cBeans == null) {
			return;
		}
		dal.insertAllConsignee(cBeans);
	}
	/**
	 * 查询所有的客户信息
	 * @return
	 */
	public List<ConsigneeBean> queryAllConsigee(){
		if (dal == null) {
			return null;
		}
		return dal.queryAllConsigee();
	}
	/**
	 * 通过查询条件搜索客户信息
	 * @param condition
	 * @return
	 */
	public List<ConsigneeBean> searchConsigeeByCondition(String condition){
		if (dal == null) {
			return null;
		}
		return dal.searchConsigeeByCondition(condition);
	}
	/**
	 * 通过id查询客户信息
	 * @param id
	 * @return
	 */
	public ConsigneeBean queryConsigeeById(int id){
		if (dal == null) {
			return null;
		}
		return dal.queryConsigeeById(id);
	}
	/**
	 * 删除所有的客户信息
	 */
	public void deleteAllConsigee(){
		if (dal == null) {
			return;
		}
		dal.deleteAllConsigee();
	}
	


}
