Exemple #1
0
        private void CalculateLicenseTypeValues(string issueDate)
        {
            DateTime    time2;
            LicenseType type1 = new LicenseType(this.licenseType.Text);

            type1.LoadLicenseType();
            this.txtLicFee.Text = type1.Fee.ToString().Remove(type1.Fee.ToString().Length - 2, 2);
            if (type1.ExpDate == string.Empty)
            {
                if (type1.Days == 0)
                {
                    time2 = Convert.ToDateTime(issueDate);
                    this.txtExpDate.Text   = Convert.ToString(time2.AddMonths(type1.Months).ToShortDateString());
                    this.txtIssueDate.Text = issueDate;
                }
                else
                {
                    time2 = Convert.ToDateTime(issueDate);
                    this.txtExpDate.Text   = time2.AddDays((double)type1.Days).ToShortDateString();
                    this.txtIssueDate.Text = issueDate;
                }
            }
            else
            {
                string text1 = type1.ExpDate.Substring(2, 2);
                string text2 = type1.ExpDate.Substring(0, 2);
                time2 = Convert.ToDateTime(issueDate);
                int      num2      = time2.Year;
                object[] objArray1 = new object[5];
                objArray1[0] = text2;
                objArray1[1] = "/";
                objArray1[2] = text1;
                objArray1[3] = "/";
                time2        = Convert.ToDateTime(issueDate);
                objArray1[4] = time2.Year;
                DateTime time1 = DateTime.Parse(string.Concat(objArray1));
                if (time1 < Convert.ToDateTime(issueDate))
                {
                    time1 = time1.AddYears(1);
                }
                this.txtExpDate.Text = time1.ToShortDateString();
                this.license.ExpDate = time1;
            }
        }
