public ActionResult CheckTime() { var pid = Request["pid"]; var model = VIEW_MST_PRD.ToViewModel(prdB.Get(p => p.PRD_CD == pid)); var sid = Request["pid"]; var Time = sysrefB.GetListBy(s => s.REF_TYPE == model.CATE_ID, s => s.REF_SEQ); return(this.JsonFormat(Time, true, SysOperate.Load)); }
public ActionResult ProductDetail(string id) { ViewBag.Appid = WeChatConfig.GetKeyValue("appid"); ViewBag.Uri = WeChatConfig.GetKeyValue("shareurl"); noncestr = CommonMethod.GetCode(16); string jsapi_ticket = Js_sdk_Signature.IsExistjsapi_ticket(token.IsExistAccess_Token()); timestamp = DateTime.Now.Ticks.ToString().Substring(0, 10);; string url = Request.Url.ToString().Replace("#", ""); JssdkSignature = Js_sdk_Signature.GetjsSDK_Signature(noncestr, jsapi_ticket, timestamp, url); ViewBag.noncestr = noncestr; ViewBag.jsapi_ticket = jsapi_ticket; ViewBag.timestamp = timestamp; ViewBag.JssdkSignature = JssdkSignature; var userid = CommonMethod.getCookie("userid"); var openid = CommonMethod.getCookie("openid"); ViewBag.userName = ""; ViewBag.userTel = ""; if (!string.IsNullOrEmpty(userid) && !string.IsNullOrEmpty(openid)) { var user = VIEW_YX_weiUser.ToViewModel(weiUserM.GetModelWithOutTrace(u => u.openid == openid)); if (user != null) { ViewBag.userName = user.userRelname; ViewBag.userTel = user.userTel; } } var sid = TypeParser.ToInt32(Request["sid"]); if (sid <= 0) { sid = 2; } ViewBag.SupplierID = sid; var supplier = supplierB.Get(s => s.SUPPLIER_ID == sid); ViewBag.SupplierName = supplier.SUPPLIER_NAME; ViewBag.Address = supplier.ADDRESS; ViewBag.Tel = supplier.TEL; var model = VIEW_MST_PRD.ToViewModel(prdB.Get(p => p.PRD_CD == id)); ViewBag.ImgList = VIEW_MST_PRD_IMG.ToListViewModel(prdimgB.GetListBy(pm => pm.PRD_CD == id)); ViewBag.AM = sysrefB.GetListBy(s => s.REF_TYPE == model.CATE_ID && s.REF_PARAM.Contains("AM_"), s => s.REF_SEQ); ViewBag.PM = sysrefB.GetListBy(s => s.REF_TYPE == model.CATE_ID && s.REF_PARAM.Contains("PM_"), s => s.REF_SEQ); ViewBag.PageFlag = model.CATE_ID; return(View(model)); }
public ActionResult ProductDetail(string id) { ViewBag.TYPE = "Add"; ViewBag.CATE_IDS = DataSelect.ToListViewModel(VIEW_MST_CATEGORY.ToListViewModel(categroyB.GetListBy(m => m.ISSHOW == true && m.ACTIVE == true))); var model = prdB.Get(m => m.PRD_CD == id); if (model == null) { return(View(new VIEW_MST_PRD() { PRD_CD = "PRD" + Common.Tools.Get8Digits() })); } ViewBag.TYPE = "Update"; return(View(VIEW_MST_PRD.ToViewModel(model))); }