Esempio n. 1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     string content = (sender as Button).Content.ToString();
     // Tab Logic
     if (content.Equals("Home"))
     {
         Home home = new Home();
         this.NavigationService.Navigate(home);
     }
     else if (content.Equals("Upload"))
     {
         Upload upload = new Upload();
         this.NavigationService.Navigate(upload);
     }
     else
     {
         Pending pending = new Pending();
         this.NavigationService.Navigate(pending);
     }
 }
Esempio n. 2
0
 public void Write(string value)
 {
     WritePending();
     _output.Write('"');
     _output.Write(EscapeString(value));
     _output.Write('"');
     _pending = Pending.CommaNewLineAndIndent;
 }
Esempio n. 3
0
 public void WriteKey(string key)
 {
     Write(key);
     _output.Write(": ");
     _pending = Pending.None;
 }
Esempio n. 4
0
 public JsonWriter(TextWriter output)
 {
     _output = output;
     _pending = Pending.None;
 }
Esempio n. 5
0
 private void WriteEnd(char c)
 {
     _pending = Pending.NewLineAndIndent;
     _indent--;
     WritePending();
     _output.Write(c);
     _pending = Pending.CommaNewLineAndIndent;
 }
Esempio n. 6
0
 private void WriteStart(char c)
 {
     WritePending();
     _output.Write(c);
     _pending = Pending.NewLineAndIndent;
     _indent++;
 }
Esempio n. 7
0
 public void Write(bool value)
 {
     WritePending();
     _output.Write(value ? "true" : "false");
     _pending = Pending.CommaNewLineAndIndent;
 }
Esempio n. 8
0
 public void Write(int value)
 {
     WritePending();
     _output.Write(value.ToString(CultureInfo.InvariantCulture));
     _pending = Pending.CommaNewLineAndIndent;
 }
Esempio n. 9
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Options">Command line parameters</param>
        public override void Pending(Pending Options) {
            SetReporting(Options.Report, Options.Verbose);
            GetProfile(Options.Portal, Options.UDF);
            GetMeshClient();

            Utils.NYI();
            }
Esempio n. 10
0
        private static List<Pending> GetPendingDocuments(DateTime initialDate, DateTime finalDate, bool receivables)
        {
            List<Pending> output = new List<Pending>();

            if (!InitializeCompany())
                return output;

            StdBELista pendingDocumentsQuery = PriEngine.Engine.Consulta(
                "SELECT ValorPendente, Moeda, TipoDoc, Entidade, TipoEntidade, Estado, DataVenc, DataDoc " +
                "FROM Pendentes " +
                "WHERE TipoEntidade = " + (receivables ? "'C'" : "'F'") +
                " AND DataDoc >= '" + initialDate.ToString("yyyyMMdd") + "' AND DataDoc <= '" + finalDate.ToString("yyyyMMdd") + "' " +
                "ORDER BY DataDoc"
                );
            while (!pendingDocumentsQuery.NoFim())
            {
                Pending pendingDocument = new Pending();
                pendingDocument.PendingValue = new Money(pendingDocumentsQuery.Valor("ValorPendente"), pendingDocumentsQuery.Valor("Moeda"));
                pendingDocument.DocumentDate = pendingDocumentsQuery.Valor("DataDoc");
                pendingDocument.DocumentType = pendingDocumentsQuery.Valor("TipoDoc");
                pendingDocument.DueDate = pendingDocumentsQuery.Valor("DataVenc");
                pendingDocument.Entity = pendingDocumentsQuery.Valor("Entidade");
                pendingDocument.EntityType = pendingDocumentsQuery.Valor("TipoEntidade");
                pendingDocument.State = pendingDocumentsQuery.Valor("Estado");
                output.Add(pendingDocument);

                pendingDocumentsQuery.Seguinte();
            }

            return output;
        }
