public bool AddStationModel(WHStation station)
        {
            WH_Station_LogicModel model = new WH_Station_LogicModel();

            model.WH_Station_Logic      = Guid.NewGuid().ToString();
            model.WH_Station_Logic_Name = station.WHStationLogicName;
            model.WH_Station_Logic_Type = station.WHStationLogicType;
            model.WareHouse_ID          = station.WareHouseID;
            model.Cell_Child_ID         = station.WHCellID;
            //WH_Cell_ChildrenModel child = new WH_Cell_ChildrenModel();
            //child.Cell_Child_Flag = "1";
            //child.Cell_Chlid_ID = station.WHCellID;
            //child.Cell_ID = station.WHCellID;
            //WH_CellModel cellModel = new WH_CellModel();
            //cellModel.Cell_ID = station.WHCellID;
            //cellModel.Cell_Row = 1;
            //cellModel.Cell_Column = 1;
            //cellModel.Cell_Layer = 1;
            //if (!bllCell.Add(cellModel))
            //{
            //    return false;
            //}
            //if (!bllCellChild.Add(child))
            //{
            //    return false;
            //}
            return(bllStationLogic.Add(model));
        }
Example #2
0
        private void sb_AddStation_Click(object sender, EventArgs e)
        {
            WHStation station = new WHStation();

            //station.WareHouseID = this.cbe_HouseList.Text.Trim();
            operStationLogicView.operateName = "添加";
            operStationLogicView.station     = station;
            operStationLogicView.ShowDialog();
        }
        public bool IsSaveSameName(WHStation station)
        {
            WH_Station_LogicModel model = bllStationLogic.GetStationByName(station.WareHouseID, station.WHStationLogicName);

            if (model != null)
            {
                return(true);
            }
            return(false);
        }
        public bool ModifyStationModel(string oldCellID, WHStation station)
        {
            WH_Station_LogicModel model = bllStationLogic.GetModelByHouseIDAndCellChlidID(station.WareHouseID, oldCellID);

            if (model == null)
            {
                return(false);
            }
            model.WH_Station_Logic_Name = station.WHStationLogicName;
            model.WH_Station_Logic_Type = station.WHStationLogicType;
            model.WareHouse_ID          = station.WareHouseID;
            model.Cell_Child_ID         = station.WHCellID;

            //WH_Cell_ChildrenModel child = new WH_Cell_ChildrenModel();
            //child.Cell_Child_Flag = "1";
            //child.Cell_Chlid_ID = station.WHCellID;
            //child.Cell_ID = station.WHCellID;
            //if (!bllStationLogic.Delete(station.WHStationLogic))
            //{
            //    return false;
            //}
            //if (!bllCellChild.Delete(oldCellID))
            //{
            //    return false;
            //}
            //if (!bllCell.Delete(oldCellID))
            //{
            //    return false;
            //}
            //WH_CellModel cellModel = new WH_CellModel();
            //cellModel.Cell_ID = station.WHCellID;
            //cellModel.Cell_Row = 1;
            //cellModel.Cell_Column = 1;
            //cellModel.Cell_Layer = 1;
            //if (!bllCell.Add(cellModel))
            //{
            //    return false;
            //}
            //if (!bllCellChild.Add(child))
            //{
            //    return false;
            //}
            if (!bllStationLogic.Update(model))
            {
                return(false);
            }
            return(true);
        }
Example #5
0
        private void sb_ModifyStation_Click(object sender, EventArgs e)
        {
            if (this.gv_StationList.GetSelectedRows() == null || this.gv_StationList.GetSelectedRows().Count() == 0)
            {
                this.ShowMessage("信息提示", "请选择要修改的库房区域!");
                return;
            }
            int       currRow = this.gv_StationList.GetSelectedRows()[0];
            WHStation station = new WHStation();

            station.WHStationLogic           = this.gv_StationList.GetRowCellValue(currRow, "工位逻辑编码").ToString();
            station.WHStationLogicName       = this.gv_StationList.GetRowCellValue(currRow, "工位逻辑名称").ToString();
            station.WHStationLogicType       = this.gv_StationList.GetRowCellValue(currRow, "工位逻辑类型").ToString();
            station.WareHouseID              = this.gv_StationList.GetRowCellValue(currRow, "库房编码").ToString();
            station.WHCellID                 = this.gv_StationList.GetRowCellValue(currRow, "工位编码").ToString();
            operStationLogicView.operateName = "修改";
            operStationLogicView.station     = station;
            operStationLogicView.ShowDialog();
        }