Esempio n. 1
0
        private void ApplyOrChange_Click(object sender, EventArgs e)
        {
            AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this).SetOnDismissListener(this);
            dialogBuilder.SetMessage("Želite li Potvrditi ili predložiti promjene");
            dialogBuilder.SetPositiveButton("Potvrdi", (senderAlert, args) => {
                var id       = FirebaseAuth.GetInstance(loginActivity.app).CurrentUser.Uid;
                var firebase = new FirebaseClient(loginActivity.FirebaseURL);

                status.Text          = "Dogovoreno";
                order.status         = "Dogovoreno";
                order.datumServisa   = datumServisa.Text;
                order.vrijemeServisa = vrijemeServisa.Text;

                status.SetTextColor(Android.Graphics.Color.DarkOliveGreen);
                applyOrChange.Enabled = false;

                var data = firebase.Child("order").Child(id).Child(orderID).Child(objectID).PutAsync <orders>(order);
                getOnlineDadata();
                dialogBuilder.Dispose();
            });
            dialogBuilder.SetNegativeButton("Odustani", (senderAlert, args) => {
                dialogBuilder.Dispose();
            });
            dialogBuilder.SetNeutralButton("Predloži izmjenu", (senderAlert, args) => {
                datumServisa.Text    = "";
                datumServisa.Enabled = true;
                datumServisa.PerformClick();

                vrijemeServisa.Text    = "";
                vrijemeServisa.Enabled = true;
                dialogBuilder.Dispose();
            });

            AlertDialog alertDialog = dialogBuilder.Create();

            alertDialog.Show();
        }
Esempio n. 2
0
 private void Calendar_onDatePickedEvent(object sender, onDatePickedEventArgs e)
 {
     datumServisa.Text = e.datePicked;
     vrijemeServisa.PerformClick();
 }