Esempio n. 1
0
        public ActionResult Save(ProductType oProductType)
        {
            GlobalSession.SessionIsAlive(Session, Response);
            if (oProductType.ProductTypeID <= 0)
            {
                _oProductType = _oProductTypeService.IUD(oProductType, EnumDBOperation.Insert, (int)Session[GlobalSession.UserID]);
            }
            else
            {
                _oProductType = _oProductTypeService.IUD(oProductType, EnumDBOperation.Update, (int)Session[GlobalSession.UserID]);
            }

            JavaScriptSerializer serializer = new JavaScriptSerializer();
            string sjson = serializer.Serialize(_oProductType);

            return(Json(sjson, JsonRequestBehavior.AllowGet));
        }