public ActionResult OrderInfo() { var list = sys_userlogin.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD); ViewBag.COMPANYS = DataSelect.ToListViewModel(VIEW_MST_SUPPLIER.ToListViewModel(supplierB.GetListBy(u => list.Contains(u.TREE_NODE_ID) && u.SYNCOPERATION != "D", u => u.SUPPLIER_ID))); return(View()); }
public ActionResult OrderDetail(string ordernum) { VIEW_TG_order order = new VIEW_TG_order() { orderNum = CommonMethod.GetOrderNum(), trade_type = "ONLINE", orderTime = DateTime.Now, ThingNum = CommonMethod.GetCode(18) }; ViewBag.ReturnUrl = Request["returnurl"]; ViewBag.TYPE = "Update"; if (string.IsNullOrEmpty(ordernum)) { ViewBag.TYPE = "Add"; var list = sys_userlogin.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD); ViewBag.MEMBERS = DataSelect.ToListViewModel(VIEW_YX_weiUser.ToListViewModel(userB.GetListBy(u => list.Contains(u.TREE_NODE_ID) && u.isfenxiao != 0, u => u.userRelname))); ViewBag.COMPANYS = DataSelect.ToListViewModel(VIEW_MST_SUPPLIER.ToListViewModel(supplierB.GetListBy(u => list.Contains(u.TREE_NODE_ID) && u.SYNCOPERATION != "D", u => u.SUPPLIER_ID))); } var model = orderB.Get(o => o.orderNum == ordernum); if (model != null) { order = VIEW_TG_order.ToViewModel(model); ViewBag.Things = VIEW_TG_Thing.ToListViewModel(thingB.GetListBy(t => t.orderNum == ordernum, t => t.createTim, false)); } return(View(order)); }
public ActionResult Index() { ViewBag.UserType = DataSelect.ToListViewModel(ConfigSettings.GetSysConfigList("")); ViewBag.SiteName = ConfigSettings.GetSysConfigValue("WebSiteSYS", "SiteName"); ViewBag.UserID = OperateContext.Current.UsrId; ViewBag.UserName = OperateContext.Current.UsrName; 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 Detail(int id) { ViewBag.CATALOG_CDS = DataSelect.ToListViewModel(VIEW_MST_CATALOG.ToListViewModel(CatalogManager.GetListBy(m => m.SYNCOPERATION != "D"))); //执行状态 var article = new MODEL.ViewModel.VIEW_MST_ARTICLE(); var model = ArticleManager.Get(a => a.ARTICLE_ID == id); if (model != null) {//转化为视图UI层的实体对象 ViewBag.ParentID = model.ARTICLE_ID; article = VIEW_MST_ARTICLE.ToViewModel(model); ViewBag.Images = JsonHelper.ToJson(VIEW_MST_ATTACHMENTS.ToListViewModel(AttachmentsManager.GetListBy(at => at.ITEM_ID == id && at.ISIMAGE == "Y")), true); } return(View(article)); }
public ActionResult WeChatMenusDetail(string id) { var wid = TypeParser.ToInt32(id); ViewBag.TYPE = "Add"; ViewBag.PID = DataSelect.ToListViewModel(VIEW_YX_weiXinMenus.ToListViewModel(Yx_Menus_Manager.GetListBy(m => m.WX_Fid == 0))); ViewBag.WX_MenuTypes = DataSelect.ToListViewModel(ConfigSettings.GetSysConfigList("WECHATMENUSTYPE")); var model = Yx_Menus_Manager.Get(m => m.Id == wid); if (model == null) { return(View(new VIEW_YX_weiXinMenus())); } ViewBag.TYPE = "Update"; return(View(VIEW_YX_weiXinMenus.ToViewModel(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))); }
public ActionResult MenusDetail(string id) { ViewBag.TYPE = "Add"; ViewBag.PID = DataSelect.ToListViewModel(VIEW_FW_MODULE.ToListViewModel(ModuleManager.GetListBy(m => true))); ViewBag.MVCController = DataSelect.ToListViewModel(LINQHelper.GetIenumberable <MVCController>(ConfigSettings.GetAllController(), p => p.ControllerName.ToLower() != "", q => q.ControllerName, 200, 1)); var model = ModuleManager.Get(m => m.MODULE_ID == id); if (model == null) { return(View(new VIEW_FW_MODULE() { })); } ViewBag.TYPE = "Update"; return(View(VIEW_FW_MODULE.ToViewModel(model))); }
public ActionResult WeChatMenuSetDetail(string id, string type) { var wid = TypeParser.ToInt32(id); ViewBag.Menu_ID = wid; ViewBag.TYPE = type; ViewBag.WX_NewsTypes = DataSelect.ToListViewModel(ConfigSettings.GetSysConfigList("WECHATNEWSTYPE")); var model = new VIEW_YX_MenusMsg() { MID = 0, Event_ID = wid, Event_Type = type, EventCate = "menu" }; switch (type) { case "1": model = VIEW_YX_MenusMsg.ToViewModel(VIEW_YX_text.ToViewModel(Yx_Text_M.Get(n => n.EventId == wid && n.EventCate == "menu"))); break; case "2": model = VIEW_YX_MenusMsg.ToViewModel(VIEW_YX_news.ToViewModel(Yx_News_M.Get(n => n.EventId == wid && n.EventCate == "menu"))); break; } return(View(model)); }
public ActionResult WeChatDetail(string userNum) { ViewBag.UserType = DataSelect.ToListViewModel(ConfigSettings.GetSysConfigList("USERTYPE")); ViewBag.ReturnUrl = Request["returnurl"]; ViewDetailPage page = new ViewDetailPage(HttpContext); ViewBag.IsView = page.IsView; //ViewBag.CurrentID = id; ViewBag.TYPE = "Update"; var list = sys_userlogin.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD); ViewBag.COMPANYS = DataSelect.ToListViewModel(VIEW_MST_SUPPLIER.ToListViewModel(supplierB.GetListBy(u => list.Contains(u.TREE_NODE_ID), u => u.SUPPLIER_ID)), true); var model = wechatUserB.Get(u => u.userNum == userNum); if (model == null) { ViewBag.TYPE = "Add"; return(View(new VIEW_YX_weiUser() { })); } return(View(VIEW_YX_weiUser.ToViewModel(model))); }
public ActionResult CarDetail(string car_cd) { VIEW_MST_CAR car = new VIEW_MST_CAR() { CAR_CD = "CAR" + Common.Tools.Get8Digits(), AddTime = DateTime.Now }; var usernum = Request.QueryString["userNum"]; if (!string.IsNullOrEmpty(usernum)) { car.UserId = usernum; } var list = sys_UsurLogin.LoadListBy(su => su.LOGIN_ID == OperateContext.Current.UsrId).Select(su => su.SLSORG_CD); var memberlist = DataSelect.ToListViewModel(VIEW_YX_weiUser.ToListViewModel(userB.GetListBy(u => list.Contains(u.TREE_NODE_ID), u => u.userRelname))); ViewBag.MEMBERS = memberlist; ViewBag.ReturnUrl = Request["returnurl"]; ViewDetailPage page = new ViewDetailPage(HttpContext); ViewBag.IsView = page.IsView; //ViewBag.CurrentID = id; ViewBag.IsUpdate = "N"; ViewBag.TYPE = "Update"; var model = carB.Get(u => u.CAR_CD == car_cd); if (model == null) { ViewBag.TYPE = "Add"; ViewBag.IsUpdate = "Y"; return(View(car)); } if (memberlist.Select(m => m.Value).Contains(model.UserId)) { ViewBag.IsUpdate = "Y"; } return(View(VIEW_MST_CAR.ToViewModel(model))); }