Example #1
0
    private void showfilelist()
    {
        string cidDir = "~/Store/" + LabelCid.Text;

        Dlfilelist.DataSource = LearnSite.DBUtility.DbBackup.FileList(cidDir);
        Dlfilelist.DataBind();
    }
Example #2
0
    /// <summary>
    /// 列表网盘文件
    /// </summary>
    /// <param name="Syear">入学年份</param>
    /// <param name="Sclass">班级</param>
    /// <param name="sharedir">学号或组号</param>
    private void ListShareFiles(string Syear, string Sclass, string Dir, bool IsGroup)
    {
        Dlfilelist.Visible = true;
        DateTime dt1 = DateTime.Now;

        LearnSite.Common.ShareDisk.DiskInfo dk = new LearnSite.Common.ShareDisk.DiskInfo(Syear, Sclass, Dir, IsGroup);
        Dlfilelist.DataSource = dk.Dw;
        Dlfilelist.DataBind();
        DateTime dt2      = DateTime.Now;
        string   timepass = LearnSite.Common.Computer.DatagoneMilliseconds(dt1, dt2) + "ms";
        string   msgtitle = "我的";

        if (IsGroup)
        {
            msgtitle = "小组";
        }
        Labeldisk.Text = msgtitle + "网盘" + dk.Dsize.ToString("F1") + "/" + dk.Dlimit.ToString("0") + "MB  " + dk.Dcount.ToString() + "个文件 " + timepass;
        if (dk.Dupload)
        {
            Fupload.Enabled   = true;
            Btnupload.Enabled = true;
        }
        else
        {
            Fupload.Enabled   = false;
            Btnupload.Enabled = false;
        }
    }
Example #3
0
 private void showXmlList()
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         string hid      = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();//教师编号
         string savepath = LearnSite.Common.ClassModel.ClassModeSavePath(hid);
         System.Threading.Thread.Sleep(100);
         string newdir = LearnSite.DBUtility.DbBackup.GetLastDir(savepath);
         if (!string.IsNullOrEmpty(savepath) && !string.IsNullOrEmpty(newdir))
         {
             string fdir = "~/ClassModel/" + hid + "/" + newdir;
             Dlfilelist.DataSource = LearnSite.DBUtility.DbBackup.FileList(fdir);//虚拟目录
             Dlfilelist.DataBind();
             Labeldirhid.Text = savepath;
             Labeldir.Text    = fdir;
         }
     }
 }