예제 #1
0
파일: WHCellView.cs 프로젝트: qq5013/WMS-6
        private void sb_AddCell_Click(object sender, EventArgs e)
        {
            WHCell cell = new WHCell();

            //cell.CellType = this.txtEdit_CellType.Text.Trim();
            operCellView.InitControl();
            operCellView.operateName = "添加";
            operCellView.cell        = cell;
            operCellView.ShowDialog();
        }
예제 #2
0
파일: WHCellView.cs 프로젝트: qq5013/WMS-6
        private void sb_ModifyCell_Click(object sender, EventArgs e)
        {
            if (this.gv_CellList.GetSelectedRows() == null || this.gv_CellList.GetSelectedRows().Count() == 0)
            {
                this.ShowMessage("信息提示", "请选择要修改的库房区域!");
                return;
            }
            int    currRow = this.gv_CellList.GetSelectedRows()[0];
            WHCell cell    = new WHCell();

            cell.CellID     = this.gv_CellList.GetRowCellValue(currRow, "工位编号").ToString();
            cell.AreaID     = this.gv_CellList.GetRowCellValue(currRow, "库区编码").ToString();
            cell.CellCode   = this.gv_CellList.GetRowCellValue(currRow, "工位编码").ToString();
            cell.CellName   = this.gv_CellList.GetRowCellValue(currRow, "工位名称").ToString();
            cell.DeviceCode = this.gv_CellList.GetRowCellValue(currRow, "设备编码").ToString();
            cell.CellInOut  = this.gv_CellList.GetRowCellValue(currRow, "工位方向").ToString();
            cell.CellType   = this.gv_CellList.GetRowCellValue(currRow, "工位类型").ToString();

            operCellView.operateName = "修改";
            operCellView.cell        = cell;
            operCellView.ShowDialog();
        }
예제 #3
0
        public bool ModifyCellModel(WHCell cell)
        {
            WH_CellModel cellModel = bllCell.GetModel(cell.CellID);

            if (cellModel == null)
            {
                return(false);
            }
            WH_AreaModel area = bllArea.GetModelByCode("11001", cell.AreaID);

            if (area == null)
            {
                return(false);
            }
            cellModel.Area_ID     = area.Area_ID;
            cellModel.Cell_Code   = cell.CellCode;
            cellModel.Cell_InOut  = cell.CellInOut;
            cellModel.Cell_Name   = cell.CellName;
            cellModel.Cell_Type   = cell.CellType;
            cellModel.Device_Code = cell.CellID;
            cellModel.Cell_ID     = cell.CellID;
            return(bllCell.Update(cellModel));
        }
예제 #4
0
        public bool AddCellModel(WHCell cell)
        {
            WH_Cell_ChildrenModel childModel = new WH_Cell_ChildrenModel();
            WH_AreaModel          area       = bllArea.GetModelByCode("11001", cell.AreaID);

            if (area == null)
            {
                return(false);
            }
            WH_CellModel cellModel = bllCell.GetModel(cell.CellID);

            if (cellModel != null)
            {
                this.View.ShowMessage("信息提示", "此工位编号已存在!");
                return(false);
            }
            cellModel             = new WH_CellModel();
            cellModel.Cell_ID     = cell.CellID;
            cellModel.Area_ID     = area.Area_ID;
            cellModel.Cell_Code   = cell.CellCode;
            cellModel.Cell_InOut  = cell.CellInOut;
            cellModel.Cell_Name   = cell.CellName;
            cellModel.Cell_Type   = cell.CellType;
            cellModel.Device_Code = cell.CellID;
            cellModel.Cell_Row    = 1;
            cellModel.Cell_Column = 1;
            cellModel.Cell_Layer  = 1;
            if (bllCell.Add(cellModel))
            {
                childModel.Cell_Child_Flag = "1";
                childModel.Cell_Chlid_ID   = cellModel.Cell_ID;
                childModel.Cell_ID         = cellModel.Cell_ID;
                return(bllCellChild.Add(childModel));
            }
            return(false);
        }