Пример #1
0
        private void ShowImgBind(int id)
        {
            //根据产品id得到 产品信息
            B2bModelData modeldate = new B2bModelData();
            var          proo      = modeldate.GetModelMenuById(id);

            if (proo != null)
            {
                var identityFileUpload = new FileUploadData().GetFileById(proo.Imgurl.ToString().ConvertTo <int>(0));
                if (identityFileUpload != null)
                {
                    headPortraitImgSrc = identityFileUpload.Relativepath;
                }
            }
        }
Пример #2
0
        public static string GetModelMenuById(int id)
        {
            try
            {
                B2bModelData modedata = new B2bModelData();
                var          list     = modedata.GetModelMenuById(id);
                if (list == null)
                {
                    return(JsonConvert.SerializeObject(new { type = 1, msg = "没有查询到菜单", totalCount = 0 }));
                }
                return(JsonConvert.SerializeObject(new { type = 100, msg = list }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message }));

                throw;
            }
        }