예제 #1
0
        private void buttonSaveAndContinue_Click(object sender, EventArgs e)
        {
            try
            {
                var navigateurl = Page.ResolveUrl("~/JA/JADuties.aspx");

                if (base.ShowEditFields(enumDocumentType.JA))
                {
                    if (Page.IsValid)
                    {
                        if (DidDEUCheckboxChange && !this.checkboxDEU.Checked && base.HasActiveCR() && !ConfirmDeleteCR)
                        {
                            rwConfirmDeleteCR.VisibleOnPageLoad = true;
                            return;
                        }

                        // save the JNP
                        JNPackage thisPackage = new JNPackage();

                        thisPackage.JNPID = base.CurrentJNPID;
                        thisPackage.IsInterdisciplinary = this.checkboxIsInterdisciplinary.Checked;
                        thisPackage.AdditionalSeriesID  = ControlUtility.GetDropdownValue(this.dropdownAdditionalSeries);

                        thisPackage.FPPSPDID          = this.textBoxFPPSPDID.Text;
                        thisPackage.DutyLocation      = this.textboxDutyLocation.Text;
                        thisPackage.IsDEU             = this.checkboxDEU.Checked;
                        thisPackage.IsMP              = this.checkboxMP.Checked;
                        thisPackage.IsExceptedService = this.checkboxException.Checked;
                        thisPackage.UpdatedByID       = base.CurrentUserID;

                        // Update JNP Package
                        thisPackage.Update();
                    }


                    ReloadCurrentJNP(CurrentJNPID);

                    base.GoToLink(navigateurl, eMode.Edit, false);
                }
                else
                {
                    base.GoToLink(navigateurl, eMode.View, true);
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
        private bool UpdateHiringResult()
        {
            bool isSuccessful = false;

            try
            {
                JNPackage thisPackage = new JNPackage(base.CurrentJNPID);

                thisPackage.ResultedInSuccessfulHiring = Convert.ToBoolean(dropWasSuccessfulHiring.SelectedValue);
                thisPackage.VacancyID = txtVacancyID.Text;

                thisPackage.Update();
                isSuccessful = true;
            }
            catch
            {
                isSuccessful = false;
            }

            return(isSuccessful);
        }