public JsonResult Update(Int32 ID, String Name)
        {
            bool value = false;

            if (Session["ctx"] != null)
            {
                VAdvantage.Utility.Ctx            ctx   = Session["ctx"] as Ctx;
                VA005.Models.ProductCategortModel model = new Models.ProductCategortModel();
                value = model.UpdateCategory(ID, Name, ctx);
            }
            return(Json(new { result = value }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Update1(Int32 id, String Name, String Value, String ProductType, String MatPolicy, String Desc, Int32 attrSet, Int32 taxcat, Int32 assetGrp, Boolean consumable, Int32 imageId)
        {
            bool value = false;

            if (Session["ctx"] != null)
            {
                VAdvantage.Utility.Ctx            ctx   = Session["ctx"] as Ctx;
                VA005.Models.ProductCategortModel model = new Models.ProductCategortModel();
                value = model.UpdateCategory(id, Name, Value, ProductType, MatPolicy, Desc, attrSet, taxcat, assetGrp, consumable, imageId, ctx);
            }
            return(Json(new { result = value }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Save(String Name)
        {
            KeyNamePair retJSON = null;

            if (Session["ctx"] != null)
            {
                VAdvantage.Utility.Ctx            ctx   = Session["ctx"] as Ctx;
                VA005.Models.ProductCategortModel model = new Models.ProductCategortModel();
                retJSON = model.AddCategory(Name, ctx);
            }
            return(Json(JsonConvert.SerializeObject(retJSON), JsonRequestBehavior.AllowGet));
        }