Exemplo n.º 1
0
        public Escalation_Thread_Agents()
        {
            this.InitializeComponent();
            StartDatePicker.Date = DateTime.Today.AddDays(-7);
            EndDatePicker.Date   = DateTime.Today;
            EscalationThreadList = new ObservableCollectionView <Models.EscalationThread>();
            EscalationThread EscalationThread = new EscalationThread();

            EscalationThread.ThreadTitle      = "[C++][UWP] MJPEG MediaPlayer support";
            EscalationThread.ThreadLink       = new Uri("https://social.msdn.microsoft.com/Forums/windowsapps/en-US/bec39605-b09d-4c3b-80a1-f40a8aaa203b/cuwp-mjpeg-mediaplayer-support?forum=wpdevelop");
            EscalationThread.EscalationReason = "I am not good at it";
            EscalationThread.FTEOnwer         = "Fang Peng";
            EscalationThread.ThreadOwner      = "Barry Wang";
            EscalationThread.ThreadCreateDate = DateTime.Parse("Tuesday, September 05, 2017 4:23 PM");
            EscalationThread.EscalationDate   = DateTime.Parse("Wednesday, September 06, 2017 5:23 PM");
            EscalationThread.EscalationStatus = "Closed:Replied";
            EscalationThreadList.Items.Add(EscalationThread);
            EscalationThread EscalationThread1 = new EscalationThread();

            EscalationThread1.ThreadTitle      = "[C++][UWP] MJPEG MediaPlayer support";
            EscalationThread1.ThreadLink       = new Uri("https://social.msdn.microsoft.com/Forums/windowsapps/en-US/bec39605-b09d-4c3b-80a1-f40a8aaa203b/cuwp-mjpeg-mediaplayer-support?forum=wpdevelop");
            EscalationThread1.EscalationReason = "I am not good at it";
            EscalationThread1.FTEOnwer         = "Fang Peng";
            EscalationThread1.ThreadOwner      = "Barry Wang";
            EscalationThread1.ThreadCreateDate = DateTime.Parse("Tuesday, September 05, 2017 4:23 PM");
            EscalationThread1.EscalationDate   = DateTime.Parse("Wednesday, September 06, 2017 5:23 PM");
            EscalationThread1.EscalationStatus = "Closed:Replied";
            EscalationThreadList.Items.Add(EscalationThread1);
            MyDataGrid.ItemsSource = EscalationThreadList;
            this.DataContext       = this;
        }
Exemplo n.º 2
0
        public async void ModifyStatus(EscalationThread escalationThread)
        {
            HttpClient HttpClient    = new HttpClient();
            var        json          = JsonConvert.SerializeObject(escalationThread);
            var        stringContent = new HttpStringContent(json,
                                                             Windows.Storage.Streams.UnicodeEncoding.Utf8,
                                                             "application/json");
            var HttpResponseMessage = await HttpClient.PutAsync(new Uri("http://escalationmanagerwebapi.azurewebsites.net/api/ethreads"), stringContent);

            if (HttpResponseMessage.StatusCode == HttpStatusCode.Ok)
            {
                MessageDialog messageDialog = new MessageDialog("Modify the Status Sucessfully!!");
                await messageDialog.ShowAsync();
            }
        }
Exemplo n.º 3
0
        public FTE_All_EscalationThread()
        {
            this.InitializeComponent();
            this.EndDatePicker.Date = DateTime.Today;
            int date = DateTime.Today.Day;
            this.StartDatePicker.Date = DateTime.Today.AddDays(-(date-1));
            this.SizeChanged += FTE_All_EscalationThread_SizeChanged;
            EscalatonStatusList = new EscalationStatusWithSelectedItem();
            AllMyPlatform = new ProductWithSelectedItem();
            EscalationThreadList = new ObservableCollectionView<EscalationAndStatusThread>();
            EscalationThreadListPage = new ObservableCollectionView<EscalationAndStatusThread>();
            FTEEscalationThreadViewModel = new FTEEscalationThreadViewModel();
            EscalationThread = new EscalationThread();
            this.Loaded += FTE_All_EscalationThread_Loaded;
            this.DataContext = FTEEscalationThreadViewModel;

        }
    // Initialise only on the first request
    public static void Initialise(HttpContext context)
    {
        if (string.IsNullOrEmpty(host))
        {         //host isn't set so this is first request
            lock (s_lock)
            {     //no race condition
                if (string.IsNullOrEmpty(host))
                {
                    Uri uri = HttpContext.Current.Request.Url;
                    host = uri.Scheme + Uri.SchemeDelimiter + uri.Host + ":" + uri.Port;

                    //open EscalationThread class constructor that starts anonymous thread that keeps running.
                    //Constructor saves host into a property to remember and use it.
                    EscalationThread et = new EscalationThread(host);
                }
            }
        }
    }