// refresh the grid
        // links:
        //  docLink: http://sql2x.org/documentationLink/a90065e7-8ace-4de7-9367-d4653a7c637f
        public void RefreshCrudeDefaultTest()
        {
            var defaultTest = new CrudeDefaultTestServiceClient();

            try {
                var bindingSource = new BindingSource();
                bindingSource.DataSource = defaultTest.FetchWithFilter(
                    Guid.Empty
                    , textBoxSystemName.Text
                    , textBoxTestArea.Text
                    , textBoxTestSubArea.Text
                    , textBoxTestAddress.Text
                    , Guid.Empty
                    , dateTimePickerDateTime.Checked ? Convert.ToDateTime(dateTimePickerDateTime.Value): DateTime.MinValue
                    );
                dataGridViewCrudeDefaultTest.AutoGenerateColumns = false;
                dataGridViewCrudeDefaultTest.DataSource          = bindingSource;
                dataGridViewCrudeDefaultTest.AutoResizeColumns();
                dataGridViewCrudeDefaultTest.Refresh();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            } finally {
                defaultTest.Close();
            }
        }
Esempio n. 2
0
        // shows the form in edit modus
        // links:
        //  docLink: http://sql2x.org/documentationLink/49afd26c-4f21-4992-967b-be190eacef77
        public void ShowAsEdit(System.Guid defaultTestId)
        {
            var service = new CrudeDefaultTestServiceClient();

            _isNew = false;
            try {
                _contract = service.FetchByDefaultTestId(defaultTestId);
                textBoxSystemName.Text         = _contract.SystemName;
                textBoxTestArea.Text           = _contract.TestArea;
                textBoxTestSubArea.Text        = _contract.TestSubArea;
                textBoxTestAddress.Text        = _contract.TestAddress;
                dateTimePickerDateTime.Value   = _contract.DateTime != DateTime.MinValue ? _contract.DateTime : dateTimePickerDateTime.MinDate;
                dateTimePickerDateTime.Checked = _contract.DateTime != DateTime.MinValue;

                Show();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            } finally {
                service.Close();
            }
        }
Esempio n. 3
0
        // saves the form
        // links:
        //  docLink: http://sql2x.org/documentationLink/c9522930-91f8-4468-a936-8030bb2a6482
        private void buttonSave_Click(object sender, EventArgs e)
        {
            var service = new CrudeDefaultTestServiceClient();

            try {
                _contract.SystemName  = textBoxSystemName.Text;
                _contract.TestArea    = textBoxTestArea.Text;
                _contract.TestSubArea = textBoxTestSubArea.Text;
                _contract.TestAddress = textBoxTestAddress.Text;
                _contract.DateTime    = dateTimePickerDateTime.Checked ? Convert.ToDateTime(dateTimePickerDateTime.Value): DateTime.MinValue;

                if (_isNew)
                {
                    service.Insert(_contract);
                }
                else
                {
                    service.Update(_contract);
                }
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            } finally {
                service.Close();
            }

            Close();
        }
Esempio n. 4
0
        private void DoTests()
        {
            // run all tests
            var allTests = new CrudeDefaultTestServiceClient().FetchAll();

            foreach (var test in allTests)
            {
                TryCall(
                    test.SystemName,
                    test.TestArea,
                    test.TestAddress
                    );
            }

            // pim

            /*
             * TryCall("PIM", "Structure", "http://SolutionNorSolutionPort.azurewebsites.net/TreeView/Index");
             * TryCall("PIM", "Maintenance", "http://SolutionNorSolutionPort.azurewebsites.net/ProductMaintenance/ProductMaintenanceIndex");
             * TryCall("PIM", "Category", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductCategory/CrudeProductCategoryIndex");
             * TryCall("PIM", "Category Image", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductCategoryImage/CrudeProductCategoryImageIndex");
             * TryCall("PIM", "Category Documentation", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductCategoryDocumentation/CrudeProductCategoryDocumentationIndex");
             * TryCall("PIM", "Products On Category", "http://SolutionNorSolutionPort.azurewebsites.net/ProductSearchByCategory/ProductSearchByCategoryIndex?productCategoryId=c4750eb4-c2df-46a2-968a-07ed65d3b94e&onParent=False");
             * TryCall("PIM", "Product", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProduct/CrudeProductIndex");
             * TryCall("PIM", "Attribute", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductAttribute/CrudeProductAttributeIndex");
             * TryCall("PIM", "Documentation", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductDocumentation/CrudeProductDocumentationIndex");
             * TryCall("PIM", "Image", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductImage/CrudeProductImageIndex");
             * TryCall("PIM", "Info", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductInfo/CrudeProductInfoIndex");
             * TryCall("PIM", "Identifier", "http://SolutionNorSolutionPort.azurewebsites.net/CrudeProductIdentifier/CrudeProductIdentifierIndex");
             * TryCall("PIM", "PIM Documentation", "http://SolutionNorSolutionPort.azurewebsites.net/norpim/Index");
             * TryCall("PIM", "Reference Attribute", "http://SolutionNorSolutionPort.azurewebsites.net/ProductReferenceAttribute/ProductReferenceAttributeEdit");
             * TryCall("PIM", "", "");
             * //TryCall("PIM", "", "");
             */
        }
        public ActionResult CrudeDefaultTestEdit(
            System.Guid defaultTestId
            )
        {
            CrudeDefaultTestContract contract = new CrudeDefaultTestServiceClient().FetchByDefaultTestId(defaultTestId);

            return(View(
                       "~/Views/Crude/Default/CrudeDefaultTest/CrudeDefaultTestEdit.cshtml",
                       contract
                       ));
        }
Esempio n. 6
0
 public void DoTests()
 {
     try {
         // run all tests
         List <CrudeDefaultTestContract> allTests = new CrudeDefaultTestServiceClient().FetchAll();
         foreach (CrudeDefaultTestContract test in allTests)
         {
             TryCall(
                 test.SystemName,
                 test.TestArea,
                 test.TestAddress
                 );
         }
         //new DefaultTestServiceClient().RunAllTests(DefaultUserId);
     } catch (Exception ex) {
         Assert.Fail(message: $"Failed to call test area, message: {ex.Message}");
     }
 }