private void ManageInventoryMenuPanel_VisibleChanged(object sender, EventArgs e)
        {
            if (!DesignMode && this.Visible)
            {
                /*  UserVO currUser = CashlinxDesktopSession.Instance.LoggedInUserSecurityProfile;
                 *
                 * //Check if user has access to buttons on this panel
                 * SecurityProfileProcedures.ModifyButtonAccessBasedOnSecurityProfile(this.Controls, currUser,
                 *    ImageButtonControllerGroup.BUTTON_SUFFIX,
                 *    ImageButtonControllerGroup.BUTTON_TAGSEP,
                 *    ImageButtonControllerGroup.BUTTON_LEAF);
                 */
                string btnName;
                var    currUser = GlobalDataAccessor.Instance.DesktopSession.LoggedInUserSecurityProfile;

                //Check if user has access to Assign Item Physical Location
                if (AssignItemPhysicalLocationButton.Enabled)
                {
                    var idx = this.AssignItemPhysicalLocationButton.Name.IndexOf("Button", System.StringComparison.Ordinal);
                    btnName = AssignItemPhysicalLocationButton.Name.Substring(0, idx).ToUpper();
                    this.AssignItemPhysicalLocationButton.Enabled = SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession);
                }

                //Check if user has access to Change Retail Price Item
                if (ChangePricingButton.Enabled)
                {
                    //idx = this.ChangePricingButton.Name.IndexOf("Button");
                    //btnName = this.ChangePricingButton.Name.Substring(0, idx).ToUpper();
                    btnName = "CHANGERETAILPRICE";
                    this.ChangePricingButton.Enabled = SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession);
                }
            }
        }
        private void UtilitiesMenuPanel_VisibleChanged(object sender, EventArgs e)
        {
            if (this.Visible && !DesignMode)
            {
                int    idx;
                string btnName;
                var    dSession = GlobalDataAccessor.Instance.DesktopSession;
                var    currUser = dSession.LoggedInUserSecurityProfile;
                //Check if user has access to Customer Holds
                if (CustomerHoldsButton != null && CustomerHoldsButton.Enabled && !string.IsNullOrEmpty(CustomerHoldsButton.Name))
                {
                    idx     = this.CustomerHoldsButton.Name.IndexOf("Button", StringComparison.Ordinal);
                    btnName = CustomerHoldsButton.Name.Substring(0, idx).ToUpper();
                    this.CustomerHoldsButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, dSession));
                }

                //Check if user has access to Police activities
                if (Police_ActivitiesButton != null && Police_ActivitiesButton.Enabled && !string.IsNullOrEmpty(Police_ActivitiesButton.Name))
                {
                    idx     = this.Police_ActivitiesButton.Name.IndexOf("Button", StringComparison.Ordinal);
                    btnName = Police_ActivitiesButton.Name.Substring(0, idx).ToUpper();
                    this.Police_ActivitiesButton.Enabled = SecurityProfileProcedures.CanUserViewResource(btnName, currUser, dSession);
                }

                /* // removed per CQ - 14915
                 * //Check if user has access to VOID
                 * if (voidTransactionButton != null && voidTransactionButton.Enabled && !string.IsNullOrEmpty(voidTransactionButton.Name))
                 * {
                 *  idx = this.voidTransactionButton.Name.IndexOf("Button", StringComparison.Ordinal);
                 *  btnName = voidTransactionButton.Name.Substring(0, idx).ToUpper();
                 *  this.voidTransactionButton.Enabled = SecurityProfileProcedures.CanUserViewResource(btnName, currUser, dSession);
                 * }
                 */

                this.ManageInventoryButton.Enabled = true;
                this.ManageCashButton.Enabled      = true;

                //if (TransferButton.Enabled)
                //{
                //    this.TransferButton.Enabled = (CashlinxDesktop.Desktop.CashlinxDesktopSession.Instance.LoggedInUserSafeAccess);
                //}
                //Check if user has permissions to modify security profile
                btnName = "UPDATE USER PROFILE RESOURCES CURRENT LOCATION ONLY";
                const string multipleLocationResource = "UPDATE USER PROFILE RESOURCES MULTIPLE LOCATIONS";
                if (Update_Security_ProfileButton != null && Update_Security_ProfileButton.Enabled)
                {
                    this.Update_Security_ProfileButton.Enabled =
                        ((SecurityProfileProcedures.CanUserModifyResource(btnName, currUser, dSession)) ||
                         SecurityProfileProcedures.CanUserModifyResource(multipleLocationResource, currUser, dSession));
                }
            }
        }
