public ActionResult WelCome() { ViewBag.UserID = OperateContext.Current.UsrId; ViewBag.UserName = OperateContext.Current.UsrName; ViewBag.PrdList = VIEW_MST_PRD.ToListViewModel(prd_MANAGER.GetListBy(s => true, s => s.SEQ_NO)); ViewBag.CategoryList = VIEW_MST_CATEGORY.ToListViewModel(categroyB.GetListBy(s => s.SYNCOPERATION != "D")); return(View()); }
public ActionResult PrdCateDetail(string cd) { ViewBag.TYPE = "Add"; ViewBag.CATE_IDS = DataSelect.ToListViewModel(VIEW_MST_CATEGORY.ToListViewModel(CategoryB.GetListBy(m => m.ACTIVE == true))); var model = CategoryB.Get(m => m.CATE_CD == cd); if (model == null) { return(View(new VIEW_MST_CATEGORY())); } ViewBag.TYPE = "Update"; model.VERSION = model.VERSION + 1; return(View(VIEW_MST_CATEGORY.ToViewModel(model))); }
public ActionResult Index() { ViewBag.PageFlag = "Index"; ViewBag.CategoryList = VIEW_MST_CATEGORY.ToListViewModel(categoryManager.GetListBy(c => c.ACTIVE == true)); ViewBag.PositionHotList = positionManager.LoadListBy(p => p.STATUS == "Y" && p.ISHOT == "Y", p => p.PUBLISH_DT, false).Skip(0).Take(20).Select(p => new VIEW_MST_POSITION() { POSITION_CD = p.POSITION_CD, COMPANY_CD = p.COMPANY_CD, NAME = p.NAME, DEPARTMENTNAME = p.DEPARTMENTNAME, WORKTYPE = p.WORKTYPE, MONEY = p.MONEY, WORKPLACE = p.WORKPLACE, EXPERIENCE = p.EXPERIENCE, EDUCATION = p.EDUCATION, REMARK = p.REMARK, ISNEW = p.ISNEW, ISHOT = p.ISHOT, STATUS = p.STATUS, PUBLISH_DT = p.PUBLISH_DT, COMPANY_NAME = p.MST_COMPANY.COMPANY_NAME, COMPANY_SIZE = p.MST_COMPANY.COMPANY_SIZE, INDUSTRY = p.MST_COMPANY.INDUSTRY, DEVELOPMENT = p.MST_COMPANY.DEVELOPMENT }).ToList(); ViewBag.PositionNewList = positionManager.LoadListBy(p => p.STATUS == "Y" && p.ISNEW == "Y", p => p.PUBLISH_DT, false).Skip(0).Take(20).Select(p => new VIEW_MST_POSITION() { POSITION_CD = p.POSITION_CD, COMPANY_CD = p.COMPANY_CD, NAME = p.NAME, DEPARTMENTNAME = p.DEPARTMENTNAME, WORKTYPE = p.WORKTYPE, MONEY = p.MONEY, WORKPLACE = p.WORKPLACE, EXPERIENCE = p.EXPERIENCE, EDUCATION = p.EDUCATION, REMARK = p.REMARK, ISNEW = p.ISNEW, ISHOT = p.ISHOT, STATUS = p.STATUS, PUBLISH_DT = p.PUBLISH_DT, COMPANY_NAME = p.MST_COMPANY.COMPANY_NAME, COMPANY_SIZE = p.MST_COMPANY.COMPANY_SIZE, INDUSTRY = p.MST_COMPANY.INDUSTRY, DEVELOPMENT = p.MST_COMPANY.DEVELOPMENT }).ToList(); return(View()); }
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))); }
public ActionResult Index() { ViewBag.PageFlag = "Index"; if (string.IsNullOrEmpty(CommonMethod.getCookie("userid")) || string.IsNullOrEmpty(CommonMethod.getCookie("openid"))) { //CommonMethod.delCookie("userid"); //登陆 string code = Request.QueryString["code"];//获取授权code if (!string.IsNullOrEmpty(code)) { string openIdUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + WeChatConfig.GetKeyValue("appid") + "&secret=" + WeChatConfig.GetKeyValue("appsecret") + "&code=" + code + "&grant_type=authorization_code"; string content = Tools.GetPage(openIdUrl, ""); openid = Tools.GetJsonValue(content, "openid");//根据授权 获取当前人的openid var model = weiUserM.GetModelWithOutTrace(u => u.openid == openid); if (model != null) { CommonMethod.delCookie("openid"); CommonMethod.delCookie("userid"); CommonMethod.setCookie("openid", openid, 1); CommonMethod.setCookie("userid", model.userNum, 1); } } else { string codeurl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx242aa47391c159f6&redirect_uri=http://www.aoshacar.com/AoShaCar/Index&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect"; Response.Redirect(codeurl); } //end } ViewBag.PageFlag = "Index"; var sid = TypeParser.ToInt32(Request["sid"]); if (sid <= 0) { sid = 2; } ViewBag.SupplierID = sid; ViewBag.SupplierName = supplierB.Get(s => s.SUPPLIER_ID == sid).SUPPLIER_NAME; ViewBag.CategoryList = VIEW_MST_CATEGORY.ToListViewModel(categoryB.GetListBy(c => c.ACTIVE == true)); ViewBag.ProductList = VIEW_MST_PRD.ToListViewModel(prdB.GetListBy(p => p.ISCHECK == true && p.STATUS == true && p.ISHOT == true, p => p.SEQ_NO)); return(View()); }
public IEnumerable <DataSelect> GetAllCategorySelectToViewModel(MODEL.DataTableModel.DataSelectRequest selectData) { IEnumerable <VIEW_MST_CATEGORY> list = VIEW_MST_CATEGORY.ToListViewModel(GetAllCategorySelect(selectData)); return(DataSelect.ToListModel(list)); }