Esempio n. 1
0
        public void downloadIOSFile()
        {
            AppDownloadOBJDAO dao = new AppDownloadOBJDAO();
            AppDownloadOBJ    obj = new AppDownloadOBJ();

            obj = dao.GetAppFiles();
            Response.Redirect(obj.IOSApp);
            //itms-services://?action=download-manifest&url=https://crestron.sit.nyp.edu.sg/nypIprojectionIOSDownload/manifest.xml
            //This is the url to download IOS App
        }
Esempio n. 2
0
        public ActionResult OpenPWALink()
        {
            AppDownloadOBJDAO dao = new AppDownloadOBJDAO();
            AppDownloadOBJ    obj = new AppDownloadOBJ();

            obj = dao.GetAppFiles();
            return(Redirect(obj.PWALink));
            //https://crestron.sit.nyp.edu.sg/nypiprojection/
            //This is the url for the pwa
        }
Esempio n. 3
0
        public void downloadAndroidFile()
        {
            AppDownloadOBJDAO dao = new AppDownloadOBJDAO();
            AppDownloadOBJ    obj = new AppDownloadOBJ();

            obj = dao.GetAppFiles();
            byte[] bytes = obj.AndroidApp;
            Response.Clear();
            MemoryStream ms = new MemoryStream(bytes);

            Response.ContentType = "application/apk";
            Response.AddHeader("content-disposition", "attachment;filename=nypIprojectionApp-Signed.apk");
            Response.Buffer = true;
            ms.WriteTo(Response.OutputStream);
            Response.End();
        }
Esempio n. 4
0
        public AppDownloadOBJ GetAppFiles()
        {
            conn.Open();
            AppDownloadOBJ obj   = new AppDownloadOBJ();
            string         query = "Select * from tblAppDownload where ID = '1'";
            SqlDataAdapter da    = new SqlDataAdapter(query, conn);
            DataSet        ds    = new DataSet();

            da.Fill(ds, "tblAppDownload");
            int rec_count = ds.Tables["tblAppDownload"].Rows.Count;

            if (rec_count > 0)
            {
                DataRow row = ds.Tables["tblAppDownload"].Rows[0];
                obj.AndroidApp = (byte[])row["AndroidApp"];
            }
            else
            {
                obj = null;
            }
            conn.Close();

            return(obj);
        }