public ActionResult UpdateCountryPaintItem(int pkid, string pid, string displayName, decimal price)
        {
            var paintInfo = CityPaintManager.GetCountryPaintByPID(pid);

            if (paintInfo != null && !string.IsNullOrEmpty(paintInfo.DisplayName))
            {
                if (pkid != paintInfo.PKID)
                {
                    return(Json(new { msg = "has" }));
                }
            }
            PaintInfoModel model = new PaintInfoModel();

            model.PKID        = pkid;
            model.PID         = pid;
            model.DisplayName = displayName;
            model.Price       = price;
            model.IsCountry   = true;
            bool result = CityPaintManager.UpdateCountryPaintModel(model);

            if (!result)
            {
                return(Json(new { msg = "fail" }));
            }
            OprLogManager oprLog = new OprLogManager();

            DataAccess.Entity.OprLog modelLog = new DataAccess.Entity.OprLog();
            modelLog.Author     = User.Identity.Name;
            modelLog.ObjectID   = pkid;
            modelLog.ObjectType = "CountryPaint";
            modelLog.Operation  = "修改油漆产品:" + model.DisplayName;
            try
            {
                oprLog.AddOprLog(modelLog);
            }
            catch
            {
            }
            return(Json(new { msg = "success" }));
        }
        public ActionResult InsertCountryPaintItem(string pid, string displayName, decimal price)
        {
            var paintInfo = CityPaintManager.GetCountryPaintByPID(pid);

            if (paintInfo != null && !string.IsNullOrEmpty(paintInfo.DisplayName))
            {
                return(Json(new { msg = "has" }));
            }
            PaintInfoModel model = new PaintInfoModel();

            model.PID         = pid;
            model.DisplayName = displayName;
            model.Price       = price;
            model.IsCountry   = true;
            bool result = CityPaintManager.InsertCountryPaintModelModel(model);

            if (!result)
            {
                return(Json(new { msg = "fail" }));
            }
            OprLogManager oprLog = new OprLogManager();

            DataAccess.Entity.OprLog modelLog = new DataAccess.Entity.OprLog();
            modelLog.Author     = User.Identity.Name;
            modelLog.ObjectID   = 0;
            modelLog.ObjectType = "CountryPaint";
            modelLog.Operation  = "添加油漆产品:" + model.DisplayName;
            try
            {
                oprLog.AddOprLog(modelLog);
            }
            catch
            {
            }
            //LoggerManager.InsertOplog(new ConfigHistory() { AfterValue = null, Author = User.Identity.Name, Operation = "添加类目:" + model.CategoryName, ObjectType = "GaiZhuang", ObjectID = "0" });
            return(Json(new { msg = "success" }));
        }