Ejemplo n.º 3
0
 private void BuyMenuPanel_VisibleChanged(object sender, EventArgs e)
 {
     if (this.Visible && !DesignMode)
     {
         UserVO currUser = GlobalDataAccessor.Instance.DesktopSession.LoggedInUserSecurityProfile;
         //Check if user has permissions to do returns on customer purchase
         string btnName = "CUSTOMERBUY";
         this.CustomerBuyButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession));
         //Check if user has permissions to do vendor purchase
         btnName = "VENDORBUY";
         this.VendorBuyButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession));
     }
 }
Ejemplo n.º 4
0
        private void checkUserAccess()
        {
            //Check if user has access to PFI Create List
            var dSession = GlobalDataAccessor.Instance.DesktopSession;
            var currUser = dSession.LoggedInUserSecurityProfile;

            if (currUser != null)
            {
                int idx     = this.PFICreateListButton.Name.IndexOf("Button", System.StringComparison.Ordinal);
                var btnName = PFICreateListButton.Name.Substring(0, idx).ToUpper();
                if (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession))
                {
                    idx     = PFICreateListButton.Name.IndexOf("Button", StringComparison.Ordinal);
                    btnName = PFICreateListButton.Name.Substring(0, idx).ToUpper();
                    PFICreateListButton.Enabled = SecurityProfileProcedures.CanUserViewResource(btnName, currUser, dSession);
                }

                //Check if user has access to PFI Verify
                idx     = this.PFIVerifyButton.Name.IndexOf("Button", System.StringComparison.Ordinal);
                btnName = PFIVerifyButton.Name.Substring(0, idx).ToUpper();
                if (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession))
                {
                    idx     = PFIVerifyButton.Name.IndexOf("Button", StringComparison.Ordinal);
                    btnName = PFIVerifyButton.Name.Substring(0, idx).ToUpper();
                    PFIVerifyButton.Enabled = SecurityProfileProcedures.CanUserViewResource(btnName, currUser, dSession);
                }

                //Check if user has access to PFI Post
                idx     = this.PFIPostButton.Name.IndexOf("Button", System.StringComparison.Ordinal);
                btnName = PFIPostButton.Name.Substring(0, idx).ToUpper();
                if (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession))
                {
                    idx     = PFIPostButton.Name.IndexOf("Button", StringComparison.Ordinal);
                    btnName = PFIPostButton.Name.Substring(0, idx).ToUpper();
                    PFIPostButton.Enabled = SecurityProfileProcedures.CanUserViewResource(btnName, currUser, dSession);
                }

                var isPFIMailersRequiredForState = new BusinessRulesProcedures(GlobalDataAccessor.Instance.DesktopSession).IsPFIMailersRequiredForState(GlobalDataAccessor.Instance.CurrentSiteId);

                if (isPFIMailersRequiredForState)
                {
                    //Check if user has access to Print PFI Mailers
                    idx     = PrintPFIMailersButton.Name.IndexOf("Button", StringComparison.Ordinal);
                    btnName = PrintPFIMailersButton.Name.Substring(0, idx).ToUpper();
                    PrintPFIMailersButton.Enabled = true;
                }
            }
        }
 private void RefundReturnMenuPanel_VisibleChanged(object sender, EventArgs e)
 {
     if (this.Visible && !DesignMode)
     {
         //Check if user has permissions to do returns on customer purchase
         UserVO currUser = GlobalDataAccessor.Instance.DesktopSession.LoggedInUserSecurityProfile;
         string btnName  = "RETURNCUSTOMERBUY";
         this.ReturnCustomerBuyButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession));
         btnName = "RETURNVENDORBUY";
         ReturnVendorBuyButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession));
         btnName = "RETAILSALEREFUND";
         this.RefundSaleButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession));
         btnName = "LAYAWAYPAYMENTREFUND";
         this.RefundLayawayButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession));
     }
 }
