public void CreateTestMasterMapping(TestMasterMapping testMasterMapping)
        {
            var validator = validatorFactory.GetValidator <TestMasterMapping>();

            validator.ValidateAndThrow(testMasterMapping);
            testMasterMappingRepositry.Add(testMasterMapping);
        }
        public void RemovePartAndLocationMapping(TestMasterMapping testMasterMapping)
        {
            var validator = validatorFactory.GetValidator <TestMasterMapping>();

            validator.ValidateAndThrow(testMasterMapping);
            //Property based updation
            testMasterMappingRepositry.Update(testMasterMapping, o => o.IsActive, o => o.ModifiedBy, o => o.ModifiedOn);
        }
예제 #3
0
        public JsonResult checkExistence(TestMasterMappingViewModel testMasterMappingViewModel)
        {
            TestMasterMapping objestMasterMapping = null;

            objestMasterMapping = Mapper.Map <TestMasterMappingViewModel, TestMasterMapping>(testMasterMappingViewModel);
            testMasterMappingService.IfExistsPartAndLocationCombination(objestMasterMapping);
            var Data = new
            {
                Success = true
            };

            return(Json(Data, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        public JsonResult RemovePartAndLocation(TestMasterMappingViewModel testMasterMappingViewModel)
        {
            TestMasterMapping objTestMasterMapping = null;

            objTestMasterMapping = Mapper.Map <TestMasterMappingViewModel, TestMasterMapping>(testMasterMappingViewModel);
            testMasterMappingService.RemovePartAndLocationMapping(objTestMasterMapping);
            iUnitOfWork.Commit();
            var data = new
            {
                status       = true,
                testMasterId = testMasterMappingViewModel.TestMasterID,
                msg          = "Location and Part mapping removed !"
            };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        public JsonResult CreateTestMasterMapping(TestMasterMappingViewModel testMasterMappingViewModel)
        {
            //moved to mapper configuration
            //testMasterMappingViewModel.CreatedBy = 111;
            //testMasterMappingViewModel.CreatedOn = DateTime.Now;
            //testMasterMappingViewModel.ModifiedBy = 2222;
            //testMasterMappingViewModel.ModifiedOn = DateTime.Now;
            //testMasterMappingViewModel.IsActive = true;

            TestMasterMapping objestMasterMappingr = null;

            objestMasterMappingr = Mapper.Map <TestMasterMappingViewModel, TestMasterMapping>(testMasterMappingViewModel);
            testMasterMappingService.CreateTestMasterMapping(objestMasterMappingr);
            iUnitOfWork.Commit();
            var Data = new
            {
                Success      = true,
                testMasterId = testMasterMappingViewModel.TestMasterID,
                msg          = "location and part has been created!"
            };

            return(Json(Data, JsonRequestBehavior.AllowGet));
        }
 public void IfExistsPartAndLocationCombination(TestMasterMapping testMasterMapping)
 {
 }
        public void IfExistsPartAndLocationCombination(TestMasterMapping testMasterMapping)
        {
            var validator = validatorFactory.GetValidator <TestMasterMapping>();

            validator.ValidateAndThrow(testMasterMapping);
        }