예제 #1
0
        private void _DeactivateBenefit()
        {
            using (DbContext dc = new DbContext())
            {
                if (_ViewModel.GetType() == typeof(HealthcareViewModel))
                {
                    dc.spRemoveMedicalPacketFromEmployee(((HealthcareViewModel)_ViewModel).SelectedMedicalPacket.ConfiguredMedicalPacketID,
                                                    this.EndDate,
                                                    this.SelectedTakeType.TakingReasonID,
                                                    this.TakingNote);
                    

                    RequestClose(this,EventArgs.Empty);
                }   
                else if (_ViewModel.GetType() == typeof(MultiSportViewModel))
                    dc.spTakeConfiguredMultiSportCard(((MultiSportViewModel)_ViewModel).SelectedMultiSportOwner.ConfiguredBenefitPacketID);

            }
        }