public bool SetMulLayerMulColGsArea(string houseName, string houseAreaID, int rowth, int stCol, int edCol, int stLayer, int edLayer) { //string strSql = " Cell_Row = " + rowth + " and Cell_Column >=" + stCol + " and Cell_Column<= " + edCol // + " and Cell_Layer>= " + stLayer + " and Cell_Layer<= " + edLayer; WH_WareHouseModel wareHouse = bllWareHouse.GetModelByName(houseName); if (wareHouse == null) { return(false); } DataSet ds = dal.GetAreaData(wareHouse.WareHouse_ID, rowth, stCol, edCol, stLayer, edLayer); List <WH_CellModel> gsList = DataTableToList(ds.Tables[0]); if (gsList == null) { return(false); } for (int i = 0; i < gsList.Count; i++) { gsList[i].Area_ID = houseAreaID; Update(gsList[i]); } return(true); }
/// <summary> /// /// </summary> /// <param name="houseName"></param> /// <param name="cate">0:排数,1:列数,2:层数,3:位置</param> /// <returns></returns> public List <string> GetGsRCLData(string houseName, int cate) { WH_WareHouseModel cell = bllWareHouse.GetModelByName(houseName); if (cell == null) { return(null); } List <string> data = new List <string>(); string sqlStr = "select distinct"; if (0 == cate)// 获取排数量 { sqlStr += " Cell_Row from View_Cell"; sqlStr += " where WareHouse_ID = " + cell.WareHouse_ID + " order by Cell_Row asc"; } else if (1 == cate)// 获取列数量 { sqlStr += " Cell_Column from View_Cell "; sqlStr += " where WareHouse_ID = " + cell.WareHouse_ID + " order by Cell_Column asc"; } else if (2 == cate)// 获取层数量 { sqlStr += " Cell_Layer from View_Cell "; sqlStr += " where WareHouse_ID = " + cell.WareHouse_ID + " order by Cell_Layer asc"; } else if (3 == cate) { sqlStr += " Cell_Chlid_Position from View_Cell"; sqlStr += " where WareHouse_ID = " + cell.WareHouse_ID + " order by Cell_Chlid_Position asc"; } else { return(null); } DataSet ds = DbHelperSQL.Query(sqlStr); if (ds != null && ds.Tables.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string item = ds.Tables[0].Rows[i][0].ToString(); if (item.Trim() == "" || item.Trim() == "0") { continue; } data.Add(item); } } else { return(null); } //data.Sort(); return(data); }
public bool SetSingleLayerCellEnabled(string houseName, bool enabled, int rowth, int layer, string cellPos) { WH_WareHouseModel house = bllWareHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.SetSingleLayerCellEnabled(house.WareHouse_ID, enabled, rowth, layer, cellPos)); }
public bool SetCellEnabledByCol(string houseName, bool enabled, int rowth, int startCol, int endCol) { WH_WareHouseModel house = bllWareHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.SetCellEnabledByCol(house.WareHouse_ID, enabled, rowth, startCol, endCol)); }
public List <View_CellModel> GetPutawayCellList(string houseName) { WH_WareHouseModel cell = bllWareHouse.GetModelByName(houseName); if (cell == null) { return(null); } string cellListStr = "WareHouse_ID = '" + cell.WareHouse_ID + "' and Cell_Type = '货位'"; return(GetModelList(cellListStr)); }
public bool DeleteAreaCells(string houseName) { WH_WareHouseModel wareHouse = bllWareHouse.GetModelByName(houseName); if (wareHouse == null) { return(false); } List <WH_AreaModel> areas = bllArea.GetModels(wareHouse.WareHouse_ID); if (areas == null) { return(false); } for (int i = 0; i < areas.Count; i++) { dal.DeleteByArea(areas[i].Area_ID); } return(true); }
public bool DeleteUnnecessaryGs(string houseName, int totalRow, int totalCol, int toalLayer) { WH_WareHouseModel wareHouse = bllWareHouse.GetModelByName(houseName); if (wareHouse == null) { return(false); } List <WH_AreaModel> areas = bllArea.GetModels(wareHouse.WareHouse_ID); if (areas == null) { return(false); } for (int i = 0; i < areas.Count; i++) { dal.DeleteUnnecessaryGs(areas[i].Area_ID, totalRow, totalCol, toalLayer); } return(true); }
public bool DeleteCells(string houseName, int rowth, int colth, int layerth) { WH_WareHouseModel wareHouse = bllWareHouse.GetModelByName(houseName); if (wareHouse == null) { return(false); } List <WH_AreaModel> areas = bllArea.GetModels(wareHouse.WareHouse_ID); if (areas == null) { return(false); } for (int i = 0; i < areas.Count; i++) { dal.DeleteByAreaAndRCL(areas[i].Area_ID, rowth, colth, layerth); } return(true); }