Exemple #1
0
        public void CheckUnsaved()
        {
            //First of all validate anything required
            switch(m_iValidateType)
            {
                case 9: //Cutover Load
                    if(!ValidateCutoverLoad(m_sender, 1))
                    {
                        gbSuppressSecondCheck = false;
                        return;
                    }
                    break;
                case 10: //Cutover Date
                    if(!ValidateCutoverDate(m_sender, 1))
                    {
                        gbSuppressSecondCheck = false;
                        return;
                    }
                    break;
            }

            UILabel txtEditStatus = (UILabel)View.ViewWithTag (80);
            int iStatus = Convert.ToInt32 (txtEditStatus.Text);
            if (iStatus == 0)
            {
                DownloadedITPsScreen downloadScreen = new DownloadedITPsScreen ();
                downloadScreen = GetDownloadedITPsScreen ();
                this.NavigationController.PopToViewController (downloadScreen, true);
            }
            else
            {
                //Ask the question
                iUtils.AlertBox alert2 = new iUtils.AlertBox();
                alert2.CreateAlertYesNoCancelDialog();
                alert2.SetAlertMessage("You have unsaved changes. Only chnages to questions will be saved. RFU changes must be committed using the buttons. Do you wish to save these changes before going back to the downloaded screen?");
                alert2.ShowAlertBox();

                UIAlertView alert3 = alert2.GetAlertDialog();
                alert3.Clicked += (sender2, e2)  => {CheckSaveChangesQuestion(sender2, e2, e2.ButtonIndex);};

            }
        }
Exemple #2
0
 public void OpenDownloadedITPsScreen(object sender, EventArgs e)
 {
     DownloadedITPsScreen downloadScreen = new DownloadedITPsScreen ();
     this.NavigationController.PushViewController (downloadScreen, true);
 }
Exemple #3
0
 public void CheckSaveChangesQuestion(object sender, EventArgs e, int iBtnIndex)
 {
     DownloadedITPsScreen downloadScreen = new DownloadedITPsScreen ();
     downloadScreen = GetDownloadedITPsScreen ();
     switch (iBtnIndex)
     {
     case 0:
         SaveAllSections();
         this.NavigationController.PopToViewController (downloadScreen, true);
         break;
     case 1:
         this.NavigationController.PopToViewController (downloadScreen, true);
         break;
     case 2:
         break;
     }
 }