示例#1
0
 public void GivenAddApplicationsToThePayment(Table applications)
 {
     foreach (var application in applications.Rows)
     {
         PaymentDialog.AddApplication(application);
     }
 }
示例#2
0
        /// <summary>
        /// The logic for an PaymentCommand_Exectute.
        /// </summary>
        private void PayCommand_Execute(Window parrentWindow)
        {
            var dlg = new PaymentDialog();

            dlg.Owner = parrentWindow;

            if (dlg.ShowDialog() == true)
            {
                PaytypeCommandExecute(dlg.PaymentChoice);
            }
        }
示例#3
0
 public void GivenIStartToAddAPayment(Table paymentFieldRows)
 {
     BBCRMHomePage.OpenRevenueFA();
     RevenueFunctionalArea.AddAPayment();
     foreach (var paymentFieldValues in paymentFieldRows.Rows)
     {
         if (paymentFieldValues.ContainsKey("Constituent") && paymentFieldValues["Constituent"] != string.Empty)
         {
             paymentFieldValues["Constituent"] += uniqueStamp;
         }
         PaymentDialog.SetFields(paymentFieldValues);
     }
 }
示例#4
0
 public void GivenAddApplicationsToThePayment(Table applications)
 {
     try
     {
         foreach (var application in applications.Rows) //for each application in the batch, add it to the payment
         {
             PaymentDialog.AddApplication(application);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add applications to the payment. " + ex.Message);
     }
 }
示例#5
0
    void Awake()
    {
        Util.Log("Awake");

        paymentDialog = ((PaymentDialog)(GetComponent("PaymentDialog")));

        // allow only one instance of the Main Menu
        if (instance != null && instance != this)
        {
            Destroy(gameObject);
            return;
        }

        #if UNITY_WEBPLAYER
        // Execute javascript in iframe to keep the player centred
        string javaScript = @"
            window.onresize = function() {
              var unity = UnityObject2.instances[0].getUnity();
              var unityDiv = document.getElementById(""unityPlayerEmbed"");

              var width =  window.innerWidth;
              var height = window.innerHeight;

              var appWidth = " + CanvasSize.x + @";
              var appHeight = " + CanvasSize.y + @";

              unity.style.width = appWidth + ""px"";
              unity.style.height = appHeight + ""px"";

              unityDiv.style.marginLeft = (width - appWidth)/2 + ""px"";
              unityDiv.style.marginTop = (height - appHeight)/2 + ""px"";
              unityDiv.style.marginRight = (width - appWidth)/2 + ""px"";
              unityDiv.style.marginBottom = (height - appHeight)/2 + ""px"";
            }

            window.onresize(); // force it to resize now";
        Application.ExternalCall(javaScript);
        #endif
        DontDestroyOnLoad(gameObject);
        instance = this;


        // Initialize FB SDK
        enabled = false;
        FB.Init(SetInit, OnHideUnity);
    }
示例#6
0
    void Awake()
    {
        Util.Log("Awake");
   
        paymentDialog = ((PaymentDialog)(GetComponent("PaymentDialog")));

        // allow only one instance of the Main Menu
        if (instance != null && instance != this)
        {
            Destroy(gameObject);
            return;
        }

        #if UNITY_WEBPLAYER
        // Execute javascript in iframe to keep the player centred
        string javaScript = @"
            window.onresize = function() {
              var unity = UnityObject2.instances[0].getUnity();
              var unityDiv = document.getElementById(""unityPlayerEmbed"");

              var width =  window.innerWidth;
              var height = window.innerHeight;

              var appWidth = " + CanvasSize.x + @";
              var appHeight = " + CanvasSize.y + @";

              unity.style.width = appWidth + ""px"";
              unity.style.height = appHeight + ""px"";

              unityDiv.style.marginLeft = (width - appWidth)/2 + ""px"";
              unityDiv.style.marginTop = (height - appHeight)/2 + ""px"";
              unityDiv.style.marginRight = (width - appWidth)/2 + ""px"";
              unityDiv.style.marginBottom = (height - appHeight)/2 + ""px"";
            }

            window.onresize(); // force it to resize now";
        Application.ExternalCall(javaScript);
        #endif
        DontDestroyOnLoad(gameObject);
        instance = this;
        

        // Initialize FB SDK
        enabled = false;
        FB.Init(SetInit, OnHideUnity);
    }
示例#7
0
 private void AddPaymentClick( object sender, EventArgs eventArgs )
 {
     PaymentDialog d = new PaymentDialog( invoice );
     if( d.ShowDialog( this ) != DialogResult.OK ) {
         return;
     }
     InvoicePayment ip = d.Payment;
     NameValueCollection data = new NameValueCollection();
     data.Add( "invoiceID", invoice.ID );
     data.Add( "amount", ip.Amount );
     data.Add( "date", ip.Date.ToString( "yyyy-MM-dd" ) );
     data.Add( "comment", ip.Comment );
     data.Add( "houseID", house.ID );
     Invoice i = Caller.Post<Invoice>( "AddInvoicePayment", data );
     if( i != null ) {
         gui.ShowCurrent();
     }
 }
示例#8
0
 public void GivenIStartToAddAPayment(Table paymentFieldRows)
 {
     try
     {
         BBCRMHomePage.OpenRevenueFA();       //Open revenue functional area
         RevenueFunctionalArea.AddAPayment(); // add a payment
         foreach (var paymentFieldValues in paymentFieldRows.Rows)
         {
             if (paymentFieldValues.ContainsKey("Constituent") && paymentFieldValues["Constituent"] != string.Empty)
             {
                 paymentFieldValues["Constituent"] += uniqueStamp; //The unique stamp is a series of numbers to keep constituents different from each other
             }
             PaymentDialog.SetFields(paymentFieldValues);          //set the fields in the payment according to the table parameter
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not start to add a payment. " + ex.Message);
     }
 }