Пример #1
0
        private ManageTaskModel AutoCreateManaTask(StockModel stockModel
                                                   , StockListModel stockListModel, TaskTypeModel taskType, ref long manaTaskID)
        {
            ManageTaskModel manaTaskModel = new ManageTaskModel();//生成管理任务

            manaTaskModel.TaskCode = stockListModel.ProductFrameCode;
            LoginPresenter loginPre = (LoginPresenter)this.View.GetPresenter(typeof(LoginPresenter));

            if (loginPre != null)
            {
                manaTaskModel.TaskCreatePerson = loginPre.View.UserName;
            }

            manaTaskModel.TaskCreateTime = DateTime.Now;
            LogicStoreAreaModel logicEndModel = bllLogicStoreArea.GetModel(taskType.EndLogicAreaID);

            manaTaskModel.TaskEndArea    = logicEndModel.LogicStoreAreaName;
            manaTaskModel.TaskEndPostion = taskType.EndDevice;

            LogicStoreAreaModel logicStartModel = bllLogicStoreArea.GetModel(taskType.StartLogicAreaID);

            manaTaskModel.TaskStartArea = logicStartModel.LogicStoreAreaName;
            GoodsSiteModel gsModel = bllGoodsSite.GetModel(stockModel.GoodsSiteID);

            manaTaskModel.TaskStartPostion = gsModel.DeviceID;
            manaTaskModel.TaskStatus       = EnumTaskStatus.待执行.ToString();
            manaTaskModel.TaskType         = EnumTaskCategory.出库.ToString();
            manaTaskModel.TaskTypeName     = taskType.TaskTypeName;
            manaTaskID = bllTask.Add(manaTaskModel);
            return(manaTaskModel);
        }
Пример #2
0
 public StoragePresenter(IStorageView view)
     : base(view)
 {
     mainPre  = (MainPresenter)this.View.GetPresenter(typeof(MainPresenter));
     loginPre = (LoginPresenter)this.View.GetPresenter(typeof(LoginPresenter));
     if (loginPre != null)
     {
         userNameStr = loginPre.View.UserName;
     }
 }
Пример #3
0
        public ControlTaskPresenter(IControlTaskView view)
            : base(view)
        {
            autoRefreshThread = new Thread(new ThreadStart(AutoRereshData));
            autoRefreshThread.IsBackground = true;
            mainPres = (MainPresenter)this.View.GetPresenter(typeof(MainPresenter));

            loginPre = (LoginPresenter)this.View.GetPresenter(typeof(LoginPresenter));
            if (loginPre != null)
            {
                userNameStr = loginPre.View.UserName;
            }
        }
Пример #4
0
        private ManageTaskListModel AutoCreateManaTaskList(long manaTaskID, ManageTaskModel manaTaskModel, StockListModel stockListModel)
        {
            ManageTaskListModel manaTaskListModel = new ManageTaskListModel();

            manaTaskListModel.ProductBatch = stockListModel.ProductBatchNum.ToString();
            manaTaskListModel.ProductCode  = stockListModel.ProductCode;
            manaTaskListModel.StockListID  = stockListModel.StockListID;
            LoginPresenter loginPre = (LoginPresenter)this.View.GetPresenter(typeof(LoginPresenter));

            if (loginPre != null)
            {
                manaTaskListModel.TaskCreatePerson = loginPre.View.UserName;
            }
            manaTaskListModel.StockListID       = stockListModel.StockListID;
            manaTaskListModel.TaskCreateTime    = DateTime.Now;
            manaTaskListModel.TaskEndPosition   = manaTaskModel.TaskEndPostion;
            manaTaskListModel.TaskID            = manaTaskID;
            manaTaskListModel.TaskStartPosition = manaTaskModel.TaskStartPostion;
            long manaTaskListID = bllTaskList.Add(manaTaskListModel);

            return(manaTaskListModel);
        }