Ejemplo n.º 1
0
    protected void btnExport_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            DataTable dt = BLL_LMS_Training.GET_VESSEL_VIDEOS(null);
            dt.DefaultView.RowFilter = "FileName IS NOT NULL";
            DataView dv = dt.DefaultView;

            List <String> lFileList = new List <string>();

            foreach (DataRow item in dv.ToTable().Rows)
            {
                lFileList.Add(item["FileName"].ToString());
            }

            if (lFileList.Count > 0)
            {
                string lDownlodFileName = BLL_LMS_Training.RAR(Server.MapPath("~/Uploads/VesselVideos"), lFileList);
                ResponseHelper.Redirect("~/Uploads/VesselVideos/" + lDownlodFileName, "blank", "");
            }
        }
        catch (Exception)
        {
            string js1 = "alert('Videos Not Found.');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "showModalJS", js1, true);
            return;
        }

        //string[] HeaderCaptions = { "Module Name", "Original File Name", "New File Name" };
        //string[] DataColumnsName = { "text", "OriginalFileName", "FileName", };

        //GridViewExportUtil.ShowExcel(dv.ToTable(), HeaderCaptions, DataColumnsName, "Vessel_Videos_File_List", "Rename your local files with file names as given below", "");
    }
Ejemplo n.º 2
0
    public string Get_Function_Tree_Videos(string id)
    {
        DataTable dt = BLL_LMS_Training.GET_VESSEL_VIDEOS(null);

        return(ConvertDataTabletoJson(dt));
    }