コード例 #1
0
        public ActionResult Edit(Organization organization)
        {
            var          dateLastModified = DateTime.Now;
            const string modifiedBy       = "jhendrikse";
            const bool   isActive         = true;
            const bool   isDeleted        = false;

            if (ModelState.IsValid)
            {
                var organizationModel   = new OrganizationModel();
                var updatedOrganization = organizationModel.EditOrganization(organization.Organization_Id, organization.Description, organization.Telephone_Number, organization.Fax_Number, organization.Email_Address, isActive, isDeleted, dateLastModified, modifiedBy);

                if (updatedOrganization == null)
                {
                    ViewBag.Message = "An Error Occured, Please contact Support";
                    return(View(organization));
                }

                return(RedirectToAction("Index", "Organization"));
            }

            return(View(organization));
        }