コード例 #1
0
        public void DeletePlannedProduction(int plannedProductionId)
        {
            var repo = new ProductionRespository(Properties.Settings.Default.ManufacturingConStr);

            repo.AddNewUpdateHistory(repo.GetPlannedProduction(plannedProductionId), "deleted");
            repo.DeletePlannedProduction(plannedProductionId);
        }
コード例 #2
0
        public void UpdateMarkerCat(MarkerCategory markerCategory)
        {
            var repo           = new MarkerRespository(Properties.Settings.Default.ManufacturingConStr);
            var prodRepo       = new ProductionRespository(Properties.Settings.Default.ManufacturingConStr);
            var originalMarker = repo.GetMarkerCategory(markerCategory.Id);

            prodRepo.AddNewUpdateHistory(originalMarker, markerCategory.Deleted ? "deleted" : null);
            repo.UpdateMarkerCat(originalMarker.SetOrginalDbObjToUpdated(markerCategory));
        }
コード例 #3
0
        public void UpdatePlannedProductionDetails(PlannedProductionDetail plannedProductionDetail)
        {
            var repo        = new ProductionRespository(Properties.Settings.Default.ManufacturingConStr);
            var currentItem = repo.GetPlannedProductionDetail(plannedProductionDetail.Id);

            plannedProductionDetail.CreatedOn = currentItem.CreatedOn;
            repo.AddNewUpdateHistory(repo.GetPlannedProductionDetail(plannedProductionDetail.Id));

            repo.UpdatePlannedProductionDetail(plannedProductionDetail);
        }
コード例 #4
0
        public void UpdatePlannedProductionNotes(PlannedProduction plannedProduction)
        {
            var repo = new ProductionRespository(Properties.Settings.Default.ManufacturingConStr);
            //var currentItem = repo.GetPlannedProduction(plannedProduction.Id).GetObjectBasePropertiesOnDbObject();

            //repo.AddNewUpdateHistory(currentItem);
            //currentItem.Notes = plannedProduction.Notes;
            var currentItem = repo.GetPlannedProduction(plannedProduction.Id);

            repo.AddNewUpdateHistory(currentItem);
            repo.UpdatePlannedProduction(currentItem.SetOrginalDbObjToUpdated(plannedProduction));
        }
コード例 #5
0
        public void DeletePlannedProductionDetails(int plannedProductionDetailId)
        {
            var repo = new ProductionRespository(Properties.Settings.Default.ManufacturingConStr);
            var pp   = repo.GetPlannedProductionDetail(plannedProductionDetailId);

            //repo.DeletePlannedProductionDetail(new PlannedProductionDetail
            //{
            //    Id = pp.Id,
            //    ItemId = pp.ItemId,
            //    Quantity = pp.Quantity,
            //    Deleted = true
            //});
            repo.AddNewUpdateHistory(repo.GetPlannedProductionDetail(plannedProductionDetailId), "deleted");
            repo.DeletePlannedProductionDetail(plannedProductionDetailId);
        }