Пример #1
0
    //暂为手动生成,后期改为数据库获取
    public DataTable GetWaterImgDT()
    {
        string[]  imgs = "/Images/admin_logo.jpg|/Images/logo.png|/Images/baidulogo.gif".Split('|');
        DataTable dt   = FileSystemObject.GetDTFormat2();

        for (int i = 0; i < imgs.Length; i++)
        {
            DataRow dr = dt.NewRow();
            dr["Name"] = Path.GetFileName(imgs[i]);
            dr["Path"] = imgs[i];
            dt.Rows.Add(dr);
        }
        return(dt);
    }
Пример #2
0
        public DataTable GetWaterImgDT()
        {
            List <JObject> list = JsonConvert.DeserializeObject <List <JObject> >(WaterModuleConfig.WaterConfig.WaterImgs);
            DataTable      dt   = FileSystemObject.GetDTFormat2();

            for (int i = 0; i < list.Count; i++)
            {
                DataRow dr = dt.NewRow();
                dr["Name"] = Path.GetFileName(list[i]["url"].ToString());
                dr["Path"] = list[i]["url"].ToString();
                dt.Rows.Add(dr);
            }
            return(dt);
        }
Пример #3
0
        //暂为手动生成,后期改为数据库获取
        public DataTable GetWaterImgDT()
        {
            //function.WriteErrMsg(WaterModuleConfig.WaterConfig.WaterImgs);
            List <JObject> list = JsonConvert.DeserializeObject <List <JObject> >(WaterModuleConfig.WaterConfig.WaterImgs);
            //string[] imgs = "/Images/admin_logo.jpg|/Images/logo.png|/Images/baidulogo.gif".Split('|');
            DataTable dt = FileSystemObject.GetDTFormat2();

            for (int i = 0; i < list.Count; i++)
            {
                DataRow dr = dt.NewRow();
                dr["Name"] = Path.GetFileName(list[i]["url"].ToString());
                dr["Path"] = list[i]["url"].ToString();
                dt.Rows.Add(dr);
            }
            return(dt);
        }