Ejemplo n.º 6
0
        private void GunBookMenuPanel_VisibleChanged(object sender, EventArgs e)
        {
            if (!DesignMode && this.Visible)
            {
                var currUser = GlobalDataAccessor.Instance.DesktopSession.LoggedInUserSecurityProfile;

                //check if user has access to gun book utilities
                if (GunBookPrintButton.Enabled)
                {
                    const string btnName = "PRINT GUN BOOK IN CURRENT LOCATION";
                    this.GunBookPrintButton.Enabled = (SecurityProfileProcedures.CanUserViewResource(btnName, currUser, GlobalDataAccessor.Instance.DesktopSession));
                }
                //Check if user has access to buttons on this panel

/*                SecurityProfileProcedures.ModifyButtonAccessBasedOnSecurityProfile(this.Controls, currUser,
 *                  ImageButtonControllerGroup.BUTTON_SUFFIX,
 *                  ImageButtonControllerGroup.BUTTON_TAGSEP,
 *                  ImageButtonControllerGroup.BUTTON_LEAF);*/
            }
        }
Ejemplo n.º 7
0
 private void PawnMenuPanel_VisibleChanged(object sender, EventArgs e)
 {
     if (this.Visible && !DesignMode)
     {
         //Check if user has access to New Pawn Loan
         var dSession          = GlobalDataAccessor.Instance.DesktopSession;
         var currUser          = dSession.LoggedInUserSecurityProfile;
         var newPawnLoanButton = this.NewPawnLoanButton;
         if (newPawnLoanButton != null)
         {
             var idx     = newPawnLoanButton.Name.IndexOf("Button", System.StringComparison.Ordinal);
             var btnName = NewPawnLoanButton.Name.Substring(0, idx).ToUpper();
             if (!(SecurityProfileProcedures.CanUserViewResource(btnName, currUser, dSession)))
             {
                 newPawnLoanButton.Enabled = false;
             }
             else
             {
                 newPawnLoanButton.Enabled = true;
             }
         }
     }
 }
        public override void PerformAuthorization()
        {
            if (FileLogger.Instance.IsLogInfo)
            {
                FileLogger.Instance.logMessage(LogLevel.INFO, this, "Performing user authorization...");
            }
            LoggedInUserSecurityProfile = new UserVO();
            this.userState = UserDesktopState.NOTLOGGEDIN;
            //Ensure the LDAP is connected
            if (PawnLDAPAccessor.Instance.State ==
                PawnLDAPAccessor.LDAPState.DISCONNECTED)
            {
                string loginDN;
                string pwdPolicyCN;
                string searchDN;
                string userIdKey;
                string userPwd;

                var conf        = SecurityAccessor.Instance.EncryptConfig;
                var ldapService =
                    conf.GetLDAPService(
                        out loginDN,
                        out searchDN,
                        out userIdKey,
                        out userPwd,
                        out pwdPolicyCN);//,
                //out userName);
                if (FileLogger.Instance.IsLogDebug)
                {
                    FileLogger.Instance.logMessage(LogLevel.DEBUG, this, "- Connecting to LDAP server:{0}{1}",
                                                   System.Environment.NewLine, ldapService);
                }
                PawnLDAPAccessor.Instance.InitializeConnection(
                    conf.DecryptValue(ldapService.Server),
                    conf.DecryptValue(ldapService.Port),
                    loginDN,
                    userPwd,
                    pwdPolicyCN,
                    searchDN,
                    userIdKey);
            }
            var attemptCount = 1;

            do
            {
                bool lockedOut;
                bool needPasswordChange;
                bool wantsPasswordChange;
                var  fullAuth = this.PerformLDAPAuthentication(
                    ref attemptCount,
                    out lockedOut,
                    out needPasswordChange,
                    out wantsPasswordChange);
                if (FileLogger.Instance.IsLogInfo)
                {
                    FileLogger.Instance.logMessage(
                        LogLevel.INFO, this,
                        "Authorization attempt: Count = {0}, IsLockedOut = {1}, NeedsPwdChange = {2}, WantsPwdChange = {3}",
                        attemptCount,
                        lockedOut,
                        needPasswordChange,
                        wantsPasswordChange);
                }
                var    outVal = 0;
                string errCode, errTxt;
                if (!LoginCancel && fullAuth)
                {
                    var retVal = ShopProcedures.ExecuteUpdateSelectUserInfoActivated(
                        username.ToLowerInvariant(), -1, out outVal, out errCode, out errTxt);
                    if (retVal == false || outVal == 0 ||
                        errCode != "0")
                    {
                        MessageBox.Show(
                            "The system has determined that you are not an active user.  " +
                            "Please contact Shop System Support. " +
                            "The application will now exit.",
                            "Application Security",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Stop);
                        try
                        {
                            Application.Exit();
                        }
                        catch
                        {
                            throw new ApplicationException(
                                      "Application has exited due to security violation");
                        }
                        finally
                        {
                            throw new ApplicationException(
                                      "Application has exited due to security violation");
                        }
                    }
                }
                if (!LoginCancel &&
                    fullAuth == false)
                {
                    if (lockedOut)
                    {
                        /*ShopProcedures.ExecuteUpdateSelectUserInfoActivated(
                         *  username.ToLowerInvariant(), 0, out outVal, out errCode, out errTxt);*/
                        MessageBox.Show(
                            "The maximum number of attempted failed logins has been exceeded.  " +
                            "The user account is now locked. " +
                            "Please contact Shop System Support. " +
                            "The application will now exit.",
                            "Application Security",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Stop);
                        try
                        {
                            Application.Exit();
                        }
                        catch
                        {
                            throw new ApplicationException(
                                      "Application has exited due to security violation");
                        }
                        finally
                        {
                            throw new ApplicationException(
                                      "Application has exited due to security violation");
                        }
                    }

                    if (needPasswordChange)
                    {
                        MessageBox.Show(
                            "Your password has expired. " +
                            "The application will now exit.",
                            "Application Security",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Exclamation);
                        try
                        {
                            Application.Exit();
                        }
                        catch
                        {
                            throw new ApplicationException(
                                      "Application has exited due to an expired password");
                        }
                        finally
                        {
                            throw new ApplicationException(
                                      "Application has exited due to an expired password");
                        }
                    }
                }
                if (!LoginCancel && fullAuth == false)
                {
                    this.userState = UserDesktopState.NOTLOGGEDIN;
                    break;
                }
                else
                {
                    break;
                }
            }while (this.userState != UserDesktopState.LOGGEDIN);

            if (!LoginCancel && this.userState == UserDesktopState.LOGGEDIN)
            {
                if (FileLogger.Instance.IsLogInfo)
                {
                    FileLogger.Instance.logMessage(LogLevel.INFO, this, "User {0} successfully authorized", FullUserName);
                }

                //Get role information
                //The logged in user's security profile will be stored in LoggedInUserSecurityProfile object after the call
                string errorCode;
                string errorMesg;
                if (!SecurityProfileProcedures.GetUserSecurityProfile(FullUserName, string.Empty,
                                                                      GlobalDataAccessor.Instance.CurrentSiteId.StoreNumber, "N",
                                                                      this, out errorCode, out errorMesg))
                {
                    BasicExceptionHandler.Instance.AddException(
                        "Security Profile could not be loaded for the logged in user. Cannot Authorize",
                        new ApplicationException());
                    MessageBox.Show(
                        "User's security profile could not be loaded. Exiting the application");
                    Application.Exit();
                }
                else
                {
                    if (FileLogger.Instance.IsLogInfo)
                    {
                        FileLogger.Instance.logMessage(LogLevel.INFO, this, "User {0} security profile retrieved", FullUserName);
                    }
                    //If the logged in user is not an auditor, display an error message and exit the application
                    if (!SecurityProfileProcedures.CanUserViewResource(
                            "AuditAppAccess", this.LoggedInUserSecurityProfile, this))
                    {
                        MessageBox.Show("You do not have sufficient security privileges to utilize this Audit application. Exiting the application");
                        Application.Exit();
                    }
                }

                if (userState == UserDesktopState.LOGGEDIN)
                {
                    //Set the password in the users security profile
                    LoggedInUserSecurityProfile.UserCurrentPassword = password;
                }
            }
        }
        /*__________________________________________________________________________________________*/
        private void IH_ItemHistoryDataGridView_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
        {
            bool enableAddItem = true;

            if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
            {
                _ActiveTicketNumber = Utilities.GetIntegerValue(IH_ItemHistoryDataGridView.Rows[e.RowIndex].Cells[IH_History_TktNo.Name].Value, 0);
                int    docType     = int.Parse(((string)IH_ItemHistoryDataGridView.Rows[e.RowIndex].Cells[0].Value).Substring(12, 1));
                string selectedICN = Utilities.GetStringValue(IH_ItemHistoryDataGridView.Rows[e.RowIndex].Cells[0].Value);
                string status      =
                    IH_ItemHistoryDataGridView.Rows[e.RowIndex].Cells[
                        IH_History_ItemStatusColumn.Name].Value.ToString();

                if (e.ColumnIndex == 0)
                {
                    //  string docType =
                    //      IH_ItemHistoryDataGridView.Rows[e.RowIndex].Cells[IH_History_DocType.Name].
                    //          Value.ToString();

                    switch (status)
                    {
                    case "SOLD":
                        if (GlobalDataAccessor.Instance.DesktopSession.CustomerHistorySales != null)
                        {
                            Sale_dialog sd = new Sale_dialog(GlobalDataAccessor.Instance.DesktopSession.CustomerHistorySales.Find
                                                                 (l => l.TicketNumber == _ActiveTicketNumber));

                            sd.ShowDialog();
                        }
                        break;

                    case "On Layaway":
                        if (GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryLayaways != null)
                        {
                            LayawayVO ly = GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryLayaways.Find
                                               (l => l.TicketNumber == _ActiveTicketNumber);
                            Receipt r;

                            if (ly.Receipts.Count > 0)
                            {
                                r = ly.Receipts[0];
                            }
                            else
                            {
                                r = new Receipt();
                            }

                            Layaway_dialog ld = new Layaway_dialog(ly, r);

                            ld.ShowDialog();
                        }
                        break;

                    case "REF":

                        SaleRefund_Dialog srd = new SaleRefund_Dialog(GlobalDataAccessor.Instance.DesktopSession.CustomerHistorySales.Find
                                                                          (l => l.TicketNumber == _ActiveTicketNumber));

                        srd.ShowDialog();
                        break;

                    default:
                        if (GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryPurchases != null && docType == 2)
                        {
                            PurchaseHistory_Dialog d = new PurchaseHistory_Dialog(GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryPurchases.Find(l => l.TicketNumber == _ActiveTicketNumber), 0, status);

                            if (d.isSetup)
                            {
                                d.ShowDialog();
                            }
                        }
                        else if (status.ToUpper() == "VOID")
                        {
                            if (docType == 1)
                            {
                                PawnLoan pawnLoan = Utilities.CloneObject(GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryLoans.Find(l => l.TicketNumber == _ActiveTicketNumber));
                                ProductHistory_Dialog productHistory = new ProductHistory_Dialog(pawnLoan, 0);
                                productHistory.ShowDialog();
                            }
                            else if (docType == 2)
                            {
                                PurchaseHistory_Dialog d =
                                    new PurchaseHistory_Dialog(
                                        GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryPurchases.Find(
                                            l => l.TicketNumber == _ActiveTicketNumber), 0, status);
                                d.ShowDialog();
                            }
                        }
                        else
                        {
                            var pawnLoan       = Utilities.CloneObject(GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryLoans.Find(l => l.TicketNumber == _ActiveTicketNumber));
                            var productHistory = new ProductHistory_Dialog(pawnLoan, 0);
                            productHistory.ShowDialog();
                        }

                        break;
                    }
                }
                if (docType == 1)
                {
                    PawnLoan pawnLoan = Utilities.CloneObject(GlobalDataAccessor.Instance.DesktopSession.CustomerHistoryLoans.Find(l => l.TicketNumber == _ActiveTicketNumber));
                    var      gunItems = pawnLoan.Items.Find(i => i.GunNumber > 0 && i.Icn == selectedICN);
                    if (gunItems != null)
                    {
                        enableAddItem = false;
                    }
                }



                _ActiveICN = Utilities.GetStringValue(IH_ItemHistoryDataGridView.Rows[e.RowIndex].Cells[IH_History_TransactionNumberColumn.Name].Value, "");
                string sLoanStatus = Utilities.GetStringValue(IH_ItemHistoryDataGridView.Rows[e.RowIndex].Cells[IH_History_ItemStatusColumn.Name].Value, "");

                PairType <ProductStatus, string> pairType = GlobalDataAccessor.Instance.DesktopSession.LoanStatus
                                                            .First(pt => pt.Right == sLoanStatus);

                if (pairType.Left == ProductStatus.PU)
                {
                    const string resName  = "NEWPAWNLOAN";
                    UserVO       currUser = GlobalDataAccessor.Instance.DesktopSession.LoggedInUserSecurityProfile;
                    IH_AddItemToNewPawnLoan.Enabled = SecurityProfileProcedures.CanUserViewResource(resName, currUser, GlobalDataAccessor.Instance.DesktopSession);
                    IH_AddItemToNewPawnLoan.Enabled = enableAddItem;
                }
                else
                {
                    IH_AddItemToNewPawnLoan.Enabled = false;
                }
            }
        }
