コード例 #1
0
        public ActionResult ProductReferenceAttributeCreate([Bind()] ProductReferenceAttributeContract productContract)
        {
            if (ModelState.IsValid)
            {
                new CrudeProductAttributeRefServiceClient().Insert(productContract.ProductAttributeRefNew);

                return(RedirectToAction(
                           "ProductReferenceAttributeEdit",
                           new { productAttributeRcd = String.Empty }
                           ));
            }

            return(View(
                       "~/Views/Templates/ProductReference/ProductReferenceAttribute/ProductReferenceAttributeCreate.cshtml",
                       productContract
                       ));
        }
コード例 #2
0
        public ActionResult ProductReferenceAttributeCreate(System.Guid?userId)
        {
            var productContract = new ProductReferenceAttributeContract();

            productContract.ProductAttributeRefNew = new CrudeProductAttributeRefContract();
            if (userId != null)
            {
                productContract.ProductAttributeRefNew.UserId = (System.Guid)userId;
            }

            if (userId == null)
            {
                productContract.ProductAttributeRefNew.UserId = new System.Guid("{FFFFFFFF-5555-5555-5555-FFFFFFFFFFFF}");
            }

            productContract.ProductAttributeRefNew.DateTime = DateTime.UtcNow;

            return(View(
                       "~/Views/Templates/ProductReference/ProductReferenceAttribute/ProductReferenceAttributeCreate.cshtml",
                       productContract
                       ));
        }