Exemple #2
0
 private void Page_Load(object sender, EventArgs e)
 {
     this.btnPrint.Attributes.Add("onclick", "javascript: window.open('PrintLicense.aspx');");
     if (!base.IsPostBack)
     {
         New_License license1 = (New_License)this.Context.Handler;
         string      text1    = license1.IssueDate;
         string      text2    = license1.LicenseTypeCode;
         if (license1.Status == "PENDING")
         {
             this.btnInsertPending.Visible   = true;
             this.btnInsertPending.Enabled   = true;
             this.btnGenerateLicense.Enabled = false;
         }
         LicenseType type1 = new LicenseType(text2);
         if (type1.LoadLicenseType())
         {
             this.lblDyIssueDate.Text   = text1;
             this.txtDatePaid.Text      = DateTime.Now.ToShortDateString();
             this.txtAcctNum.Text       = type1.AccountNumber;
             this.txtLicFee.Text        = type1.Fee.ToString().Remove(type1.Fee.ToString().Length - 2, 2);
             this.lblTypeOfLicense.Text = this.lblTypeOfLicense.Text + " " + type1.TypeCode + "-" + type1.TypeName;
             this.Label1.Text           = type1.TypeCode;
             this.rbtnFor.Checked       = true;
             this.rbtnManager.Checked   = true;
             if (text1 != "Pending")
             {
                 DateTime time2;
                 if (type1.ExpDate == string.Empty)
                 {
                     if (type1.Days == 0)
                     {
                         time2 = Convert.ToDateTime(text1);
                         this.txtExpDate.Text = Convert.ToString(time2.AddMonths(type1.Months).ToShortDateString());
                     }
                     else
                     {
                         time2 = Convert.ToDateTime(text1);
                         this.txtExpDate.Text = time2.AddDays((double)type1.Days).ToShortDateString();
                     }
                 }
                 else
                 {
                     string   text4     = type1.ExpDate.Substring(2, 2);
                     string   text5     = type1.ExpDate.Substring(0, 2);
                     int      num2      = DateTime.Now.Year;
                     object[] objArray1 = new object[5];
                     objArray1[0] = text5;
                     objArray1[1] = "/";
                     objArray1[2] = text4;
                     objArray1[3] = "/";
                     time2        = Convert.ToDateTime(text1);
                     objArray1[4] = time2.Year;
                     DateTime time1 = DateTime.Parse(string.Concat(objArray1));
                     if (time1 < Convert.ToDateTime(text1))
                     {
                         time1 = time1.AddYears(1);
                     }
                     this.txtExpDate.Text = time1.ToShortDateString();
                 }
                 this.license.ExpDate = Convert.ToDateTime(this.txtExpDate.Text);
             }
             else
             {
                 this.txtExpDate.Text = "Pending";
             }
             if (type1.ANameReq == 1)
             {
                 this.lblAppName.ForeColor = Color.Red;
                 this.validAppName.Enabled = true;
             }
             else if (type1.ANameInc == 0)
             {
                 this.lblAppName.Text      = "Applicants Name not included";
                 this.license.AName        = string.Empty;
                 this.lblAppName.ForeColor = Color.LightGray;
                 this.txtAppName.Visible   = false;
             }
             if (type1.LNameReq == 1)
             {
                 this.lblLicName.ForeColor = Color.Red;
                 this.validLicName.Enabled = true;
             }
             else if (type1.LNameInc == 0)
             {
                 this.txtLicName.Visible   = false;
                 this.lblLicName.Text      = "License Name not included";
                 this.lblLicName.ForeColor = Color.LightGray;
                 this.license.LName        = string.Empty;
             }
             if (type1.MAddressReq == 1)
             {
                 this.lblMailAddress.ForeColor = Color.Red;
                 this.validMailAddress.Enabled = true;
             }
             else if (type1.MAddressInc == 0)
             {
                 this.lblMailAddress.ForeColor = Color.LightGray;
                 this.lblMailAddress.Text      = "Mail Address not included";
                 this.txtMailAddress.Visible   = false;
                 this.license.MAddr            = string.Empty;
             }
             if (type1.MCityStZipReq == 1)
             {
                 this.lblMailCst.ForeColor   = Color.Red;
                 this.validMailCity.Enabled  = true;
                 this.lblMailZip.ForeColor   = Color.Red;
                 this.validMailState.Enabled = true;
                 this.validMailZip.Enabled   = true;
             }
             else if (type1.MCityStZipInc == 0)
             {
                 this.txtMailCity.Visible  = false;
                 this.txtMailSt.Visible    = false;
                 this.txtMailZip.Visible   = false;
                 this.lblMailCst.Text      = "Mail City/St not included";
                 this.lblMailCst.ForeColor = Color.LightGray;
                 this.lblMailZip.ForeColor = Color.LightGray;
                 this.lblMailZip.Text      = "Mail Zip not included";
             }
             if (type1.ONameReq == 1)
             {
                 this.lblOwName.ForeColor = Color.Red;
                 this.validOwName.Enabled = true;
             }
             else if (type1.ONameInc == 0)
             {
                 this.txtOwName.Visible   = false;
                 this.lblOwName.ForeColor = Color.LightGray;
                 this.lblOwName.Text      = "Owner Name not included";
             }
             if (type1.OAddressReq == 1)
             {
                 this.lblOwAddress.ForeColor = Color.Red;
                 this.validOwAddress.Enabled = true;
             }
             else if (type1.OAddressInc == 0)
             {
                 this.txtOwAddress.Visible   = false;
                 this.lblOwAddress.ForeColor = Color.LightGray;
                 this.lblOwAddress.Text      = "Owner Address not included";
             }
             if (type1.OCityStZipReq == 1)
             {
                 this.lblOwCST.ForeColor  = Color.Red;
                 this.validOwCity.Enabled = true;
                 this.validOwSt.Enabled   = true;
                 this.validOwZip.Enabled  = true;
                 this.lblOwZip.ForeColor  = Color.Red;
             }
             else if (type1.OCityStZipInc == 0)
             {
                 this.txtOwCity.Visible  = false;
                 this.txtOwSt.Visible    = false;
                 this.txtOwZip.Visible   = false;
                 this.lblOwCST.Text      = "Owner City/St not included";
                 this.lblOwZip.Text      = "Owner Zip included";
                 this.lblOwCST.ForeColor = Color.LightGray;
                 this.lblOwZip.ForeColor = Color.LightGray;
             }
             if (type1.OwPhoneReq == 1)
             {
                 this.lblOwPhone.ForeColor = Color.Red;
                 this.validOwPhone.Enabled = true;
             }
             else if (type1.OwPhoneInc == 0)
             {
                 this.txtOwPhone.Visible   = false;
                 this.lblOwPhone.Text      = "Owner Phone not included";
                 this.lblOwPhone.ForeColor = Color.LightGray;
             }
             if (type1.ZoningReq == 1)
             {
                 this.lblZoning.ForeColor = Color.Red;
                 this.validZoning.Enabled = true;
             }
             else if (type1.ZoningInc == 0)
             {
                 this.lblZoning.ForeColor = Color.LightGray;
                 this.lblZoning.Text      = "Zoning not included";
                 this.txtZoning.Visible   = false;
             }
             if (type1.BondReq == 1)
             {
                 this.lblBondAmt.ForeColor  = Color.Red;
                 this.validBondAmt.Enabled  = true;
                 this.validBondDate.Enabled = true;
                 this.lblBondDate.ForeColor = Color.Red;
             }
             else if (type1.BondInc == 0)
             {
                 this.txtBondAmt.Visible    = false;
                 this.lblBondAmt.Text       = "Bond not included";
                 this.lblBondAmt.ForeColor  = Color.LightGray;
                 this.txtBondDate.Visible   = false;
                 this.lblBondDate.Text      = "Bond Date not included";
                 this.lblBondDate.ForeColor = Color.LightGray;
             }
             if (type1.BNameReq == 1)
             {
                 this.lblBusName.ForeColor = Color.Red;
                 this.validBusName.Enabled = true;
             }
             else if (type1.BNameInc == 0)
             {
                 this.txtBusName.Visible   = false;
                 this.lblBusName.ForeColor = Color.LightGray;
                 this.lblBusName.Text      = "Busness Name not included";
             }
             if (type1.BAddressReq == 1)
             {
                 this.lblBusAddress.ForeColor = Color.Red;
                 this.validBusAddress.Enabled = true;
             }
             else if (type1.BAddressInc == 0)
             {
                 this.txtBusAdd.Visible       = false;
                 this.lblBusAddress.ForeColor = Color.LightGray;
                 this.lblBusAddress.Text      = "Busness Name not included";
             }
             if (type1.BCityStZipReq == 1)
             {
                 this.lblBusCst.ForeColor  = Color.Red;
                 this.validBusCity.Enabled = true;
                 this.validBusSt.Enabled   = true;
                 this.validBusZip.Enabled  = true;
                 this.lblBusZip.ForeColor  = Color.Red;
             }
             else if (type1.BCityStZipInc == 0)
             {
                 this.txtBusCity.Visible  = false;
                 this.txtBusSt.Visible    = false;
                 this.txtBusZip.Visible   = false;
                 this.lblBusCst.Text      = "Busness City/St not included";
                 this.lblBusCst.ForeColor = Color.LightGray;
                 this.lblBusZip.Text      = "Busness zip not included";
                 this.lblBusZip.ForeColor = Color.LightGray;
             }
             if (type1.BPhoneReq == 1)
             {
                 this.lblBusPhone.ForeColor = Color.Red;
                 this.validBusPhone.Enabled = true;
             }
             else if (type1.BPhoneInc == 0)
             {
                 this.lblBusPhone.Text      = "Busness Phone not included";
                 this.lblBusPhone.ForeColor = Color.LightGray;
                 this.txtBusPhone.Visible   = false;
             }
             if (type1.LiqLicReq == 1)
             {
                 this.lblLiqLic.ForeColor = Color.Red;
                 this.validLiqLic.Enabled = true;
             }
             else if (type1.LiqLicInc == 0)
             {
                 this.lblLiqLic.ForeColor = Color.LightGray;
                 this.lblLiqLic.Text      = "St. Liq Lic not included";
                 this.txtLiqLic.Visible   = false;
             }
             if (type1.SalesTaxReq == 1)
             {
                 this.lblSalesTax.ForeColor = Color.Red;
                 this.validSalesTax.Enabled = true;
             }
             else if (type1.SalesTaxInc == 0)
             {
                 this.lblSalesTax.ForeColor = Color.LightGray;
                 this.lblSalesTax.Text      = "Sales Tax not included";
                 this.txtSalesTax.Visible   = false;
             }
             if (type1.LegalIdReq == 1)
             {
                 this.lblLegalId.ForeColor = Color.Red;
                 this.validLeqalId.Enabled = true;
             }
             else if (type1.LegalIdInc == 0)
             {
                 this.lblLegalId.ForeColor = Color.LightGray;
                 this.lblLegalId.Text      = "Legal Id not included";
                 this.txtLegalId.Visible   = false;
             }
             if (type1.VinReq == 1)
             {
                 this.lblVin.ForeColor = Color.Red;
                 this.validVin.Enabled = true;
             }
             else if (type1.VinInc == 0)
             {
                 this.lblVin.ForeColor = Color.LightGray;
                 this.lblVin.Text      = "Vin not included";
                 this.txtVin.Visible   = false;
             }
             if (type1.InsuranceReq == 1)
             {
                 this.lblInsuDate.ForeColor = Color.Red;
                 this.validInsuDate.Enabled = true;
             }
             else if (type1.InsuranceInc == 0)
             {
                 this.lblInsuDate.ForeColor = Color.LightGray;
                 this.lblInsuDate.Text      = "Ins Date not included";
                 this.txtInsuDate.Visible   = false;
             }
         }
     }
 }
