Пример #1
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));
        }
Пример #2
0
 public IHttpActionResult CreateTestMasterMapping(TestMasterMappingViewModel testMasterMappingViewModel)
 {
     itestMasterMappingService.CreateTestMasterMapping(testMasterMappingViewModel);
     itestMasterMappingService.SaveTest();
     return(Ok());
 }