Esempio n. 11
0
		private static void Handle_Pending (
					Shell Dispatch, string[] args, int index) {
			Pending		Options = new Pending ();

			var Registry = new Goedel.Registry.Registry ();

			Options.Portal.Register ("portal", Registry, (int) TagType_Pending.Portal);
			Options.UDF.Register ("udf", Registry, (int) TagType_Pending.UDF);
			Options.Verbose.Register ("verbose", Registry, (int) TagType_Pending.Verbose);
			Options.Report.Register ("report", Registry, (int) TagType_Pending.Report);


#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_Pending TagType = (TagType_Pending) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_Pending.Portal : {
						int OptionParams = Options.Portal.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Portal.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Pending.UDF : {
						int OptionParams = Options.UDF.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.UDF.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Pending.Verbose : {
						int OptionParams = Options.Verbose.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Verbose.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Pending.Report : {
						int OptionParams = Options.Report.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Report.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.Pending (Options);

			}
Esempio n. 12
0
		public virtual void Pending ( Pending Options
				) {

			char UsageFlag = '-';
				{
#pragma warning disable 219
					Pending		Dummy = new Pending ();
#pragma warning restore 219

					Console.Write ("{0}pending ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Get list of pending connection requests");

				}

				Console.WriteLine ("    {0}\t{1} = [{2}]", "String", 
							"Portal", Options.Portal);
				Console.WriteLine ("    {0}\t{1} = [{2}]", "String", 
							"UDF", Options.UDF);
				Console.WriteLine ("    {0}\t{1} = [{2}]", "Flag", 
							"Verbose", Options.Verbose);
				Console.WriteLine ("    {0}\t{1} = [{2}]", "Flag", 
							"Report", Options.Report);
			Console.WriteLine ("Not Yet Implemented");
			}
Esempio n. 13
0
		private static void Usage () {

				Console.WriteLine ("brief");
				Console.WriteLine ("");

				{
#pragma warning disable 219
					Reset		Dummy = new Reset ();
#pragma warning restore 219

					Console.Write ("{0}reset ", UsageFlag);
					Console.WriteLine ();

					Console.WriteLine ("    Delete all test profiles");

				}

				{
#pragma warning disable 219
					Device		Dummy = new Device ();
#pragma warning restore 219

					Console.Write ("{0}device ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage (null, "id", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage (null, "dd", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Default.Usage ("default", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create new device profile");

				}

				{
#pragma warning disable 219
					Personal		Dummy = new Personal ();
#pragma warning restore 219

					Console.Write ("{0}personal ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Description.Usage (null, "pd", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Next.Usage ("next", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceNew.Usage ("new", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage ("dudf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage ("did", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage ("dd", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create new personal profile");

				}

				{
#pragma warning disable 219
					Register		Dummy = new Register ();
#pragma warning restore 219

					Console.Write ("{0}register ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.UDF.Usage (null, "udf", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Register the specified profile at a new portal");

				}

				{
#pragma warning disable 219
					Sync		Dummy = new Sync ();
#pragma warning restore 219

					Console.Write ("{0}sync ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Synchronize local copies of Mesh profiles with the server");

				}

				{
#pragma warning disable 219
					Escrow		Dummy = new Escrow ();
#pragma warning restore 219

					Console.Write ("{0}escrow ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Quorum.Usage ("quorum", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Shares.Usage ("shares", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create a set of key escrow shares");

				}

				{
#pragma warning disable 219
					Export		Dummy = new Export ();
#pragma warning restore 219

					Console.Write ("{0}export ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.File.Usage (null, "file", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Export the specified profile data to the specified file");

				}

				{
#pragma warning disable 219
					Import		Dummy = new Import ();
#pragma warning restore 219

					Console.Write ("{0}import ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.File.Usage (null, "file", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Import the specified profile data to the specified file");

				}

				{
#pragma warning disable 219
					List		Dummy = new List ();
#pragma warning restore 219

					Console.Write ("{0}list ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    List all profiles on the local machine");

				}

				{
#pragma warning disable 219
					Dump		Dummy = new Dump ();
#pragma warning restore 219

					Console.Write ("{0}dump ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Describe the specified profile");

				}

				{
#pragma warning disable 219
					Pending		Dummy = new Pending ();
#pragma warning restore 219

					Console.Write ("{0}pending ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Get list of pending connection requests");

				}

				{
#pragma warning disable 219
					Connect		Dummy = new Connect ();
#pragma warning restore 219

					Console.Write ("{0}connect ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
					Console.Write ("[{0}] ", Dummy.PIN.Usage ("pin", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceNew.Usage ("new", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage ("dudf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage ("did", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage ("dd", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Connect to an existing profile registered at a portal");

				}

				{
#pragma warning disable 219
					Accept		Dummy = new Accept ();
#pragma warning restore 219

					Console.Write ("{0}accept ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage (null, "udf", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Accept a pending connection");

				}

				{
#pragma warning disable 219
					Complete		Dummy = new Complete ();
#pragma warning restore 219

					Console.Write ("{0}complete ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Complete a pending connection request");

				}

				{
#pragma warning disable 219
					Password		Dummy = new Password ();
#pragma warning restore 219

					Console.Write ("{0}password ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add a web application profile to a personal profile");

				}

				{
#pragma warning disable 219
					AddPassword		Dummy = new AddPassword ();
#pragma warning restore 219

					Console.Write ("{0}pwadd ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Site.Usage (null, "site", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Username.Usage (null, "user", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Password.Usage (null, "password", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add password entry");

				}

				{
#pragma warning disable 219
					GetPassword		Dummy = new GetPassword ();
#pragma warning restore 219

					Console.Write ("{0}pwget ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Site.Usage (null, "site", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Lookup password entry");

				}

				{
#pragma warning disable 219
					DeletePassword		Dummy = new DeletePassword ();
#pragma warning restore 219

					Console.Write ("{0}pwdelete ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Site.Usage (null, "site", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Delete password entry");

				}

				{
#pragma warning disable 219
					DumpPassword		Dummy = new DumpPassword ();
#pragma warning restore 219

					Console.Write ("{0}pwdump ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.JSON.Usage (null, "json", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Describe password entry");

				}

				{
#pragma warning disable 219
					Mail		Dummy = new Mail ();
#pragma warning restore 219

					Console.Write ("{0}mail ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.address.Usage (null, "address", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add a mail application profile to a personal profile");

				}

				{
#pragma warning disable 219
					SSH		Dummy = new SSH ();
#pragma warning restore 219

					Console.Write ("{0}ssh ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Host.Usage (null, "host", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Client.Usage (null, "client", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add a ssh application profile to a personal profile");

				}

			} // Usage