Пример #1
0
        public void Checking()
        {
            foreach (DataRow row in _itemsOperationsForTrueFalseCheckReposytory.GetItemsOperationsTable().Rows)
            {
                if (row["EndTime"] == DBNull.Value)
                {
                    _operationConditionRepository.OperationIsNotBusy(row["ItemId"].ToString(), row["OperationId"].ToString());
                }
                if (row["StartTime"] != System.DBNull.Value && row["Count"] != System.DBNull.Value && row["SetupTime"] != System.DBNull.Value)
                {
                    DateTime TimeNow = DateTime.Now;

                    DateTime EndTime = Convert.ToDateTime(row["EndTime"]);

                    if (EndTime > TimeNow)
                    {
                        _operationConditionRepository.OperationIsBusy(row["ItemId"].ToString(), row["OperationId"].ToString());
                    }
                    else
                    {
                        _operationConditionRepository.OperationIsNotBusy(row["ItemId"].ToString(), row["OperationId"].ToString());
                        _itemsOperationsNullRepository.InsertNull(Picture.Create(0, 0), row);
                    }
                }
                else
                {
                    _operationConditionRepository.OperationIsNotBusy(row["ItemId"].ToString(), row["OperationId"].ToString());
                    _itemsOperationsNullRepository.InsertNull(Picture.Create(0, 0), row);
                }
            }
        }
Пример #2
0
        public void Run(string runItem, string count)
        {
            checkIfExists = new CheckIfExists(_checkIfExistRepository);
            startTime     = new StartTime(_startTimeRepository, _pauseTimesRepository, _timeRepository, _dataForInLineTable);

            foreach (DataRow row in _startAllOperations.Operations(runItem).Rows)
            {
                isBusyCheck = new IsBusyCheck(_isBusyCheckRepository);

                if (isBusyCheck.GetOperationBool(row["OperationId"].ToString()) == false)
                {
                    startTime.AddStartTime(row, count);
                    _operationConditionRepository.OperationIsBusy(runItem, row["OperationId"].ToString());
                }
                else
                {
                    if (checkIfExists.IfInLineItemExists(runItem, row["OperationId"].ToString()) == false)
                    {
                        startTime.AddInLineStartTime(row, count);
                    }
                    else
                    {
                        startTime.AddInLineStartTimeIfEntryExist(row, count);
                    }
                }
            }
        }
Пример #3
0
 public void OperationIsBusy(string comboBoxItems, string comboBoxOperations)
 {
     _operationConditionRepository.OperationIsBusy(comboBoxItems, comboBoxOperations);
 }