Beispiel #1
0
 public ActionResult UpdateSellSets(long productId, long childrenProductId, int sellSets)
 {
     if (productId < 1 || childrenProductId < 1 || sellSets < 1)
     {
         return(Json(new NBCMSResultJson
         {
             Status = StatusType.Error,
             Data = "Request is illegal"
         }));
     }
     try
     {
         var userInfo = new CommonController().GetCurrentUserbyCookie(Request[ConfigurationManager.AppSettings["userInfoCookiesKey"]]);
         var gSvr     = new HMGroupConfigServices();
         var isDone   = gSvr.UpdateSellSets(productId, childrenProductId, sellSets, userInfo);
         return(Json(new NBCMSResultJson
         {
             Status = isDone == true ? StatusType.OK : StatusType.Error,
             Data = isDone == true ? "OK" : "Fail to update sellset"
         }));
     }
     catch (Exception ex)
     {
         NBCMSLoggerManager.Error("");
         NBCMSLoggerManager.Error(ex.Message);
         NBCMSLoggerManager.Error(ex.StackTrace);
         NBCMSLoggerManager.Error("");
         return(Json(new NBCMSResultJson
         {
             Status = StatusType.Exception,
             Data = ex.Message
         }));
     }
 }
Beispiel #2
0
        //
        // GET: /HMGroupConfig/

        public ActionResult Config()
        {
            var hSvr = new HMGroupConfigServices();
            var pId  = Request["ProductID"];

            if (String.IsNullOrEmpty(pId))
            {
                return(View());
            }
            var model = hSvr.GetSingleHMGroup(new CMS_HMNUM_Model
            {
                ProductID = Convert.ToInt64(pId)
            });

            ViewBag.Media_Data_list = new JavaScriptSerializer().Serialize(model.MediaList);//提供JS脚本做图像的bubble展示使用 2014年5月16日14:25:18...
            //ViewBag.CMSImgUrl = ConfigurationManager.AppSettings["CMSImgUrl"];
            if (Request.Url != null)
            {
                ViewBag.CMSImgUrl = Request.Url.Scheme + "://" + Request.Url.Authority + Request.ApplicationPath + "/MediaLib/Files/";
            }
            return(View(model));
        }