Пример #1
0
		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			Query q = new Query();
			q.QueryCondition = Usr.LoggedInQ;
			q.NoLock = true;
			q.ReturnCountOnly = true;
			UsrSet us = new UsrSet(q);
			UsersOnline5MinLabel.Text = (us.Count == 1 ? "is " : "are ") + us.Count.ToString("#,##0") + " user" + (us.Count == 1 ? "" : "s");

			Query q30min = new Query();
			q30min.QueryCondition = Usr.LoggedIn30MinQ;
			q30min.NoLock = true;
			q30min.ReturnCountOnly = true;
			UsrSet us30min = new UsrSet(q30min);
			UsersOnline30MinLabel.Text = us30min.Count.ToString("#,##0");

			Bobs.Global gMaxUsers = new Bobs.Global(Bobs.Global.Records.MaxUsers5Min);
			MaxUsersOnline5MinLabel.Text = gMaxUsers.ValueInt.ToString("#,##0");
			MaxUsersOnline5MinDateLabel.Text = Cambro.Misc.Utility.FriendlyDate(gMaxUsers.ValueDateTime, true, false);
			Bobs.Global gMaxUsers30Min = new Bobs.Global(Bobs.Global.Records.MaxUsers30Min);
			MaxUsersOnline30MinLabel.Text = gMaxUsers30Min.ValueInt.ToString("#,##0");

			Page.DataBind();
		}
Пример #2
0
		protected void Page_Load(object sender, EventArgs e)
		{
			ContainerPage.SslPage = true;
			Usr.KickUserIfNotLoggedIn();

			if (!Page.IsPostBack)
			{
				Bobs.Global g = new Bobs.Global(Bobs.Global.Records.CampDsiTickets);
				if (g.ValueInt >= 500)
					ChangePanel(SoldOutPanel);
				else
					ChangePanel(QuantityPanel);
			}

			NameLabel.Text = Usr.Current.FullName;

			if (Usr.Current.CampTickets > 0)
			{
				AlreadyHaveTicketsP.Visible = true;
				AlreadyHaveTicketsP.InnerHtml = "You already have " + Usr.Current.CampTickets + " ticket" + (Usr.Current.CampTickets == 1 ? "" : "s") + " in your account. You can use this page to buy additional tickets. (5 tickets max).";
				AlreadyHaveTicketsLabel.Text = "additional";

			}
			//Nominal ledger: 4011
		}
Пример #3
0
		protected void Page_Load(object sender, EventArgs e)
		{
			Usr.KickUserIfNotAdmin("Only admin!");


			Bobs.Global glo = new Bobs.Global(Bobs.Global.Records.RoyalMailEproPassword);
			OldPass.Text = glo.ValueString;
		}
Пример #4
0
		protected void UpdatePass(object sender, EventArgs eventArgs)
		{
			Bobs.Global glo = new Bobs.Global(Bobs.Global.Records.RoyalMailEproPassword);
			glo.ValueString = Pass.Text;
			glo.Update();
			Pass.Text="";
		}
Пример #5
0
		public EProImportService GetEpro()
		{
			EProImportService mail = new EProImportService();
			Spotted.com.royalmail.epro.www.Authentication auth = new Spotted.com.royalmail.epro.www.Authentication();
			auth.Version = "1.0.0.1";
			if (Vars.DevEnv)
			{
				auth.AccessCode = 47;
				auth.Username = "******";
				auth.Password = "******";
			}
			else
			{
				Bobs.Global glo = new Bobs.Global(Bobs.Global.Records.RoyalMailEproPassword);

				auth.AccessCode = 10702;
				auth.Username = "******";
				auth.Password = glo.ValueString;
			}
			mail.AuthenticationValue = auth;
			return mail;
		}
