//根据旗舰店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); }
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" })); }
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\"}"); }
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))); } }
public SWfsGlobalConfig GetGlobalConfig(string functionNo) { return(DapperUtil.QueryByIdentity <SWfsGlobalConfig>("FC01")); }
//按ID查询 public SWfsListAlterPic GetAlterID(int id) { return(DapperUtil.QueryByIdentity <SWfsListAlterPic>(id)); }
//按ID查询 public SWfsListAlterGroup GetGroupID(int id) { return(DapperUtil.QueryByIdentity <SWfsListAlterGroup>(id)); }
//按ID查询 public SWfsBrandIndexInfo BrandGuoJiId(int id) { return(DapperUtil.QueryByIdentity <SWfsBrandIndexInfo>(id)); }
/// <summary> /// 根据主键查找品牌名 /// </summary> /// <param name="ConfigId"></param> /// <returns></returns> public SwfsFlagShipGloalConfig GetGlobalConfigByConfigId(int ConfigId) { return(DapperUtil.QueryByIdentity <SwfsFlagShipGloalConfig>(ConfigId)); }
public SWfsSpHomeRecommendBrand GetHomeBrandByPK(int subjectNo) { return(DapperUtil.QueryByIdentity <SWfsSpHomeRecommendBrand>(subjectNo)); }
/// <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(); }
public SWfsChannel GetChannelInfo(string channelNo) { return(DapperUtil.QueryByIdentity <SWfsChannel>(channelNo)); }
public SWfsTopics GetSWfsTopics(string topicId) { SWfsTopics model = DapperUtil.QueryByIdentity <SWfsTopics>(topicId); return(model); }