示例#1
0
 public AddSubfileDialog(MainForm parent, AAMVAJurisdiction jurisdiction)
 {
     InitializeComponent();
     _jurisdiction = jurisdiction;
     _parent       = parent;
     InitControls();
 }
示例#2
0
 private void _comboBoxJurisdiction_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (_checkBoxIINAuto.Checked)
     {
         AAMVAJurisdiction jurisdiction = (AAMVAJurisdiction)_comboBoxJurisdiction.SelectedValue;
         string            iin          = AAMVAID.LookupIssuerIdentificationNumber(jurisdiction);
         _textBoxIIN.Text = iin != null ? iin : "000000";
     }
 }
示例#3
0
 public EditJurisdictionSpecificSubfileDialog(MainForm parent, AAMVAJurisdiction jurisdiction, MainForm.SubfileSkeleton subfileSkeleton, int subfileIndex, EditSubfileDialog.EditMode mode)
 {
     InitializeComponent();
     this.Text          = "Edit Subfile - Jurisdiction Specific";
     _currentChar       = ASCII_A;
     _parent            = parent;
     _jurisdiction      = jurisdiction;
     _subfileSkeleton   = subfileSkeleton;
     _subfileIndex      = subfileIndex;
     _closeAction       = EditSubfileDialog.CloseAction.Cancel;
     _mode              = mode;
     _btnSubmit.Enabled = false;
     if (subfileSkeleton.DataElements.Keys.Count > 0)
     {
         RepopulateDataElements();
     }
 }
示例#4
0
 public EditSubfileDialog(MainForm parent, AAMVAJurisdiction jurisdiction, MainForm.SubfileSkeleton subfileSkeleton, int subfileIndex, EditMode mode)
 {
     InitializeComponent();
     this.Text        = "Edit Subfile - " + subfileSkeleton.SubfileType.ToString();
     _subfileSkeleton = subfileSkeleton;
     _mode            = mode;
     _parent          = parent;
     _subfileIndex    = subfileIndex;
     _jurisdiction    = jurisdiction;
     _closeAction     = CloseAction.Cancel;
     AddDataElementRows(MandatoryDataElements, 0);
     AddDataElementRows(OptionalDataElements, 1);
     if (subfileSkeleton.DataElements.Keys.Count > 0)
     {
         RepopulateDataElements();
     }
 }
示例#5
0
        private void _checkBoxIINAuto_CheckedChanged(object sender, EventArgs e)
        {
            if (_checkBoxIINAuto.Checked)
            {
                _textBoxIIN.ReadOnly  = true;
                _textBoxIIN.BackColor = SystemColors.Control;

                AAMVAJurisdiction jurisdiction = (AAMVAJurisdiction)_comboBoxJurisdiction.SelectedValue;
                string            iin          = AAMVAID.LookupIssuerIdentificationNumber(jurisdiction);
                _textBoxIIN.Text = iin != null ? iin : "000000";
            }
            else
            {
                _textBoxIIN.ReadOnly  = false;
                _textBoxIIN.BackColor = Color.White;
            }
        }
示例#6
0
        public static string JurisdictionToFriendlyString(AAMVAJurisdiction jurisdiction, bool includeAbbreviationAndCountry)
        {
            //Add spaces
            string        enumStrVal  = jurisdiction.ToString();
            string        spaceString = InsertSpacesToPascalCaseString(enumStrVal);
            StringBuilder sb          = new StringBuilder(spaceString);

            if (includeAbbreviationAndCountry)
            {
                string      abbr = AAMVAID.LookupStateAbbreviation(jurisdiction);
                AAMVARegion rgn  = AAMVAID.LookupRegion(jurisdiction);
                if (abbr != null || rgn != AAMVARegion.Unknown)
                {
                    sb.Append(" (");
                    if (abbr != null)
                    {
                        sb.Append(abbr).Append(", ");
                    }


                    switch (rgn)
                    {
                    case AAMVARegion.UnitedStates:
                        sb.Append("USA)");
                        break;

                    case AAMVARegion.Canada:
                        sb.Append("CAN)");
                        break;

                    case AAMVARegion.Mexico:
                        sb.Append("MEX)");
                        break;

                    case AAMVARegion.Unknown:
                        break;
                    }
                }
            }

            return(sb.ToString());
        }
示例#7
0
 public JurisdictionDatum(string name, AAMVAJurisdiction jurisdiction)
 {
     this.Name  = name;
     this.Value = jurisdiction;
 }