Exemple #3
0
        private void CheckRequiredFields(bool editTextBox)
        {
            this.lblIssueDate.ForeColor = Color.Red;
            this.lblExpDate.ForeColor   = Color.Red;
            this.rbtnDba.Enabled        = editTextBox;
            this.rbtnFor.Enabled        = editTextBox;
            this.rbtnManager.Enabled    = editTextBox;
            this.rbtnOwner.Enabled      = editTextBox;
            this.txtCheckNo.Enabled     = editTextBox;
            this.txtAcctNum.Enabled     = editTextBox;
            this.txtCheckNo.Enabled     = editTextBox;
            this.txtDatePaid.Enabled    = editTextBox;
            this.txtExpDate.Enabled     = editTextBox;
            this.txtNotes.Enabled       = editTextBox;
            this.txtLicFee.Enabled      = editTextBox;
            this.drplstPayType.Enabled  = editTextBox;
            this.licenseType.Text       = Convert.ToString(this.Session["licenseType"]);
            LicenseType type1 = new LicenseType(this.licenseType.Text);

            type1.LoadLicenseType();
            if (type1.ANameReq == 1)
            {
                this.lblAppName.ForeColor = Color.Red;
                this.validAppName.Enabled = true;
                this.txtAppName.Enabled   = editTextBox;
            }
            else if (type1.ANameInc == 0)
            {
                this.lblAppName.Text      = "Applicants Name not included";
                this.lblAppName.ForeColor = Color.LightGray;
                this.txtAppName.Visible   = false;
            }
            else
            {
                this.txtAppName.Enabled = editTextBox;
            }
            if (type1.LNameReq == 1)
            {
                this.lblLicName.ForeColor = Color.Red;
                this.validLicName.Enabled = true;
                this.txtLicName.Enabled   = editTextBox;
            }
            else if (type1.LNameInc == 0)
            {
                this.txtLicName.Visible   = false;
                this.lblLicName.Text      = "License Name not included";
                this.lblLicName.ForeColor = Color.LightGray;
            }
            else
            {
                this.txtLicName.Enabled = editTextBox;
            }
            if (type1.MAddressReq == 1)
            {
                this.lblMailAddress.ForeColor = Color.Red;
                this.validMailAddress.Enabled = true;
                this.txtMailAddress.Enabled   = editTextBox;
            }
            else if (type1.MAddressInc == 0)
            {
                this.lblMailAddress.ForeColor = Color.LightGray;
                this.lblMailAddress.Text      = "Mail Address not included";
                this.txtMailAddress.Visible   = false;
            }
            else
            {
                this.txtMailAddress.Enabled = editTextBox;
            }
            if (type1.MCityStZipReq == 1)
            {
                this.lblMailCst.ForeColor   = Color.Red;
                this.validMailCity.Enabled  = true;
                this.lblMailZip.ForeColor   = Color.Red;
                this.validMailState.Enabled = true;
                this.validMailZip.Enabled   = true;
                this.txtMailCity.Enabled    = editTextBox;
                this.txtMailSt.Enabled      = editTextBox;
                this.txtMailZip.Enabled     = editTextBox;
            }
            else if (type1.MCityStZipInc == 0)
            {
                this.txtMailCity.Visible  = false;
                this.txtMailSt.Visible    = false;
                this.txtMailZip.Visible   = false;
                this.lblMailCst.Text      = "Mail City/St not included";
                this.lblMailCst.ForeColor = Color.LightGray;
                this.lblMailZip.ForeColor = Color.LightGray;
                this.lblMailZip.Text      = "Mail Zip not included";
            }
            else
            {
                this.txtMailCity.Enabled = editTextBox;
                this.txtMailSt.Enabled   = editTextBox;
                this.txtMailZip.Enabled  = editTextBox;
            }
            if (type1.ONameReq == 1)
            {
                this.lblOwName.ForeColor = Color.Red;
                this.validOwName.Enabled = true;
                this.txtOwName.Enabled   = editTextBox;
            }
            else if (type1.ONameInc == 0)
            {
                this.txtOwName.Visible   = false;
                this.lblOwName.ForeColor = Color.LightGray;
                this.lblOwName.Text      = "Owner Name not included";
            }
            else
            {
                this.txtOwName.Enabled = editTextBox;
            }
            if (type1.OAddressReq == 1)
            {
                this.lblOwAddress.ForeColor = Color.Red;
                this.validOwAddress.Enabled = true;
                this.txtOwAddress.Enabled   = editTextBox;
            }
            else if (type1.OAddressInc == 0)
            {
                this.txtOwAddress.Visible   = false;
                this.lblOwAddress.ForeColor = Color.LightGray;
                this.lblOwAddress.Text      = "Owner Address not included";
            }
            else
            {
                this.txtOwAddress.Enabled = editTextBox;
            }
            if (type1.OCityStZipReq == 1)
            {
                this.lblOwCST.ForeColor  = Color.Red;
                this.validOwCity.Enabled = true;
                this.validOwSt.Enabled   = true;
                this.validOwZip.Enabled  = true;
                this.lblOwZip.ForeColor  = Color.Red;
                this.txtOwCity.Enabled   = editTextBox;
                this.txtOwSt.Enabled     = editTextBox;
                this.txtOwZip.Enabled    = editTextBox;
            }
            else if (type1.OCityStZipInc == 0)
            {
                this.txtOwCity.Visible  = false;
                this.txtOwSt.Visible    = false;
                this.txtOwZip.Visible   = false;
                this.lblOwCST.Text      = "Owner City/St not included";
                this.lblOwZip.Text      = "Owner Zip included";
                this.lblOwCST.ForeColor = Color.LightGray;
                this.lblOwZip.ForeColor = Color.LightGray;
            }
            else
            {
                this.txtOwCity.Enabled = editTextBox;
                this.txtOwSt.Enabled   = editTextBox;
                this.txtOwZip.Enabled  = editTextBox;
            }
            if (type1.OwPhoneReq == 1)
            {
                this.lblOwPhone.ForeColor = Color.Red;
                this.validOwPhone.Enabled = true;
                this.txtOwPhone.Enabled   = editTextBox;
            }
            else if (type1.OwPhoneInc == 0)
            {
                this.txtOwPhone.Visible   = false;
                this.lblOwPhone.Text      = "Owner Phone not included";
                this.lblOwPhone.ForeColor = Color.LightGray;
            }
            else
            {
                this.txtOwPhone.Enabled = editTextBox;
            }
            if (type1.ZoningReq == 1)
            {
                this.lblZoning.ForeColor = Color.Red;
                this.validZoning.Enabled = true;
                this.txtZoning.Enabled   = editTextBox;
            }
            else if (type1.ZoningInc == 0)
            {
                this.lblZoning.ForeColor = Color.LightGray;
                this.lblZoning.Text      = "Zoning not included";
                this.txtZoning.Visible   = false;
            }
            else
            {
                this.txtZoning.Enabled = editTextBox;
            }
            if (type1.BondReq == 1)
            {
                this.lblBondAmt.ForeColor  = Color.Red;
                this.validBondAmt.Enabled  = true;
                this.validBondDate.Enabled = true;
                this.lblBondDate.ForeColor = Color.Red;
                this.txtBondAmt.Enabled    = editTextBox;
                this.txtBondDate.Enabled   = editTextBox;
            }
            else if (type1.BondInc == 0)
            {
                this.txtBondAmt.Visible    = false;
                this.lblBondAmt.Text       = "Bond not included";
                this.lblBondAmt.ForeColor  = Color.LightGray;
                this.txtBondDate.Visible   = false;
                this.lblBondDate.Text      = "Bond Date not included";
                this.lblBondDate.ForeColor = Color.LightGray;
            }
            else
            {
                this.txtBondAmt.Enabled  = editTextBox;
                this.txtBondDate.Enabled = editTextBox;
            }
            if (type1.BNameReq == 1)
            {
                this.lblBusName.ForeColor = Color.Red;
                this.validBusName.Enabled = true;
                this.txtBusName.Enabled   = editTextBox;
                if (this.txtBusName.Text == string.Empty)
                {
                    this.validBusName.Enabled = false;
                }
            }
            else if (type1.BNameInc == 0)
            {
                this.txtBusName.Visible   = false;
                this.lblBusName.ForeColor = Color.LightGray;
                this.lblBusName.Text      = "Busness Name not included";
            }
            else
            {
                this.txtBusName.Enabled = editTextBox;
            }
            if (type1.BAddressReq == 1)
            {
                this.lblBusAddress.ForeColor = Color.Red;
                this.validBusAddress.Enabled = true;
                this.txtBusAdd.Enabled       = editTextBox;
            }
            else if (type1.BAddressInc == 0)
            {
                this.txtBusAdd.Visible       = false;
                this.lblBusAddress.ForeColor = Color.LightGray;
                this.lblBusAddress.Text      = "Busness Name not included";
            }
            else
            {
                this.txtBusAdd.Enabled = editTextBox;
            }
            if (type1.BCityStZipReq == 1)
            {
                this.lblBusCst.ForeColor  = Color.Red;
                this.validBusCity.Enabled = true;
                this.validBusSt.Enabled   = true;
                this.validBusZip.Enabled  = true;
                this.lblBusZip.ForeColor  = Color.Red;
                this.txtBusCity.Enabled   = editTextBox;
                this.txtBusSt.Enabled     = editTextBox;
                this.txtBusZip.Enabled    = editTextBox;
            }
            else if (type1.BCityStZipInc == 0)
            {
                this.txtBusCity.Visible  = false;
                this.txtBusSt.Visible    = false;
                this.txtBusZip.Visible   = false;
                this.lblBusCst.Text      = "Busness City/St not included";
                this.lblBusCst.ForeColor = Color.LightGray;
                this.lblBusZip.Text      = "Busness zip not included";
                this.lblBusZip.ForeColor = Color.LightGray;
            }
            else
            {
                this.txtBusCity.Enabled = editTextBox;
                this.txtBusSt.Enabled   = editTextBox;
                this.txtBusZip.Enabled  = editTextBox;
            }
            if (type1.BPhoneReq == 1)
            {
                this.lblBusPhone.ForeColor = Color.Red;
                this.validBusPhone.Enabled = true;
                this.txtBusPhone.Enabled   = editTextBox;
            }
            else if (type1.BPhoneInc == 0)
            {
                this.lblBusPhone.Text      = "Busness Phone not included";
                this.lblBusPhone.ForeColor = Color.LightGray;
                this.txtBusPhone.Visible   = false;
            }
            else
            {
                this.txtBusPhone.Enabled = editTextBox;
            }
            if (type1.LiqLicReq == 1)
            {
                this.lblLiqLic.ForeColor = Color.Red;
                this.validLiqLic.Enabled = true;
                this.txtLiqLic.Enabled   = editTextBox;
            }
            else if (type1.LiqLicInc == 0)
            {
                this.lblLiqLic.ForeColor = Color.LightGray;
                this.lblLiqLic.Text      = "St. Liq Lic not included";
                this.txtLiqLic.Visible   = false;
            }
            else
            {
                this.txtLiqLic.Enabled = editTextBox;
            }
            if (type1.SalesTaxReq == 1)
            {
                this.lblSalesTax.ForeColor = Color.Red;
                this.validSalesTax.Enabled = true;
                this.txtSalesTax.Enabled   = editTextBox;
            }
            else if (type1.SalesTaxInc == 0)
            {
                this.lblSalesTax.ForeColor = Color.LightGray;
                this.lblSalesTax.Text      = "Sales Tax not included";
                this.txtSalesTax.Visible   = false;
            }
            else
            {
                this.txtSalesTax.Enabled = editTextBox;
            }
            if (type1.LegalIdReq == 1)
            {
                this.lblLegalId.ForeColor = Color.Red;
                this.validLeqalId.Enabled = true;
                this.txtLegalId.Enabled   = editTextBox;
            }
            else if (type1.LegalIdInc == 0)
            {
                this.lblLegalId.ForeColor = Color.LightGray;
                this.lblLegalId.Text      = "Legal Id not included";
                this.txtLegalId.Visible   = false;
            }
            else
            {
                this.txtLegalId.Enabled = editTextBox;
            }
            if (type1.VinReq == 1)
            {
                this.lblVin.ForeColor = Color.Red;
                this.validVin.Enabled = true;
                this.txtVin.Enabled   = editTextBox;
            }
            else if (type1.VinInc == 0)
            {
                this.lblVin.ForeColor = Color.LightGray;
                this.lblVin.Text      = "Vin not included";
                this.txtVin.Visible   = false;
            }
            else
            {
                this.txtVin.Enabled = editTextBox;
            }
            if (type1.InsuranceReq == 1)
            {
                this.lblInsuDate.ForeColor = Color.Red;
                this.validInsuDate.Enabled = true;
                this.txtInsuDate.Enabled   = editTextBox;
            }
            else if (type1.InsuranceInc == 0)
            {
                this.lblInsuDate.ForeColor = Color.LightGray;
                this.lblInsuDate.Text      = "Ins Date not included";
                this.txtInsuDate.Visible   = false;
            }
            if (type1.EmailReq == 1)
            {
                this.lblEmail.ForeColor      = Color.Red;
                this.txtEmailAddress.Enabled = editTextBox;
            }
            else if (type1.EmailInc == 0)
            {
                this.lblEmail.ForeColor      = Color.LightGray;
                this.lblEmail.Text           = "E-mail not included";
                this.txtEmailAddress.Visible = false;
            }
            else
            {
                this.txtEmailAddress.Enabled = editTextBox;
            }
        }