Beispiel #1
0
 private bool LoadSavePath(ResourceInfoModel model, string WebSit)
 {
     string SavePath = string.Empty;
     SavePath = model.DownFilePath;
     SavePath = LoadPath + SavePath;
     bool result=  DownLoad(WebSit, SavePath);
     return result;
 }
Beispiel #2
0
        private List<ResourceInfoModel> GetResourceInfoModel(DataTable table)
        {
            List<ResourceInfoModel> list = new List<ResourceInfoModel>();
            if (table!=null)
            {
                foreach (DataRow dr in table.Rows)
                {
                    ResourceInfoModel rm = new ResourceInfoModel();
                    rm.ID = Convert.ToInt32(dr["Id"].ToString());
                    rm.FileURL = dr["URL"].ToString();
                    rm.DownFilePath = dr["Path"].ToString();
                    list.Add(rm);
                }
            }

            return list;
        }