public static string Translate(PassportAppointment appointment)
        {
            switch (appointment)
            {
            case PassportAppointment.PrivatePerson:
                return(Resources.PrivatePerson);

            case PassportAppointment.Director:
                return(Resources.Director);

            case PassportAppointment.Accountant:
                return(Resources.Accountant);

            case PassportAppointment.Representative:
                return(Resources.Representative);

            case PassportAppointment.PrivateEntrepreneur:
                return(Resources.PrivateEntrepreneur);

            default:
                return(appointment.ToString());
            }
        }
Example #2
0
        public static CertificateAppointment ApiTypeToContractType(PassportAppointment apiType)
        {
            switch (apiType)
            {
            case PassportAppointment.PrivatePerson:
                return(CertificateAppointment.PrivatePerson);

            case PassportAppointment.Director:
                return(CertificateAppointment.Director);

            case PassportAppointment.Accountant:
                return(CertificateAppointment.Accountant);

            case PassportAppointment.Representative:
                return(CertificateAppointment.Representative);

            case PassportAppointment.PrivateEntrepreneur:
                return(CertificateAppointment.PrivateEntrepreneur);

            default:
                throw new ArgumentOutOfRangeException(nameof(apiType), apiType, null);
            }
        }