// shows the form in edit modus
        // links:
        //  docLink: http://sql2x.org/documentationLink/49afd26c-4f21-4992-967b-be190eacef77
        public void ShowAsEdit(string defaultTestRunResultRcd)
        {
            var service = new CrudeDefaultTestRunResultRefServiceClient();

            _isNew = false;
            try {
                _contract = service.FetchByDefaultTestRunResultRcd(defaultTestRunResultRcd);
                textBoxDefaultTestRunResult.Text     = _contract.DefaultTestRunResultRcd;
                textBoxDefaultTestRunResultName.Text = _contract.DefaultTestRunResultName;
                _contract.DateTime          = DateTime.UtcNow;
                dateTimePickerDateTime.Text = _contract.DateTime.ToString();

                Show();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            } finally {
                service.Close();
            }
        }
Exemplo n.º 2
0
        public ActionResult CrudeDefaultTestRunResultRefCreate([Bind()] CrudeDefaultTestRunResultRefContract contract)
        {
            if (ModelState.IsValid)
            {
                new CrudeDefaultTestRunResultRefServiceClient().Insert(contract);

                return(RedirectToAction("CrudeDefaultTestRunResultRefIndex"));
            }

            return(View(
                       "~/Views/Crude/Default/CrudeDefaultTestRunResultRef/CrudeDefaultTestRunResultRefCreate.cshtml",
                       contract
                       ));
        }
Exemplo n.º 3
0
        public ActionResult CrudeDefaultTestRunResultRefEdit([Bind()] CrudeDefaultTestRunResultRefContract contract)
        {
            if (ModelState.IsValid)
            {
                contract.DateTime = DateTime.UtcNow;

                new CrudeDefaultTestRunResultRefServiceClient().Update(contract);

                return(RedirectToAction("CrudeDefaultTestRunResultRefIndex"));
            }

            return(View(
                       "~/Views/Crude/Default/CrudeDefaultTestRunResultRef/CrudeDefaultTestRunResultRefEdit.cshtml",
                       contract
                       ));
        }
 // shows the form with default values for comboboxes and pickers
 // links:
 //  docLink: http://sql2x.org/documentationLink/e04d0806-55ef-41cc-8669-acf0ddd850c7
 public void ShowAsAdd()
 {
     try {
         _contract  = new CrudeDefaultTestRunResultRefContract();
         _isNew     = true;
         this.Text += " - Not Savable (User Missing)";
         Show();
     } catch (Exception ex) {
         if (ex == null)
         {
         }
         else
         {
             System.Diagnostics.Debugger.Break();
         }
     }
 }
Exemplo n.º 5
0
        public ActionResult CrudeDefaultTestRunResultRefCreate(System.Guid?userId)
        {
            var contract = new CrudeDefaultTestRunResultRefContract();

            if (userId != null)
            {
                contract.UserId = (System.Guid)userId;
            }

            contract.DateTime = DateTime.UtcNow;


            return(View(
                       "~/Views/Crude/Default/CrudeDefaultTestRunResultRef/CrudeDefaultTestRunResultRefCreate.cshtml",
                       contract
                       ));
        }
        // shows the form with default values for comboboxes and pickers
        // links:
        //  docLink: http://sql2x.org/documentationLink/f5685d96-a0bb-4f7b-beaa-b3d578c7cf28
        public void ShowAsAdd(string defaultTestRunResultRcd, string defaultTestRunResultName, System.Guid userId)
        {
            try {
                _contract = new CrudeDefaultTestRunResultRefContract();
                _isNew    = true;
                _contract.DefaultTestRunResultRcd    = defaultTestRunResultRcd;
                textBoxDefaultTestRunResult.Text     = _contract.DefaultTestRunResultRcd;
                _contract.DefaultTestRunResultName   = defaultTestRunResultName;
                textBoxDefaultTestRunResultName.Text = _contract.DefaultTestRunResultName;
                _contract.UserId            = userId;
                _contract.DateTime          = DateTime.UtcNow;
                dateTimePickerDateTime.Text = _contract.DateTime.ToString();

                Show();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            }
        }