Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _startDate = FirstDayOfMonthFromDateTime(DateTime.Today.AddMonths(-12));
            _endDate   = LastDayOfMonthFromDateTime(DateTime.Today);
            if (!Page.IsPostBack)
            {
                //First Load Countries From Thads Search

                DSPortalsService.DSPortalsSoapClient dsw = new DSPortalsService.DSPortalsSoapClient();
                var ssoGUID      = UserInfo.Profile.GetPropertyValue("ssoGUID");
                var resp         = dsw.GetPortalsForUserJson(ssoGUID).Distinct();
                var thisInstance = StaffBrokerFunctions.GetSetting("DataserverURL", PortalId);
                if (String.IsNullOrEmpty(thisInstance))
                {
                    thisInstance = "-unknownLocation";
                }


                //    MyCountries.Items.Add(new ListItem("South Africa", "https://tntdataserver.com/dataserver/rsa/dataquery/dataqueryservice.asmx"));


                foreach (DSPortalsService.DataserverPortal p in resp.OrderByDescending(x => x.InstanceUri.Contains(thisInstance)).ThenBy(y => y.InstanceName))
                {
                    MyCountries.Items.Add(new ListItem(p.InstanceName, p.InstanceUri));
                }


                //MyCountries.Items.Add(new ListItem("devtest","https://tntdataserver.eu/dataserver/devtest/dataquery/dataqueryservice.asmx"));
                //MyCountries.Items.Add(new ListItem("AgapeAOA","https://tntdataserver.eu/dataserver/AgapeAOA/dataquery/dataqueryservice.asmx"));



                ////

                if (MyCountries.Items.Count > 0)
                {
                    MyCountries_SelectedIndexChanged(this, null);
                    lblMessage.Visible = false;
                }
                else
                {
                    lblMessage.Text = "We cannot find an tntDataserver account for you in any country. Please contact the countries in which you receive donations, as ask them to add your TheKey account to their dataserver.";
                    string Message = "No DataServer accounts for: " + UserInfo.DisplayName + "(" + UserId.ToString() + ") " + ssoGUID + "CountryCount:" + MyCountries.Items.Count.ToString() + ";" + (resp.Count()).ToString();
                    DotNetNuke.Services.Log.EventLog.EventLogController objEventLog = new DotNetNuke.Services.Log.EventLog.EventLogController();

                    objEventLog.AddLog("Accounts", Message, PortalSettings, UserId, Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT);

                    lblMessage.Visible = true;
                }
            }



            //   InitializeValues();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _startDate = FirstDayOfMonthFromDateTime(DateTime.Today.AddMonths(-12));
             _endDate = LastDayOfMonthFromDateTime(DateTime.Today);
             if (!Page.IsPostBack)
             {
                //First Load Countries From Thads Search

                 DSPortalsService.DSPortalsSoapClient dsw = new DSPortalsService.DSPortalsSoapClient();
                 var ssoGUID = UserInfo.Profile.GetPropertyValue("ssoGUID");
                 var resp = dsw.GetPortalsForUserJson(ssoGUID ).Distinct();
               var thisInstance = StaffBrokerFunctions.GetSetting("DataserverURL", PortalId);

               //    MyCountries.Items.Add(new ListItem("South Africa", "https://tntdataserver.com/dataserver/rsa/dataquery/dataqueryservice.asmx"));

                 foreach (DSPortalsService.DataserverPortal  p in resp.OrderByDescending(x => x.InstanceUri.Contains(thisInstance)).ThenBy(y => y.InstanceName ))
                 {
                      MyCountries.Items.Add(new ListItem(p.InstanceName , p.InstanceUri ));

                 }

                //MyCountries.Items.Add(new ListItem("devtest","https://tntdataserver.eu/dataserver/devtest/dataquery/dataqueryservice.asmx"));
                //MyCountries.Items.Add(new ListItem("AgapeAOA","https://tntdataserver.eu/dataserver/AgapeAOA/dataquery/dataqueryservice.asmx"));

                 ////
                 MyCountries_SelectedIndexChanged(this, null);

             }

              //   InitializeValues();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _startDate = FirstDayOfMonthFromDateTime(DateTime.Today.AddMonths(-12));
             _endDate = LastDayOfMonthFromDateTime(DateTime.Today);
             if (!Page.IsPostBack)
             {
                //First Load Countries From Thads Search

                 DSPortalsService.DSPortalsSoapClient dsw = new DSPortalsService.DSPortalsSoapClient();
                 var ssoGUID = UserInfo.Profile.GetPropertyValue("ssoGUID");
                 var resp = dsw.GetPortalsForUserJson(ssoGUID ).Distinct();
               var thisInstance = StaffBrokerFunctions.GetSetting("DataserverURL", PortalId);
               if (String.IsNullOrEmpty(thisInstance)) thisInstance = "-unknownLocation";

               //    MyCountries.Items.Add(new ListItem("South Africa", "https://tntdataserver.com/dataserver/rsa/dataquery/dataqueryservice.asmx"));

                 foreach (DSPortalsService.DataserverPortal  p in resp.OrderByDescending(x => x.InstanceUri.Contains(thisInstance)).ThenBy(y => y.InstanceName ))
                 {
                      MyCountries.Items.Add(new ListItem(p.InstanceName , p.InstanceUri ));

                 }

                //MyCountries.Items.Add(new ListItem("devtest","https://tntdataserver.eu/dataserver/devtest/dataquery/dataqueryservice.asmx"));
                //MyCountries.Items.Add(new ListItem("AgapeAOA","https://tntdataserver.eu/dataserver/AgapeAOA/dataquery/dataqueryservice.asmx"));

                 ////

                 if (MyCountries.Items.Count > 0)
                 {
                     MyCountries_SelectedIndexChanged(this, null);
                     lblMessage.Visible = false;
                 }
                 else
                 {
                     lblMessage.Text = "We cannot find an tntDataserver account for you in any country. Please contact the countries in which you receive donations, as ask them to add your TheKey account to their dataserver.";
                     string Message="No DataServer accounts for: " + UserInfo.DisplayName + "(" + UserId.ToString() + ") " + ssoGUID + "CountryCount:" + MyCountries.Items.Count.ToString() + ";" + (resp.Count()).ToString();
                     DotNetNuke.Services.Log.EventLog.EventLogController objEventLog = new DotNetNuke.Services.Log.EventLog.EventLogController();

                     objEventLog.AddLog("Accounts", Message, PortalSettings, UserId, Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT);

                     lblMessage.Visible = true;
                 }

             }

              //   InitializeValues();
        }