using Epost.DAL; using Epost.Model; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Epost.BLL { public class StorageLocationBLL { OrdersDAL dal = new OrdersDAL(); AddressstorageDAL s_dal = new AddressstorageDAL(); //#region 查询货位信息 //public IList SelectStorageLocation(string address, string type, string state, string area, string ip, string location, int pages, int rows) //{ // DataTable dt = dal.SelectStorageLocation(address, type, state, area, ip, location, pages, rows); // IList StorageLocation = ModelConvertHelper.ConvertToModel(dt); // return StorageLocation; //} //#endregion #region 分页获取数据列表 #region /// /// 分页获取数据列表 /// public List GetCityListByPage(string strWhere, string orderby, int pageSize, int pageIndex, out int recordCount) { int startIndex = 0; int endIndex = 0; if (pageIndex <= 0) pageIndex = 1; //计算查询的开始行数与结束行数 startIndex = (pageIndex - 1) * pageSize + 1; endIndex = pageIndex * pageSize; return s_dal.GetLocationListByPage(strWhere, orderby, startIndex, endIndex, out recordCount); } #endregion #endregion #region 删除货位 public bool StorageLocationDel(string str) { bool dt = s_dal.DeleteLocation(str); return dt; } #endregion #region 查询货位绑定 public List Locational_BindingSel() { List li = s_dal.GetBlockByAreaList(); return li; } #endregion #region 更新货位 public bool StorageLocationSave(string address, string type, string state, string location, string controlIP, string shelfid, string block, string area, string username, string address_pre, string location_pre, string block_pre, string area_pre) { bool dt = s_dal.Locational_Save(address, type, state, location, controlIP, shelfid, block, area, username, address_pre, location_pre, block_pre, area_pre); return dt; } #endregion #region 保存货位绑定 public bool Locational_Binding_Save(string one, string two, string three, string four, string five, string six) { bool t = s_dal.Locational_Binding_Save(one, two, three, four, five, six); //update Addressstorage return t; } #endregion #region 分页获取货位绑定列表 #region /// /// 分页获取数据列表 /// public List GetLocationQuantityListByPage(string strWhere, string orderby, int pageSize, int pageIndex, out int recordCount) { int startIndex = 0; int endIndex = 0; if (pageIndex <= 0) pageIndex = 1; //计算查询的开始行数与结束行数 startIndex = (pageIndex - 1) * pageSize + 1; endIndex = pageIndex * pageSize; return s_dal.GetLocationQuantityListByPage(strWhere, orderby, startIndex, endIndex, out recordCount); } #endregion #endregion } }