public void GetAllUrlsByTerm1(string term, int day, string filedate) { DataTable dt = new DataTable(); dt = classDAO.GetAllClassesByTerm(term, day); for (int i = 0; i < dt.Rows.Count; i++) { DataTable dtClasses = assetDAO.GetAllAssetBydid(dt.Rows[i][0].ToString(), filedate); for (int j = 0; j < dtClasses.Rows.Count; j++) { AssetDTO asset = new AssetDTO(); // asset.AssetID = int.Parse(dt.Rows[i]["AssetID"].ToString()); asset.Class_Code = (dtClasses.Rows[j]["code"].ToString()); asset.URL_File = "/" + dtClasses.Rows[j]["_val"].ToString() + "/"; asset.Term = term; asset.Session = dtClasses.Rows[j]["session"].ToString(); asset.Fee = 3000; asset.FileSize = double.Parse(dtClasses.Rows[j]["storage"].ToString()); asset.FileName = dtClasses.Rows[j]["name"].ToString(); asset.FileTime = dtClasses.Rows[j]["DATE_CREATED"].ToString(); asset.FileDate = dtClasses.Rows[j]["Shamsi Date"].ToString(); asset.IsSynch = true; asset.link_view = ""; assetDAO.InsertIntoAssetFromServer(asset); } } }