Esempio n. 1
0
        public void Delete(IItemsForForm2Repository itemsForForm2Repository, IItemsOperationsNullRepository itemsOperationsNullRepository, string itemId)
        {
            foreach (DataRow row in itemsForForm2Repository.Get(itemId).Rows)
            {
                double SetupTime = double.Parse(row["SetupTime"].ToString());

                if (row["StartTime"] != System.DBNull.Value)
                {
                    if (row["Count"] == System.DBNull.Value)
                    {
                        row["Count"] = "1";
                    }
                    DateTime laiksTagad = DateTime.Now;

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

                    if (time < laiksTagad)
                    {
                        byte[] pic = Picture.CreatePictureComplited();

                        itemsOperationsNullRepository.InsertNullWhereEndTimeExpired(pic, row);
                    }
                }
            }
        }
 public CombiningDataForGrid(IItemsForForm2Repository itemsForForm2Repository, IItemsOperationsNullRepository itemsOperationsNullRepository,
                             IForm2ProgressPictureRepository form2ProgressPictureRepository, IDataForForm2ProgressTxtRepository dataForForm2ProgressTxtRepository,
                             IPauseTimesRepository pauseTimesRepository)
 {
     _itemsForForm2Repository           = itemsForForm2Repository;
     _itemsOperationsNullRepository     = itemsOperationsNullRepository;
     _form2ProgressPictureRepository    = form2ProgressPictureRepository;
     _dataForForm2ProgressTxtRepository = dataForForm2ProgressTxtRepository;
     _pauseTimesRepository = pauseTimesRepository;
 }