Example #1
0
        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            //Commented 20130724 Moved Appointment Time to CSC revision
            //if (dtAppointment.SelectedValue != null)
            //{
            //    if (dtAppointment.SelectedValue < DateTime.Now)
            //    {
            //        DialogParameters param = new DialogParameters();
            //        param.Header = "Invalid Appointment Time";
            //        param.Content = "The specified Appointment Time is in the past.\r\nPlease select another Appointment Time.";
            //        RadWindow.Alert(param);
            //    }
            //    else
            //    {
            //        DateTime appointmentTime = dtAppointment.SelectedValue.Value;

            if (_revisionTypeId == 6)         //Contract Draft
            {
                BusyIndicator1.IsBusy      = true;
                BusyIndicator1.BusyContent = "Creating Ready for Studio M Split Revisions...";

                _mrsClient.CreateContractDraftCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(mrsClient_CreateContractDraftCompleted);
                _mrsClient.CreateContractDraftAsync(_estimateRevisionId, (App.Current as App).CurrentUserId /*, DateTime.MinValue*/);
            }
            else if (_revisionTypeId == 13)         //Final Contract
            {
                BusyIndicator1.IsBusy      = true;
                BusyIndicator1.BusyContent = "Creating Final Contract...";

                _mrsClient.CreateFinalContractCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(mrsClient_CreateFinalContractCompleted);
                _mrsClient.CreateFinalContractAsync(_estimateRevisionId, (App.Current as App).CurrentUserId /*, DateTime.MinValue*/);
            }
            //    }
            //}
        }