Ejemplo n.º 10
0
        private void CreateVendor_Load(object sender, EventArgs e)
        {
            this.NavControlBox.Owner = this;
            var gSess    = GlobalDataAccessor.Instance;
            var dSession = gSess.DesktopSession;

            strStoreNumber    = gSess.CurrentSiteId.StoreNumber;
            strUserId         = dSession.UserName;
            currentSearchData = dSession.LookupCriteria;

            if (dSession.ActiveVendor != null &&
                !dSession.ActiveVendor.NewVendor)
            {
                vendor = GlobalDataAccessor.Instance.DesktopSession.ActiveVendor;
                PopulateVendor(vendor);

                if (!vendor.CreationStore.Equals(gSess.CurrentSiteId.StoreNumber))
                {
                    vendInfoPanel.Enabled = false;
                    if (GlobalDataAccessor.Instance.DesktopSession.VenderFFLRequired)
                    {
                        corporateFFLLabel.Visible  = true;
                        customButtonSubmit.Enabled = false;
                    }
                    else
                    {
                        corporateFFLLabel.Visible = false;
                    }
                }
                else
                {
                    const string resourceName = "EDITVENDOR";
                    var          currUser     = GlobalDataAccessor.Instance.DesktopSession.LoggedInUserSecurityProfile;
                    if (!(SecurityProfileProcedures.CanUserViewResource(resourceName, currUser, dSession)))
                    {
                        vendInfoPanel.Enabled = false;
                    }
                }

                if (!(vendInfoPanel.Enabled))
                {
                    customButtonSubmit.Text = "Continue";

                    if (GlobalDataAccessor.Instance.DesktopSession.VenderFFLRequired && !Utilities.IsValidFFL(ffl.Text))
                    {
                        customButtonSubmit.Enabled = false;
                    }
                }
            }
            else if (GlobalDataAccessor.Instance.DesktopSession.VenderFFLRequired && GlobalDataAccessor.Instance.DesktopSession.ActiveVendor != null && CashlinxDesktopSession.Instance.ActiveVendor.NewVendor)
            {
                vendor = GlobalDataAccessor.Instance.DesktopSession.ActiveVendor;
                PopulateVendor(vendor);
            }
            else if (currentSearchData != null)
            {
                this.name.Text = currentSearchData.VendName;
                //this.taxID.Text = currentSearchData.TaxID;
                this.taxID.Enabled = false;
            }

            this.zipcode.stateChanging += this.state.dependentTextChanged;
            this.zipcode.cityChanging  += city.dependentTextChanged;

            this.name.Focus();
        }