protected void DoReport()
        {
            if (!CheckIP().Result)
                return;

            PracticeClient rspClient = new PracticeClient("BasicHttpBinding_PracticeStream");

            Stream stm = rspClient.GetCsvSlots();
            TextReader tr = new StreamReader(stm);

            Response.Clear();
            Response.ContentType = "text/csv";
            Response.AddHeader("Content-Disposition", "filename=\"Slots.csv\"");

            string sLine;

            while ((sLine = tr.ReadLine()) != null)
                {
                Response.Write(sLine);
                Response.Write("\n");
                }

            //    	    Response.Write(s);
            Response.Write("\n");
            Response.Flush();
            Response.End();
        }
Ejemplo n.º 2
0
        private void StartHeartbeat(object sender, EventArgs e)
        {
            PracticeClient client = new PracticeClient();

            RSR_CalItems calItems = client.GetCalendarForTeam("InvalidTeam");

            UpdateStats(calItems);
        }
Ejemplo n.º 3
0
        protected void DoUploadTeams(object sender, EventArgs e)
        {
            SR sr = CheckIP();

            if (!sr.Result)
                {
                ReportSr(sr, "ipc");
                return;
                }
            RwpSvc.PracticeClient rspClientStream = new PracticeClient("BasicHttpBinding_PracticeStream");

            if ((fuTeams.PostedFile != null) && (fuTeams.PostedFile.ContentLength > 0))
                {

                System.Guid guid = System.Guid.NewGuid();

                string sAsPosted = System.IO.Path.GetFileName(fuTeams.PostedFile.FileName);
                string sUpload = Server.MapPath("\\Data") + "\\" + guid.ToString();

                sr = rspClientStream.ImportCsvTeams(fuTeams.PostedFile.InputStream);
                }
            else
                {
                sr = new SR();
                sr.Result = false;
                sr.Reason = String.Format("Upload of file failed!");
                }
            ReportSr(sr, "Upload Teams");
            rspClientStream.Close();
        }