public static string GetMenuByComid(int comid, int id) { try { int totalcount1 = 0; int selectpro = 0; int totalcount2 = 0; List <WxMaterial> Material = null; var actdata = new WxMaterialData(); B2b_company_menu list = B2bCompanyMenuData.GetMenuByComid(comid, id); var prodata = new B2bComProData(); List <B2b_com_pro> Prolist = null; IEnumerable result = ""; if (list != null) { Prolist = prodata.Selectpagelist_diaoyong(comid.ToString(), 1, 12, "", out totalcount1, list.Projectlist, 0, id);//读出每个栏目的产品,每页12个 selectpro = prodata.Selectpagelist_ct(comid.ToString(), id); list.Imgurl_address = FileSerivce.GetImgUrl(list.Imgurl); Material = list.Menutype == 0 ? null : actdata.ShopWxMaterialPageList(comid, 1, 12, 10, id, list.Projectlist, out totalcount2, ""); } return(JsonConvert.SerializeObject(new { type = 100, msg = list, prolist = Prolist, selectpro = selectpro, Materiallist = Material })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); } }
private void ShowImgBind() { //var comid = Context.Request["comid"].ConvertTo<int>(0); var comid = UserHelper.CurrentCompany.ID; if (id != 0) { B2b_company_menu menumodel = B2bCompanyMenuData.GetMenuByComid(comid, id); if (menumodel != null) { Name = menumodel.Name; linkurl = menumodel.Linkurl; FileUploadModel identityFileUpload = new FileUploadData().GetFileById(menumodel.Imgurl); if (identityFileUpload != null) { headPortraitImgSrc = identityFileUpload.Relativepath; } } } }