Beispiel #1
0
        public static string GetConsultantByComid(int comid, int id)
        {
            try
            {
                B2b_company_menu com          = B2bCompanyMenuData.GetConsultantByComid(comid, id);
                var prodata                   = new B2bComProData();
                var actdata                   = new WxMaterialData();
                List <B2b_com_pro> Prolist    = null;
                List <WxMaterial>  WxMaterial = null;
                int totalcount1               = 0;


                if (com.Outdata == 0)
                {
                    Prolist = prodata.Selectpagelist_diaoyong(comid.ToString(), 1, 50, "", out totalcount1, 0, 0, 0, id);//读出每个栏目的产品,每页12个
                }
                if (com.Outdata == 2)
                {
                    WxMaterial = actdata.WxMaterialPageList(comid, 1, 100, 10, 1000000, out totalcount1, "", 0, id);
                }
                return(JsonConvert.SerializeObject(new { type = 100, msg = com, Prolist = Prolist, WxMaterial = WxMaterial }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message }));
            }
        }
Beispiel #2
0
        private void ShowImgBind()
        {
            //var comid = Context.Request["comid"].ConvertTo<int>(0);
            var comid = UserHelper.CurrentCompany.ID;

            if (id != 0)
            {
                B2b_company_menu menumodel = B2bCompanyMenuData.GetConsultantByComid(comid, id);
                if (menumodel != null)
                {
                    Name    = menumodel.Name;
                    linkurl = menumodel.Linkurl;
                    typeid  = menumodel.Linktype;



                    FileUploadModel identityFileUpload = new FileUploadData().GetFileById(menumodel.Imgurl);
                    if (identityFileUpload != null)
                    {
                        headPortraitImgSrc = identityFileUpload.Relativepath;
                    }
                }
            }
        }