Пример #6
0
		protected void GetReport(object sender, EventArgs eventArgs)
		{
			#region Get summary report
			EProExportService export = new EProExportService();
			Spotted.com.royalmail.epro.www1.Authentication authExport = new Spotted.com.royalmail.epro.www1.Authentication();
			authExport.Version = "1.0.0.1";
			if (!Vars.DevEnv)
			{
				authExport.AccessCode = 47;
				authExport.Username = "******";
				authExport.Password = "******";
			}
			else
			{
				Bobs.Global glo = new Bobs.Global(Bobs.Global.Records.RoyalMailEproPassword);

				authExport.AccessCode = 10702;
				authExport.Username = "******";
				authExport.Password = glo.ValueString;
			}
			export.AuthenticationValue = authExport;
			Export[] exportList = export.GetExportList();
			if (true)
			{
				Response.Write("<pre>");
				foreach (Export e in exportList)
				{
					Response.Write(e.Reference + " " + e.Name + " (" + e.Description + ")\n");
				}
				Response.Write("</pre>");
				//return;
			}
			
			GenerateExportInput exportRequest = new GenerateExportInput();
			//exportRequest.ExportReference = new Guid("3a33ebb0-6a78-4bec-b703-9c73531ad46a");
			exportRequest.ExportReference = new Guid("3a33ebb0-6a78-4bec-b703-9c73531ad46a");
			exportRequest.OutputType = ExportOutputTypes.html;


			MultiSelectParameter parameter1 = new MultiSelectParameter();
			parameter1.Name = "CustomerIDList";
		//	if (Vars.DevEnv)
		//		parameter1.Values = new string[] { "3325" }; //test account
		//	else
				parameter1.Values = new string[] { "22527" }; //dsi account

			MultiSelectParameter parameter2 = new MultiSelectParameter();
			parameter2.Name = "ServiceIDList";
			parameter2.Values = new string[] { "7111", "7107", "200", "3005" };

			DateTimeParameter parameter3 = new DateTimeParameter();
			parameter3.Name = "StartDate";
			parameter3.Value = DateTime.Today.AddDays(0);

			DateTimeParameter parameter4 = new DateTimeParameter();
			parameter4.Name = "EndDate";
			parameter4.Value = DateTime.Today.AddDays(1);

			BooleanParameter parameter5 = new BooleanParameter();
			parameter5.Name = "PosterDetails";
			parameter5.Value = true;

			BooleanParameter parameter6 = new BooleanParameter();
			parameter6.Name = "DocketDetails";
			parameter6.Value = true;

			SingleSelectParameter parameter7 = new SingleSelectParameter();
			parameter7.Name = "ApprovalState";
			parameter7.Value = "3"; //1=Approved, 2=Unapproved, 3=Both

			BooleanParameter parameter8 = new BooleanParameter();
			parameter8.Name = "RPSiteComments";
			parameter8.Value = false;

			BooleanParameter parameter9 = new BooleanParameter();
			parameter9.Name = "PosterComments";
			parameter9.Value = false;

			exportRequest.Parameters = new ExportParameter[] { parameter1, parameter2, parameter3, parameter4, parameter5, parameter6, parameter7, parameter8, parameter9 };
			GenerateExportOutput report;
			try
			{
				report = export.GenerateExport(exportRequest);
			}
			catch (Exception ex)
			{
				throw ex;
			}
			#endregion

			if (report.ExtraParametersRequired!=null && report.ExtraParametersRequired.Length > 0)
			{
				foreach (RequiredParameter rp in report.ExtraParametersRequired)
				{
					Response.Write("<b>" + rp.Name + " (" + rp.ParameterType + ")</b> ");
					if (rp.PossibleValues != null)
					{
						foreach (PossibleValue pv in rp.PossibleValues)
							Response.Write("<br>" + pv.Value + " (" + pv.Description + ")");
					}
				}
				return;
			}


			#region Output report to page
		//	Response.Clear();
		//	Response.Write("<div style=\"page-break-after:always;\">");
			Response.Write(report.ExportData.InnerText);
		//	Response.Write("</div>");
			#endregion

		}
Пример #7
0
		protected void AboveContent_PreRender(object sender, EventArgs eventArgs)
		{
			if (Usr.Current != null && Usr.Current.IsSenior)
			{
				Bobs.Global g = new Bobs.Global(Bobs.Global.Records.PendingPhotoAbuseReports);
				if (g.ValueInt > 0)
					PendingAbusePanel.Visible = true;
				else
					PendingAbusePanel.Visible = false;
			}
		}