Esempio n. 1
0
        //private void cbDiffBilling_CheckedChanged(object sender, EventArgs e)
        //{
        //    if (cbDiffBilling.Checked)
        //    {
        //        grbBilling.Enabled = true;

        //        txtStreetAddress.Text ="";

        //        txtCity.Text ="";

        //        txtZipcode.Text ="";

        //        cbState.Enabled = true;

        //    }
        //    else
        //    {


        //        txtStreetAddress.Text = GlobalVar.CurrentDealer.StreetAddress;

        //        txtCity.Text = GlobalVar.CurrentDealer.City;

        //        txtZipcode.Text = GlobalVar.CurrentDealer.ZipCode;

        //        int zipcode = 0;
        //        Int32.TryParse(GlobalVar.CurrentDealer.ZipCode, out zipcode);

        //        ZipCodeCity findResult = ZipCodeHelper.LookUpZipCode(zipcode);

        //        if (!String.IsNullOrEmpty(findResult.City))
        //        {
        //            txtCity.Text = findResult.City;

        //            cbState.SelectedIndex = _allStatesList.ToList().FindIndex(x => x.State == findResult.State);

        //        }

        //        grbBilling.Enabled = false;
        //    }
        //}

        private void CreditCardAuthorizeForm_Load(object sender, EventArgs e)
        {
            cbExpireMonths.DataSource = QuickBookHelper.GetExpirationMonths();

            cbExpireYear.DataSource = QuickBookHelper.GetExpirationYears();

            cbPackages.DataSource = QuickBookHelper.GetAllPackages();

            _allStatesList = ZipCodeHelper.GetAllStates();

            cbState.DataSource = _allStatesList;

            txtNameOnCard.Text = GlobalVar.CurrentAccount.FirstName + " " + GlobalVar.CurrentAccount.LastName;

            txtStreetAddress.Text = GlobalVar.CurrentDealer.StreetAddress;

            txtCity.Text = GlobalVar.CurrentDealer.City;

            txtZipcode.Text = GlobalVar.CurrentDealer.ZipCode;

            int zipcode = 0;

            Int32.TryParse(GlobalVar.CurrentDealer.ZipCode, out zipcode);

            ZipCodeCity findResult = ZipCodeHelper.LookUpZipCode(zipcode);

            if (!String.IsNullOrEmpty(findResult.City))
            {
                txtCity.Text = findResult.City;

                cbState.SelectedIndex = _allStatesList.ToList().FindIndex(x => x.State == findResult.State);
            }
        }
Esempio n. 2
0
        private void CraigslistCreditCardForm_Load(object sender, EventArgs e)
        {
            cbExpireMonths.DataSource = QuickBookHelper.GetExpirationMonths();

            cbExpireYear.DataSource = QuickBookHelper.GetExpirationYears();

            _allStatesList = ZipCodeHelper.GetAllStates();

            cbState.DataSource = _allStatesList;



            this.txtCardNumber.Text = Properties.Settings.Default.cardnumber;

            this.txtSecurityCode.Text = Properties.Settings.Default.securitycode;

            this.txtFirstName.Text = Properties.Settings.Default.cardfirstname;

            this.txtLastName.Text = Properties.Settings.Default.cardlastname;

            this.txtStreetAddress.Text = Properties.Settings.Default.cardaddress;

            this.txtCity.Text = Properties.Settings.Default.cardcity;

            this.txtZipcode.Text = Properties.Settings.Default.cardzipcode;

            this.txtContactName.Text = Properties.Settings.Default.cardcontactname;

            this.txtPhoneNumber.Text = Properties.Settings.Default.cardcontactphone;

            this.txtContactEmailAddress.Text = Properties.Settings.Default.cardcontactemail;

            cbState.SelectedIndex = _allStatesList.ToList().FindIndex(x => x.StateAbbr == Properties.Settings.Default.cardstate);

            foreach (ExpirationMonth cbi in cbExpireMonths.Items)
            {
                if (cbi.Month == Properties.Settings.Default.expirationmonth)
                {
                    cbExpireMonths.SelectedItem = cbi;
                    break;
                }
            }


            cbExpireYear.SelectedIndex = QuickBookHelper.GetExpirationYears().ToList().FindIndex(x => x == Properties.Settings.Default.expirationyear);
        }
Esempio n. 3
0
        private void txtZipcode_Leave_1(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(txtZipcode.Text))
            {
                int zipcode = 0;
                Int32.TryParse(txtZipcode.Text, out zipcode);

                ZipCodeCity findResult = ZipCodeHelper.LookUpZipCode(zipcode);

                if (!String.IsNullOrEmpty(findResult.City))
                {
                    txtCity.Text = findResult.City;

                    cbState.SelectedIndex = _allStatesList.ToList().FindIndex(x => x.State == findResult.State);

                    cbState.Enabled = false;
                }
            }
        }
Esempio n. 4
0
        private void CustomerForm_Load(object sender, EventArgs e)
        {
            _allStatesList = ZipCodeHelper.GetAllStates();

            cbState.DataSource = _allStatesList;

            cbFormat.DataSource = QuickBookHelper.GetLeadFormats();

            txtFirstName.Focus();

            if (GlobalVar.CurrentAccount != null)
            {
                txtFirstName.Text = GlobalVar.CurrentAccount.FirstName;

                txtLastName.Text = GlobalVar.CurrentAccount.LastName;

                txtCustomerEmail.Text = GlobalVar.CurrentAccount.AccountName;

                txtCustomerPhone.Text = GlobalVar.CurrentAccount.PersonalPhone;

                txtDealerName.Text = GlobalVar.CurrentDealer.DealershipName;

                txtWebSiteAddress.Text = GlobalVar.CurrentDealer.WebSiteUrl;

                txtStreetAddress.Text = GlobalVar.CurrentDealer.StreetAddress;

                txtZipcode.Text = GlobalVar.CurrentDealer.ZipCode;

                txtCity.Text = GlobalVar.CurrentDealer.City;

                cbState.SelectedIndex = _allStatesList.ToList().FindIndex(x => x.StateAbbr == GlobalVar.CurrentDealer.State);

                txtDealerPhone.Text = GlobalVar.CurrentDealer.PhoneNumber;

                txtLeadEmail.Text = GlobalVar.CurrentDealer.LeadEmail;

                cbFormat.SelectedIndex = QuickBookHelper.GetLeadFormats().ToList().FindIndex(x => x.LeadId == GlobalVar.CurrentDealer.EmailFormat);

                numericLimit.Value = GlobalVar.CurrentAccount.DailyLimit;
            }
        }