コード例 #1
0
        //根据旗舰店ID查询单个旗舰店
        public SWfsBrandFlagShipStoreSave GetFlagShipObj(int FlagNo)
        {
            var result = DapperUtil.QueryByIdentity <SWfsBrandFlagShipStoreSave>(FlagNo);

            //var result = DapperUtil.Query<SWfsBrandFlagShipStoreSave>("ComBeziWfs_SWfsBrandFlagShipStoreSave_ReadByFlagNo", new { FlagShipStoreId = FlagNo }).FirstOrDefault();
            return(result);
        }
コード例 #2
0
        public JsonResult UpdateHotProductStatus(string hotproductId)
        {
            var hotproduct = DapperUtil.QueryByIdentity <SWfsHotProduct>(hotproductId);

            hotproduct.Status = hotproduct.Status == short.Parse("1") ? short.Parse("0") : short.Parse("1");
            DapperUtil.Update <SWfsHotProduct>(hotproduct);
            return(Json(new { result = "success" }));
        }
コード例 #3
0
        public string SaveVsinsHotProducts()
        {
            string hotProductId = Request.Form["hotProductId"];
            string productNo    = Request.Form["productNo"];
            string status       = Rq.GetStringForm("status");
            string beginTime    = Rq.GetStringForm("dateBegin");
            string endTime      = Rq.GetStringForm("dateEnd");
            string description  = Rq.GetStringForm("description");
            string imgNo        = string.Empty;
            Dictionary <string, string> picResDic = new Dictionary <string, string>();

            if (Request.Files["imgfile"] != null && Request.Files["imgfile"].ContentLength > 0)
            {
                picResDic = new CommonService().PostImg(Request.Files["imgfile"], "width:640,Height:0,Length:200");
                if (picResDic.Keys.Contains("error"))
                {
                    return("{ \"result\":\"error\", \"msg\":\"" + picResDic["error"] + "\" }");
                }
                if (picResDic.Keys.Contains("success"))
                {
                    imgNo = picResDic["success"];
                }
            }
            else
            {
                imgNo = Rq.GetStringForm("imgNo");
            }

            SWfsHotProduct hotproduct = DapperUtil.QueryByIdentity <SWfsHotProduct>(hotProductId);

            if (hotproduct == null)
            {
                hotproduct            = new SWfsHotProduct();
                hotproduct.CreateDate = DateTime.Now;
            }
            hotproduct.Description = description;
            hotproduct.EndDate     = Convert.ToDateTime(endTime);
            hotproduct.PicFileNo   = imgNo;
            hotproduct.ProductNo   = productNo;
            hotproduct.StartDate   = Convert.ToDateTime(beginTime);
            hotproduct.Status      = short.Parse(status);
            hotproduct.Type        = 1;
            if (hotproduct.HotProductId != 0)
            {
                DapperUtil.Update <SWfsHotProduct>(hotproduct);
            }
            else
            {
                DapperUtil.Insert <SWfsHotProduct>(hotproduct);
            }
            return("{\"result\":\"success\"}");
        }
コード例 #4
0
 public ActionResult CreateHotProduct(string hotpId)
 {
     if (string.IsNullOrEmpty(hotpId))
     {
         return(View(new SWfsHotProduct()
         {
             CreateDate = DateTime.Now, StartDate = DateTime.Now, EndDate = DateTime.Now, Description = "", Status = 1, ProductNo = ""
         }));
     }
     else
     {
         return(View(DapperUtil.QueryByIdentity <SWfsHotProduct>(hotpId)));
     }
 }
コード例 #5
0
 public SWfsGlobalConfig GetGlobalConfig(string functionNo)
 {
     return(DapperUtil.QueryByIdentity <SWfsGlobalConfig>("FC01"));
 }
コード例 #6
0
 //按ID查询
 public SWfsListAlterPic GetAlterID(int id)
 {
     return(DapperUtil.QueryByIdentity <SWfsListAlterPic>(id));
 }
コード例 #7
0
 //按ID查询
 public SWfsListAlterGroup GetGroupID(int id)
 {
     return(DapperUtil.QueryByIdentity <SWfsListAlterGroup>(id));
 }
コード例 #8
0
 //按ID查询
 public SWfsBrandIndexInfo BrandGuoJiId(int id)
 {
     return(DapperUtil.QueryByIdentity <SWfsBrandIndexInfo>(id));
 }
コード例 #9
0
 /// <summary>
 /// 根据主键查找品牌名
 /// </summary>
 /// <param name="ConfigId"></param>
 /// <returns></returns>
 public SwfsFlagShipGloalConfig GetGlobalConfigByConfigId(int ConfigId)
 {
     return(DapperUtil.QueryByIdentity <SwfsFlagShipGloalConfig>(ConfigId));
 }
コード例 #10
0
 public SWfsSpHomeRecommendBrand GetHomeBrandByPK(int subjectNo)
 {
     return(DapperUtil.QueryByIdentity <SWfsSpHomeRecommendBrand>(subjectNo));
 }
コード例 #11
0
 /// <summary>
 /// 根据商品编号和子类编号获得信息
 /// </summary>
 /// <param name="productNo"></param>
 /// <param name="categoryNo"></param>
 /// <returns></returns>
 public SWfsNewSubjectProductRef GetSubjectProduct(int refId)
 {
     return(DapperUtil.QueryByIdentity <SWfsNewSubjectProductRef>(refId));
     //return DapperUtil.Query<SWfsSubjectProductRef>("ComBeziWfs_SWfsSubjectProductRef_SelectByProNoAndCategoryNo", new { ProductNo = productNo, CategoryNo = categoryNo }).FirstOrDefault();
 }
コード例 #12
0
 public SWfsChannel GetChannelInfo(string channelNo)
 {
     return(DapperUtil.QueryByIdentity <SWfsChannel>(channelNo));
 }
コード例 #13
0
        public SWfsTopics GetSWfsTopics(string topicId)
        {
            SWfsTopics model = DapperUtil.QueryByIdentity <SWfsTopics>(topicId);

            return(model);
        }