/// <summary> /// 从第一排第一列第一层开始查找 /// </summary> /// <param name="logicAreaID">逻辑区域ID</param> /// <param name="gsStoreStatus">存储状态</param> /// <param name="gsType">货位类型</param> /// <returns></returns> public GoodsSiteModel GetGoodsSite(int logicAreaID, EnumGSStoreStatus gsStoreStatus , EnumGSRunStatus gsRunStatus, EnumGSType gsType) { GoodsSiteModel goodsSite = null; //bool isFind = false; //int rows = 0; //int columns = 0; //int layers = 0; //GetRowColumnLayer(logicAreaID, out rows, out columns, out layers); //for (int i = 1; i < rows + 1; i++) //{ // if (isFind == true) // { // break; // } // for (int j = 1; j < columns + 1; j++) // { // if (isFind == true) // { // break; // } // for (int k = 1; k < layers + 1; k++) // { // string wereStr = "GoodsSiteRow=" + i + " and GoodsSiteColumn =" + j + " and GoodsSiteLayer =" + k // + " and LogicStoreAreaID=" + logicAreaID + " and GoodsSiteStoreStatus ='" // + gsStoreStatus.ToString() + "' and GoodsSiteType ='" + gsType.ToString() + "'" // + "and GoodsSiteRunStatus = '" + gsRunStatus.ToString() +"'"; // //string wereStr = "GoodsSiteRow=" + i + " and GoodsSiteColumn =" + j // // + " and LogicStoreAreaID=" + logicAreaID + " and GoodsSiteStoreStatus ='" // // + gsStoreStatus.ToString() + "' and GoodsSiteType ='" + gsType.ToString() + "'"; // List<ECAMSDataAccess.GoodsSiteModel> goodsSiteList = GetModelList(wereStr); // if (goodsSiteList.Count > 0) // { // goodsSite = goodsSiteList[0]; // isFind = true; // break; // } // } // } //} string wereStr = "LogicStoreAreaID=" + logicAreaID + " and GoodsSiteStoreStatus ='" + gsStoreStatus.ToString() + "' and GoodsSiteRunStatus = '" + gsRunStatus.ToString() + "' and GoodsSiteType ='" + gsType.ToString() + "'order by GoodsSiteColumn asc," + "GoodsSiteRow asc,GoodsSiteLayer asc"; List <ECAMSDataAccess.GoodsSiteModel> goodsSiteList = GetModelList(wereStr); if (goodsSiteList.Count > 0) { goodsSite = goodsSiteList[0]; } return(goodsSite); }
private void OnOutHouseByHand() { if (this.eventOutHouseByHand != null && this.dgv_StockQuery.CurrentRow != null) { long[] stockIDArr = new long[this.dgv_StockQuery.SelectedRows.Count]; EnumProductStatus[] enumProductStatusArr = new EnumProductStatus[stockIDArr.Length]; EnumGSRunStatus[] gsRunStatusArr = new EnumGSRunStatus[stockIDArr.Length]; EnumGSStoreStatus[] gsStoreStatusArr = new EnumGSStoreStatus[stockIDArr.Length]; EnumTaskCategory[] GSTaskTypeArr = new EnumTaskCategory[stockIDArr.Length]; for (int i = 0; i < this.dgv_StockQuery.SelectedRows.Count; i++) { DataGridViewRow rowSelect = this.dgv_StockQuery.SelectedRows[i];// 从大到小 if (rowSelect != null) { long stockID = long.Parse(rowSelect.Cells["StockID"].Value.ToString()); string productStatus = rowSelect.Cells["ProductStatus"].Value.ToString(); string gsRunStatus = rowSelect.Cells["gs_RunStatus"].Value.ToString(); string gsStoreStatus = rowSelect.Cells["gs_StoreStatus"].Value.ToString(); string gsTaskType = rowSelect.Cells["gsTaskType"].Value.ToString(); if (stockID != 0 && productStatus != "") { stockIDArr[i] = stockID; enumProductStatusArr[i] = (EnumProductStatus)Enum.Parse(typeof(EnumProductStatus), productStatus); gsRunStatusArr[i] = (EnumGSRunStatus)Enum.Parse(typeof(EnumGSRunStatus), gsRunStatus); gsStoreStatusArr[i] = (EnumGSStoreStatus)Enum.Parse(typeof(EnumGSStoreStatus), gsStoreStatus); GSTaskTypeArr[i] = (EnumTaskCategory)Enum.Parse(typeof(EnumTaskCategory), gsTaskType); } } } StockEventArgs stockArgs = new StockEventArgs(); stockArgs.ProductStatusArr = enumProductStatusArr; stockArgs.StockIDArr = stockIDArr; stockArgs.GsRunStatusArr = gsRunStatusArr; stockArgs.GsStoreStatusArr = gsStoreStatusArr; stockArgs.GSTaskTypeArr = GSTaskTypeArr; this.eventOutHouseByHand.Invoke(this, stockArgs); } else { MessageBox.Show("请选择要出库的货位!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// 作者:np /// 时间:2014年4月16日 /// 内容:通过货位状态获取货位模型 /// </summary> public View_QueryStockListModel GetOutHouseModel(int goodsSiteID, EnumGSStoreStatus gsStoreStatus, EnumGSRunStatus gsRunStatus) { return(dal.GetOutHouseModel(goodsSiteID, gsStoreStatus.ToString(), gsRunStatus.ToString())); }
/// <summary> /// 得到一个对象实体 /// </summary> public GoodsSiteModel GetOutHouseModel(int GoodsSiteID, EnumGSStoreStatus gsStoreStatus, EnumGSRunStatus gsRunStatus) { return(dal.GetOutHouseModel(GoodsSiteID, gsStoreStatus.ToString(), gsRunStatus.ToString())); }