/// <summary>
        /// Gets a collector from the database with the passed id
        /// </summary>
        /// <param name="id">The id of the collector to pull from the database</param>
        /// <returns>A collector from the database with the passed id</returns>
        public static DBCollector GetCollectorById(int id)
        {
            using (var conn = new SqlConnection(Properties.Settings.Default.Britannicus_DBConnectionString))
                using (var command = new SqlCommand("GetCollectorById", conn)
                {
                    CommandType = CommandType.StoredProcedure
                })
                {
                    conn.Open();
                    command.Parameters.Add("@id", SqlDbType.Int).Value = id;

                    var         reader = command.ExecuteReader();
                    DBCollector tempCollector;
                    if (reader.Read())
                    {
                        tempCollector = new DBCollector((int)reader["customerID"], (int)reader["customerTypeID"],
                                                        (string)reader["firstName"], (string)reader["lastName"], (string)reader["phoneNumber"]);
                    }
                    else
                    {
                        tempCollector = new DBCollector(id, 0, "", "", "");
                    }

                    return(tempCollector);
                }
        }
示例#2
0
        private void CbxSelectedCollector_SelectedValueChanged(object sender, EventArgs e)
        {
            DBCollector tempCollector = (cbxSelectedCollector.SelectedItem as DBCollector);

            txtSearchName.Text   = tempCollector.FullName;
            mtxtPhoneNumber.Text = tempCollector.PhoneNumber;
        }
示例#3
0
 /// <summary>
 /// Used to instantiate a new invoice with the passed arguments
 /// </summary>
 /// <param name="id">The unique identification number of an invoice</param>
 /// <param name="customerID">The unique identification number of the collector associated with this invoice</param>
 /// <param name="date">The date this invoice was created</param>
 public DBInvoice(int id, int customerID, DateTime date)
 {
     this.ID           = id;
     this.Collector    = DBCollector.GetCollectorById(customerID);
     this.Date         = date;
     this.Transactions = new BindingList <DBTransaction>();
 }
 private void ReloadData()
 {
     this.collectors = DBCollector.GetCollectors();
     //this.txtSearchName.DataBindings.Clear();
     //this.mtxtPhoneNumber.DataBindings.Clear();
     this.dgvCollectors.DataSource        = this.collectors;
     this.cbxSelectedCollector.DataSource = this.collectors;
     //this.txtSearchName.DataBindings.Add("Text", this.collectors, "FullName", true, DataSourceUpdateMode.Never);
     //this.mtxtPhoneNumber.DataBindings.Add("Text", this.collectors, "PhoneNumber", true, DataSourceUpdateMode.Never);
     this.FilterCollectors();
 }
        /*public bool UpdateInterests(int itemTypeID, List<int> tagIds)
         * {
         *  return DBCollector.UpdateInterests(this.CollectorID, itemTypeID, tagIds);
         * }*/

        /// <summary>
        /// Combines the DeleteInterests and InsertInterests method to update the interests associated with the passed collectorID
        /// for the passed item type
        /// </summary>
        /// <param name="collectorID">The id of the collector to update interests for</param>
        /// <param name="itemTypeID">The id of the type of item the interests are for</param>
        /// <param name="tagIds">The tag ids of the interests</param>
        /// <returns></returns>
        public static bool UpdateInterests(int collectorID, int itemTypeID, List <int> tagIds)
        {
            bool result = false;

            DBCollector.DeleteInterests(collectorID, itemTypeID);
            if (DBCollector.InsertInterests(collectorID, itemTypeID, tagIds))
            {
                result = true;
            }

            return(result);
        }
 private void NudCollectorId_ValueChanged(object sender, EventArgs e)
 {
     try
     {
         collector = DBCollector.GetCollectorById((int)this.nudCollectorId.Value);
         this.lblCollectorName.Text = collector.FullName;
         this.mtxtPhoneNumber.Text  = collector.PhoneNumber;
     }
     catch (Exception ex)
     {
         (this.Parent.Parent as MasterForm).SetStatus("Error! Failed to load collector: " + ex.Message);
     }
 }
        private void ShowCollector()
        {
            int         collectorID   = (int)this.nudCollectorId.Value;
            DBCollector tempCollector = DBCollector.GetCollectorById(collectorID);

            this.txtFirstName.Text     = tempCollector.FirstName;
            this.txtLastName.Text      = tempCollector.LastName;
            this.mtxtPhoneNumber.Text  = tempCollector.PhoneNumber;
            this.cbxType.SelectedValue = tempCollector.CollectorTypeID;

            //Check the checkboxes of tags which this collector is interested in
            DBControlHelper.CheckControlsWithValues(this.tlpTagsBookSelection, DBCollector.GetInterestsOfType(collectorID, 1));
            DBControlHelper.CheckControlsWithValues(this.tlpTagsMapSelection, DBCollector.GetInterestsOfType(collectorID, 2));
            DBControlHelper.CheckControlsWithValues(this.tlpTagsPeriodicalSelection, DBCollector.GetInterestsOfType(collectorID, 3));
        }
示例#8
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            MasterForm master = (this.Parent.Parent as MasterForm);

            try
            {
                //Input data gathered here to improve readability and centralize any processing
                //that needs to be done before insertion
                string firstName       = this.txtFirstNameInput.Text.Trim();
                string lastName        = this.txtLastNameInput.Text.Trim();
                string phoneNumber     = this.mtxtPhoneNumberInput.Text.Trim();
                int    collectorTypeID = (int)this.cbxTypeInput.SelectedValue;

                string status = "";

                if (String.IsNullOrEmpty(status = DBCollector.Validate(firstName, lastName, phoneNumber)))
                {
                    object insertedID = DBCollector.InsertCollector(collectorTypeID, firstName, lastName, phoneNumber);

                    if (insertedID != null)
                    {
                        status = "Collector " + firstName + " " + lastName + " has been added." + Environment.NewLine;

                        List <int> bookTagValues = DBControlHelper.GetValuesFromCheckedControls(this.tlpBookTagsSelection);
                        if (bookTagValues.Count > 0 && DBCollector.InsertInterests((int)insertedID, 1, bookTagValues))
                        {
                            status += "Book interests added." + Environment.NewLine;
                        }
                        List <int> mapTagValues = DBControlHelper.GetValuesFromCheckedControls(this.tlpMapTagsSelection);
                        if (mapTagValues.Count > 0 && DBCollector.InsertInterests((int)insertedID, 2, mapTagValues))
                        {
                            status += "Map interests added." + Environment.NewLine;
                        }
                        List <int> periodicalTagValues = DBControlHelper.GetValuesFromCheckedControls(this.tlpPeriodicalTagsSelection);
                        if (periodicalTagValues.Count > 0 && DBCollector.InsertInterests((int)insertedID, 3, periodicalTagValues))
                        {
                            status += "Periodical interests added." + Environment.NewLine;
                        }
                    }
                }

                master.SetStatus(status);
            }
            catch (Exception ex)
            {
                master.SetStatus("Error! Add failed: " + ex.Message);
            }
        }
        private void BtnUpdate_Click(object sender, EventArgs e)
        {
            MasterForm master = (this.Parent.Parent as MasterForm);

            try
            {
                //Input data gathered here to improve readability and centralize any processing
                //that needs to be done before insertion
                int    collectorID     = (int)nudCollectorId.Value;
                string firstName       = txtFirstName.Text.Trim();
                string lastName        = txtLastName.Text.Trim();
                int    collectorTypeID = (int)cbxType.SelectedValue;
                string phoneNumber     = mtxtPhoneNumber.Text.Trim();

                string status = "";

                if (String.IsNullOrEmpty(status = DBCollector.Validate(firstName, lastName, phoneNumber)))
                {
                    if (DBCollector.UpdateCollector(collectorID, collectorTypeID, firstName, lastName, phoneNumber))
                    {
                        status = "Collector " + firstName + " " + lastName + " has been saved." + Environment.NewLine;
                    }
                }

                if (DBCollector.UpdateInterests(collectorID, 1, DBControlHelper.GetValuesFromCheckedControls(this.tlpTagsBookSelection)))
                {
                    status += "Book interests have been updated." + Environment.NewLine;
                }
                if (DBCollector.UpdateInterests(collectorID, 2, DBControlHelper.GetValuesFromCheckedControls(this.tlpTagsMapSelection)))
                {
                    status += "Map interests have been updated." + Environment.NewLine;
                }
                if (DBCollector.UpdateInterests(collectorID, 3, DBControlHelper.GetValuesFromCheckedControls(this.tlpTagsPeriodicalSelection)))
                {
                    status += "Periodical interests have been updated." + Environment.NewLine;
                }

                master.SetStatus(status);
            }
            catch (Exception ex)
            {
                master.SetStatus("Error! Save failed: " + ex.Message);
            }
        }
        /// <summary>
        /// Gets a list of all the collectors in the database
        /// </summary>
        /// <returns>A list of all the collectors in the database</returns>
        public static BindingList <DBCollector> GetCollectors()
        {
            BindingList <DBCollector> collectors = new BindingList <DBCollector>();
            string query = "SELECT * FROM customers";

            using (var conn = new SqlConnection(Properties.Settings.Default.Britannicus_DBConnectionString))
            {
                var command = new SqlCommand(query, conn);
                conn.Open();
                var reader = command.ExecuteReader();
                while (reader.Read())
                {
                    DBCollector temp = new DBCollector((int)reader["customerID"], (int)reader["customerTypeID"],
                                                       (string)reader["firstName"], (string)reader["lastName"], (string)reader["phoneNumber"]);
                    collectors.Add(temp);
                }
            }
            return(collectors);
        }
        private void BtnRemove_Click(object sender, EventArgs e)
        {
            MasterForm master = (this.Parent.Parent as MasterForm);

            try
            {
                if (DBCollector.DeleteCollector((int)this.nudCollectorId.Value))
                {
                    master.SetStatus("Collector " + this.txtFirstName.Text + " " + this.txtLastName.Text + " has been deleted.");
                    if (this.nudCollectorId.Value > this.nudCollectorId.Minimum)
                    {
                        this.nudCollectorId.Value--;
                    }
                }
            }
            catch (Exception ex)
            {
                master.SetStatus("Error! Deletion failed: " + ex.Message);
            }
        }
示例#12
0
        private void UpdateDataSources()
        {
            //Pull books from the database, if it fails show a status message
            try
            {
                books = DBBook.GetBooks();
            }
            catch (Exception ex)
            {
                (this.Parent.Parent as MasterForm).SetStatus("Failed to load books: " + ex.Message);
            }

            //Pull maps from the database, if it fails show a status message
            try
            {
                maps = DBMap.GetMaps();
            }
            catch (Exception ex)
            {
                (this.Parent.Parent as MasterForm).SetStatus("Failed to load maps: " + ex.Message);
            }

            //Pull periodicals from the database, if it fails show a status message
            try
            {
                periodicals = DBPeriodical.GetPeriodicals();
            }
            catch (Exception ex)
            {
                (this.Parent.Parent as MasterForm).SetStatus("Failed to load periodicals: " + ex.Message);
            }

            try
            {
                collectors = DBCollector.GetCollectors();
            }
            catch (Exception ex)
            {
                (this.Parent.Parent as MasterForm).SetStatus("Failed to load collectors: " + ex.Message);
            }
        }
        private void BtnRemoveCollector_Click(object sender, EventArgs e)
        {
            MasterForm master = (this.Parent.Parent as MasterForm);

            if (this.cbxSelectedCollector.SelectedItem is DBCollector)
            {
                try
                {
                    DBCollector tempCollector = (this.cbxSelectedCollector.SelectedItem as DBCollector);

                    //Attempt to delete from the database
                    if (tempCollector.Delete())
                    {
                        //Deletion successful

                        master.SetStatus("Collector " + tempCollector.FullName + " has been deleted.");

                        //Remove all related datagridview rows
                        for (var i = 0; i < this.dgvCollectors.Rows.Count; i++)
                        {
                            if ((int)this.dgvCollectors.Rows[i].Cells["CollectorID"].Value == tempCollector.CollectorID)
                            {
                                this.dgvCollectors.Rows.RemoveAt(i);
                            }
                        }
                        this.collectors.Remove(tempCollector);
                    }
                }
                catch (Exception ex)
                {
                    master.SetStatus("Error! Deletion failed: " + ex.Message);
                }
            }
            else
            {
                master.SetStatus("Error! You must select a collector to remove");
            }
        }
示例#14
0
 /// <summary>
 /// Checks if the characters and their positions in a phone number match another phone number.
 /// Blank characters are ignored.
 /// </summary>
 /// <param name="phoneNumber1">The first phone number</param>
 /// <param name="phoneNumber2">The second phone number</param>
 /// <returns></returns>
 public static bool IsPhoneNumberMatching(string phoneNumber1, string phoneNumber2)
 {
     return(DBCollector.IsPhoneNumberMatching(phoneNumber1, phoneNumber2));
 }
 /// <summary>
 /// Deletes this collector from the database
 /// </summary>
 /// <returns>If a collector was deleted</returns>
 public bool Delete()
 {
     return(DBCollector.DeleteCollector(this.CollectorID));
 }
示例#16
0
        public ViewPurchasesByCollectorScreen(Screen backScreen) : base("View Purchases by Collector", backScreen, 1)
        {
            this.cryRpt       = new ViewPurchasesByCollector();
            this.tlpSearchBar = new System.Windows.Forms.TableLayoutPanel();
            this.lblName      = new System.Windows.Forms.Label();
            this.lblSelectedCollectorPrompt = new System.Windows.Forms.Label();
            this.lblSearchPrompt            = new System.Windows.Forms.Label();
            this.cbxSelectedCollector       = new System.Windows.Forms.ComboBox();
            this.txtSearchName           = new System.Windows.Forms.TextBox();
            this.mtxtPhoneNumber         = new System.Windows.Forms.MaskedTextBox();
            this.lblPhoneNumPrompt       = new System.Windows.Forms.Label();
            this.btnViewDetails          = new System.Windows.Forms.Button();
            this.crvPurchasesByCollector = new CrystalDecisions.Windows.Forms.CrystalReportViewer();

            this.BackColor   = System.Drawing.Color.Transparent;
            this.ColumnCount = 1;
            this.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            //this.Controls.Add(this.tlpSearchBar, 0, 0);
            this.Controls.Add(this.crvPurchasesByCollector, 0, 1);
            this.Dock = System.Windows.Forms.DockStyle.Fill;
            //this.RowCount = 2;
            this.RowCount = 1;
            //this.RowStyles.Add(new System.Windows.Forms.RowStyle());
            //this.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.TabIndex       = 0;
            this.ParentChanged += ViewPurchasesByCollectorScreen_ParentChanged;
            //
            // tlpSearchBar
            //
            this.tlpSearchBar.AutoSize    = true;
            this.tlpSearchBar.BackColor   = System.Drawing.Color.White;
            this.tlpSearchBar.ColumnCount = 7;
            this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.AutoSize));
            this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
            this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.AutoSize));
            this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10F));
            this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.AutoSize));
            this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.AutoSize));
            //this.tlpSearchBar.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
            this.tlpSearchBar.Controls.Add(this.lblName, 1, 0);
            this.tlpSearchBar.Controls.Add(this.lblSelectedCollectorPrompt, 4, 0);
            this.tlpSearchBar.Controls.Add(this.lblSearchPrompt, 0, 0);
            this.tlpSearchBar.Controls.Add(this.cbxSelectedCollector, 5, 0);
            this.tlpSearchBar.Controls.Add(this.txtSearchName, 1, 1);
            this.tlpSearchBar.Controls.Add(this.mtxtPhoneNumber, 2, 1);
            this.tlpSearchBar.Controls.Add(this.lblPhoneNumPrompt, 2, 0);
            this.tlpSearchBar.Controls.Add(this.btnViewDetails, 6, 0);
            this.tlpSearchBar.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpSearchBar.Padding  = new System.Windows.Forms.Padding(10);
            this.tlpSearchBar.RowCount = 2;
            this.tlpSearchBar.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpSearchBar.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpSearchBar.TabIndex = 0;
            //
            // lblName
            //
            this.lblName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lblName.AutoSize  = true;
            this.lblName.TabIndex  = 7;
            this.lblName.Text      = "Name";
            this.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // lblSelectedCollectorPrompt
            //
            this.lblSelectedCollectorPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblSelectedCollectorPrompt.AutoSize = true;
            //this.lblSelectedCollectorPrompt.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tlpSearchBar.SetRowSpan(this.lblSelectedCollectorPrompt, 2);
            this.lblSelectedCollectorPrompt.TabIndex = 3;
            this.lblSelectedCollectorPrompt.Text     = "Selected Collector:";
            //
            // lblSearchPrompt
            //
            this.lblSearchPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblSearchPrompt.AutoSize = true;
            //this.lblSearchPrompt.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tlpSearchBar.SetRowSpan(this.lblSearchPrompt, 2);
            this.lblSearchPrompt.TabIndex = 0;
            this.lblSearchPrompt.Text     = "Search:";
            //
            // cbxSelectedCollector
            //
            this.cbxSelectedCollector.Anchor            = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.cbxSelectedCollector.FormattingEnabled = true;
            this.cbxSelectedCollector.Margin            = new System.Windows.Forms.Padding(10, 3, 10, 3);
            this.tlpSearchBar.SetRowSpan(this.cbxSelectedCollector, 2);
            this.cbxSelectedCollector.TabIndex = 4;
            //this.cbxSelectedCollector.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbxSelectedCollector.DataSource            = DBCollector.GetCollectors();
            this.cbxSelectedCollector.DisplayMember         = "ComboBoxDisplay";
            this.cbxSelectedCollector.ValueMember           = "CollectorID";
            this.cbxSelectedCollector.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.cbxSelectedCollector.SelectedValueChanged += CbxSelectedCollector_SelectedValueChanged;
            this.cbxSelectedCollector.Size = new System.Drawing.Size(200, 30);
            //
            // txtSearchInput
            //
            this.txtSearchName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
            this.txtSearchName.Margin   = new System.Windows.Forms.Padding(10, 3, 10, 3);
            this.txtSearchName.TabIndex = 1;
            //this.txtSearchName.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtSearchName.MaxLength = DBControlHelper.MaximumFullNameLength;
            //
            // mtxtPhoneNumber
            //
            this.mtxtPhoneNumber.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                                | System.Windows.Forms.AnchorStyles.Right)));
            this.mtxtPhoneNumber.Margin         = new System.Windows.Forms.Padding(10, 3, 10, 3);
            this.mtxtPhoneNumber.Mask           = "(000) 000-0000";
            this.mtxtPhoneNumber.TabIndex       = 5;
            this.mtxtPhoneNumber.Size           = new System.Drawing.Size(150, 33);
            this.mtxtPhoneNumber.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            //this.mtxtPhoneNumber.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            //
            // lblPhoneNumPrompt
            //
            this.lblPhoneNumPrompt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                                  | System.Windows.Forms.AnchorStyles.Right)));
            this.lblPhoneNumPrompt.AutoSize  = true;
            this.lblPhoneNumPrompt.TabIndex  = 6;
            this.lblPhoneNumPrompt.Text      = "Phone Number";
            this.lblPhoneNumPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // btnViewDetails
            //
            this.btnViewDetails.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.btnViewDetails.AutoSize = true;
            this.tlpSearchBar.SetRowSpan(this.btnViewDetails, 2);
            this.btnViewDetails.TabIndex = 8;
            this.btnViewDetails.Text     = "View Details";
            this.btnViewDetails.UseVisualStyleBackColor = true;
            this.btnViewDetails.Click += BtnViewDetails_Click;
            //
            // crvPurchasesByCollector
            //
            this.crvPurchasesByCollector.ActiveViewIndex = -1;
            this.crvPurchasesByCollector.BorderStyle     = System.Windows.Forms.BorderStyle.FixedSingle;
            this.crvPurchasesByCollector.Cursor          = System.Windows.Forms.Cursors.Default;
            this.crvPurchasesByCollector.Dock            = System.Windows.Forms.DockStyle.Fill;
            this.crvPurchasesByCollector.TabIndex        = 1;

            this.SetFontSizes(this.Controls);
        }
 public void SetCollector(int id, int max)
 {
     collector = DBCollector.GetCollectorById(id);
     this.nudCollectorId.Maximum = max;
     this.nudCollectorId.Value   = id;
 }
示例#18
0
        public SellItemScreen(Screen backScreen) : base("Sell Item", backScreen, 1, 2, 3)
        {
            this.tlpItemCollector     = new System.Windows.Forms.TableLayoutPanel();
            this.tlpItems             = new System.Windows.Forms.TableLayoutPanel();
            this.tlpItemsSearch       = new System.Windows.Forms.TableLayoutPanel();
            this.dgvItems             = new System.Windows.Forms.DataGridView();
            this.tlpCollectors        = new System.Windows.Forms.TableLayoutPanel();
            this.tlpCollectorsSearch  = new System.Windows.Forms.TableLayoutPanel();
            this.dgvCollectors        = new System.Windows.Forms.DataGridView();
            this.tlpButtons           = new System.Windows.Forms.TableLayoutPanel();
            this.btnAddToCart         = new System.Windows.Forms.Button();
            this.btnCheckout          = new System.Windows.Forms.Button();
            this.lblItemPrompt        = new System.Windows.Forms.Label();
            this.lblCollectorPrompt   = new System.Windows.Forms.Label();
            this.cbxSelectedItem      = new System.Windows.Forms.ComboBox();
            this.cbxSelectedCollector = new System.Windows.Forms.ComboBox();
            this.lblQuantityPrompt    = new System.Windows.Forms.Label();
            this.nudQuantity          = new System.Windows.Forms.NumericUpDown();
            this.lblConditionPrompt   = new System.Windows.Forms.Label();
            this.lblCondition         = new System.Windows.Forms.Label();
            this.lblTotalPricePrompt  = new System.Windows.Forms.Label();
            this.lblTotalPrice        = new System.Windows.Forms.Label();
            this.chkIsCollector       = new System.Windows.Forms.CheckBox();
            this.lblItemsTitle        = new System.Windows.Forms.Label();
            this.lblCollectorsTitle   = new System.Windows.Forms.Label();
            this.lblItemSearchPrompt  = new System.Windows.Forms.Label();
            this.txtSearch            = new System.Windows.Forms.TextBox();
            this.tlpItemTypes         = new System.Windows.Forms.TableLayoutPanel();
            this.rbnBooks             = new System.Windows.Forms.RadioButton();
            this.rbnMaps                             = new System.Windows.Forms.RadioButton();
            this.rbnPeriodicals                      = new System.Windows.Forms.RadioButton();
            this.lblCollectorSearchPrompt            = new System.Windows.Forms.Label();
            this.txtSearchCollectorName              = new System.Windows.Forms.TextBox();
            this.mtxtCollectorSearchPhoneNumber      = new System.Windows.Forms.MaskedTextBox();
            this.lblCollectorSearchNamePrompt        = new System.Windows.Forms.Label();
            this.lblCollectorSearchPhoneNumberPrompt = new System.Windows.Forms.Label();
            //
            // panel
            //
            this.BackColor   = System.Drawing.Color.Transparent;
            this.ColumnCount = 1;
            this.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.Controls.Add(this.tlpCollectors, 0, 2);
            this.Controls.Add(this.tlpItemCollector, 0, 0);
            this.Controls.Add(this.tlpItems, 0, 1);
            this.Controls.Add(this.tlpButtons, 0, 3);
            this.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.RowCount = 4;
            this.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.ParentChanged += SellItemScreen_ParentChanged;
            //
            // tlpItemCollector
            //
            this.tlpItemCollector.AutoSize    = true;
            this.tlpItemCollector.BackColor   = System.Drawing.Color.White;
            this.tlpItemCollector.ColumnCount = 8;
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
            this.tlpItemCollector.Controls.Add(this.lblTotalPrice, 7, 0);
            this.tlpItemCollector.Controls.Add(this.lblTotalPricePrompt, 6, 0);
            this.tlpItemCollector.Controls.Add(this.lblCondition, 5, 0);
            this.tlpItemCollector.Controls.Add(this.lblConditionPrompt, 4, 0);
            this.tlpItemCollector.Controls.Add(this.lblQuantityPrompt, 2, 0);
            this.tlpItemCollector.Controls.Add(this.lblItemPrompt, 0, 0);
            this.tlpItemCollector.Controls.Add(this.lblCollectorPrompt, 0, 1);
            this.tlpItemCollector.Controls.Add(this.cbxSelectedItem, 1, 0);
            this.tlpItemCollector.Controls.Add(this.cbxSelectedCollector, 1, 1);
            this.tlpItemCollector.Controls.Add(this.nudQuantity, 3, 0);
            this.tlpItemCollector.Controls.Add(this.chkIsCollector, 2, 1);
            this.tlpItemCollector.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpItemCollector.RowCount = 2;
            this.tlpItemCollector.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpItemCollector.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpItemCollector.TabIndex = 0;
            //
            // tlpItems
            //
            this.tlpItems.BackColor   = System.Drawing.Color.White;
            this.tlpItems.ColumnCount = 1;
            this.tlpItems.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tlpItems.Controls.Add(this.tlpItemsSearch, 0, 1);
            this.tlpItems.Controls.Add(this.dgvItems, 0, 2);
            this.tlpItems.Controls.Add(this.lblItemsTitle, 0, 0);
            this.tlpItems.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpItems.RowCount = 3;
            this.tlpItems.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpItems.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpItems.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tlpItems.TabIndex = 1;
            //
            // tlpItemsSearch
            //
            this.tlpItemsSearch.AutoSize    = true;
            this.tlpItemsSearch.ColumnCount = 5;
            this.tlpItemsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlpItemsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.89948F));
            this.tlpItemsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15.71959F));
            this.tlpItemsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlpItemsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 53.38093F));
            this.tlpItemsSearch.Controls.Add(this.lblItemSearchPrompt, 0, 0);
            this.tlpItemsSearch.Controls.Add(this.txtSearch, 1, 0);
            this.tlpItemsSearch.Controls.Add(this.tlpItemTypes, 3, 0);
            this.tlpItemsSearch.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpItemsSearch.RowCount = 1;
            this.tlpItemsSearch.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tlpItemsSearch.TabIndex = 0;
            //
            // dgvItems
            //
            this.dgvItems.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dgvItems.Dock                = System.Windows.Forms.DockStyle.Fill;
            this.dgvItems.TabIndex            = 1;
            this.dgvItems.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            this.dgvItems.ReadOnly            = true;
            this.dgvItems.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            //
            // tlpCollectors
            //
            this.tlpCollectors.BackColor   = System.Drawing.Color.White;
            this.tlpCollectors.ColumnCount = 1;
            this.tlpCollectors.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tlpCollectors.Controls.Add(this.tlpCollectorsSearch, 0, 1);
            this.tlpCollectors.Controls.Add(this.dgvCollectors, 0, 2);
            this.tlpCollectors.Controls.Add(this.lblCollectorsTitle, 0, 0);
            this.tlpCollectors.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpCollectors.RowCount = 3;
            this.tlpCollectors.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpCollectors.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tlpCollectors.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tlpCollectors.TabIndex = 2;
            //
            // tlpCollectorsSearch
            //
            this.tlpCollectorsSearch.AutoSize    = true;
            this.tlpCollectorsSearch.ColumnCount = 5;
            this.tlpCollectorsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlpCollectorsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30.66432F));
            this.tlpCollectorsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 5F));
            this.tlpCollectorsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.AutoSize));
            this.tlpCollectorsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30.66432F));
            this.tlpCollectorsSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.99378F));
            this.tlpCollectorsSearch.Controls.Add(this.txtSearchCollectorName, 1, 1);
            this.tlpCollectorsSearch.Controls.Add(this.lblCollectorSearchPrompt, 0, 1);
            this.tlpCollectorsSearch.Controls.Add(this.mtxtCollectorSearchPhoneNumber, 3, 1);
            this.tlpCollectorsSearch.Controls.Add(this.lblCollectorSearchNamePrompt, 1, 0);
            this.tlpCollectorsSearch.Controls.Add(this.lblCollectorSearchPhoneNumberPrompt, 3, 0);
            this.tlpCollectorsSearch.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpCollectorsSearch.RowCount = 2;
            this.tlpCollectorsSearch.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tlpCollectorsSearch.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tlpCollectorsSearch.TabIndex = 0;
            //
            // dgvCollectors
            //
            this.dgvCollectors.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dgvCollectors.Dock                = System.Windows.Forms.DockStyle.Fill;
            this.dgvCollectors.TabIndex            = 1;
            this.dgvCollectors.DataSource          = DBCollector.GetCollectors();
            this.dgvCollectors.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            this.dgvCollectors.ReadOnly            = true;
            this.dgvCollectors.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            //
            // tlpButtons
            //
            this.tlpButtons.ColumnCount = 2;
            this.tlpButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tlpButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tlpButtons.Controls.Add(this.btnCheckout, 1, 0);
            this.tlpButtons.Controls.Add(this.btnAddToCart, 0, 0);
            this.tlpButtons.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpButtons.RowCount = 1;
            this.tlpButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tlpButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
            this.tlpButtons.TabIndex = 3;
            this.tlpButtons.AutoSize = true;
            //
            // btnAddToCart
            //
            this.btnAddToCart.Anchor                  = System.Windows.Forms.AnchorStyles.Right;
            this.btnAddToCart.AutoSize                = true;
            this.btnAddToCart.BackColor               = System.Drawing.SystemColors.Control;
            this.btnAddToCart.MaximumSize             = new System.Drawing.Size(250, 33);
            this.btnAddToCart.TabIndex                = 0;
            this.btnAddToCart.Text                    = "Add to Cart";
            this.btnAddToCart.UseVisualStyleBackColor = false;
            this.btnAddToCart.Click                  += BtnAddToCart_Click;
            //
            // btnCheckout
            //
            this.btnCheckout.Anchor                  = System.Windows.Forms.AnchorStyles.Left;
            this.btnCheckout.AutoSize                = true;
            this.btnCheckout.BackColor               = System.Drawing.SystemColors.Control;
            this.btnCheckout.MaximumSize             = new System.Drawing.Size(250, 33);
            this.btnCheckout.TabIndex                = 1;
            this.btnCheckout.Text                    = "Checkout";
            this.btnCheckout.UseVisualStyleBackColor = false;
            this.btnCheckout.Click                  += BtnCheckout_Click;
            //
            // lblItemPrompt
            //
            this.lblItemPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblItemPrompt.AutoSize = true;
            this.lblItemPrompt.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.lblItemPrompt.TabIndex = 0;
            this.lblItemPrompt.Text     = "Item:";
            //
            // lblCollectorPrompt
            //
            this.lblCollectorPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblCollectorPrompt.AutoSize = true;
            this.lblCollectorPrompt.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.lblCollectorPrompt.TabIndex = 1;
            this.lblCollectorPrompt.Text     = "Collector:";
            //
            // cbxSelectedItem
            //
            this.cbxSelectedItem.Anchor                = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.cbxSelectedItem.FormattingEnabled     = true;
            this.cbxSelectedItem.Margin                = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.cbxSelectedItem.TabIndex              = 2;
            this.cbxSelectedItem.DropDownStyle         = ComboBoxStyle.DropDownList;
            this.cbxSelectedItem.SelectedValueChanged += CbxSelectedItem_SelectedValueChanged;
            //
            // cbxSelectedCollector
            //
            this.cbxSelectedCollector.Anchor            = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.cbxSelectedCollector.FormattingEnabled = true;
            this.cbxSelectedCollector.Margin            = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.cbxSelectedCollector.TabIndex          = 3;
            this.cbxSelectedCollector.DropDownStyle     = ComboBoxStyle.DropDownList;
            this.cbxSelectedCollector.SelectedValue     = 1;
            //
            // lblQuantityPrompt
            //
            this.lblQuantityPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblQuantityPrompt.AutoSize = true;
            this.lblQuantityPrompt.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.lblQuantityPrompt.TabIndex = 4;
            this.lblQuantityPrompt.Text     = "Quantity:";
            //
            // nudQuantity
            //
            this.nudQuantity.Anchor        = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.nudQuantity.Margin        = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.nudQuantity.TabIndex      = 5;
            this.nudQuantity.Minimum       = 0;
            this.nudQuantity.ValueChanged += NudQuantity_ValueChanged;
            //
            // lblConditionPrompt
            //
            this.lblConditionPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblConditionPrompt.AutoSize = true;
            this.lblConditionPrompt.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.lblConditionPrompt.TabIndex = 6;
            this.lblConditionPrompt.Text     = "Condition:";
            //
            // lblCondition
            //
            this.lblCondition.Anchor   = System.Windows.Forms.AnchorStyles.Left;
            this.lblCondition.AutoSize = true;
            this.lblCondition.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.lblCondition.TabIndex = 7;
            this.lblCondition.Text     = "Poor";
            //
            // lblTotalPricePrompt
            //
            this.lblTotalPricePrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblTotalPricePrompt.AutoSize = true;
            this.lblTotalPricePrompt.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.lblTotalPricePrompt.TabIndex = 8;
            this.lblTotalPricePrompt.Text     = "Total Price:";
            //
            // lblTotalPrice
            //
            this.lblTotalPrice.Anchor   = System.Windows.Forms.AnchorStyles.Left;
            this.lblTotalPrice.AutoSize = true;
            this.lblTotalPrice.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.lblTotalPrice.TabIndex = 9;
            this.lblTotalPrice.Text     = "5.99 discounted";
            //
            // cbxIsCollector
            //
            this.chkIsCollector.Anchor   = System.Windows.Forms.AnchorStyles.Left;
            this.chkIsCollector.AutoSize = true;
            this.tlpItemCollector.SetColumnSpan(this.chkIsCollector, 2);
            this.chkIsCollector.Margin   = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.chkIsCollector.TabIndex = 10;
            this.chkIsCollector.Text     = "Customer is a Collector?";
            this.chkIsCollector.UseVisualStyleBackColor = true;
            this.chkIsCollector.Checked         = true;
            this.chkIsCollector.CheckedChanged += ChkIsCollector_CheckedChanged;
            //
            // lblItemsTitle
            //
            this.lblItemsTitle.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.lblItemsTitle.AutoSize  = true;
            this.lblItemsTitle.Margin    = new System.Windows.Forms.Padding(3, 10, 3, 10);
            this.lblItemsTitle.TabIndex  = 2;
            this.lblItemsTitle.Text      = "What would you like to sell?";
            this.lblItemsTitle.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            //
            // lblCollectorsTitle
            //
            this.lblCollectorsTitle.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.lblCollectorsTitle.AutoSize  = true;
            this.lblCollectorsTitle.Margin    = new System.Windows.Forms.Padding(3, 10, 3, 10);
            this.lblCollectorsTitle.TabIndex  = 2;
            this.lblCollectorsTitle.Text      = "Who would you like to sell to?";
            this.lblCollectorsTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // lblItemSearchPrompt
            //
            this.lblItemSearchPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblItemSearchPrompt.AutoSize = true;
            this.lblItemSearchPrompt.TabIndex = 0;
            this.lblItemSearchPrompt.Text     = "Search by Title:";
            //
            // txtSearchTitle
            //
            this.txtSearch.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.txtSearch.TabIndex     = 1;
            this.txtSearch.TextChanged += Item_SearchTextChanged;
            //
            // tlpItemTypes
            //
            this.tlpItemTypes.AutoSize    = true;
            this.tlpItemTypes.ColumnCount = 3;
            this.tlpItemTypes.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlpItemTypes.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlpItemTypes.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
            this.tlpItemTypes.Controls.Add(this.rbnBooks, 0, 0);
            this.tlpItemTypes.Controls.Add(this.rbnMaps, 2, 0);
            this.tlpItemTypes.Controls.Add(this.rbnPeriodicals, 1, 0);
            this.tlpItemTypes.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.tlpItemTypes.RowCount = 1;
            this.tlpItemTypes.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tlpItemTypes.TabIndex = 2;
            //
            // rbnBooks
            //
            this.rbnBooks.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.rbnBooks.AutoSize = true;
            this.rbnBooks.TabIndex = 0;
            this.rbnBooks.TabStop  = true;
            this.rbnBooks.Text     = "Books";
            this.rbnBooks.UseVisualStyleBackColor = true;
            this.rbnBooks.CheckedChanged         += ItemType_CheckedChanged;
            //
            // rbnMaps
            //
            this.rbnMaps.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.rbnMaps.AutoSize = true;
            this.rbnMaps.TabIndex = 1;
            this.rbnMaps.TabStop  = true;
            this.rbnMaps.Text     = "Maps";
            this.rbnMaps.UseVisualStyleBackColor = true;
            this.rbnMaps.CheckedChanged         += ItemType_CheckedChanged;
            //
            // rbnPeriodicals
            //
            this.rbnPeriodicals.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.rbnPeriodicals.AutoSize = true;
            this.rbnPeriodicals.TabIndex = 2;
            this.rbnPeriodicals.TabStop  = true;
            this.rbnPeriodicals.Text     = "Periodicals";
            this.rbnPeriodicals.UseVisualStyleBackColor = true;
            this.rbnPeriodicals.CheckedChanged         += ItemType_CheckedChanged;
            //
            // lblCollectorSearchPrompt
            //
            this.lblCollectorSearchPrompt.Anchor   = System.Windows.Forms.AnchorStyles.Right;
            this.lblCollectorSearchPrompt.AutoSize = true;
            //this.tlpCollectorsSearch.SetRowSpan(this.lblCollectorSearchPrompt, 2);
            this.lblCollectorSearchPrompt.TabIndex = 1;
            this.lblCollectorSearchPrompt.Text     = "Search:";
            //
            // txtSearchCollectorName
            //
            this.txtSearchCollectorName.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.txtSearchCollectorName.TabIndex     = 2;
            this.txtSearchCollectorName.TextChanged += Collector_SearchTextChanged;
            //
            // mtxtCollectorSearchPhoneNumber
            //
            this.mtxtCollectorSearchPhoneNumber.Anchor         = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
            this.mtxtCollectorSearchPhoneNumber.Mask           = "(000) 000-0000";
            this.mtxtCollectorSearchPhoneNumber.TabIndex       = 3;
            this.mtxtCollectorSearchPhoneNumber.Size           = new System.Drawing.Size(200, 33);
            this.mtxtCollectorSearchPhoneNumber.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;
            this.mtxtCollectorSearchPhoneNumber.TextChanged   += Collector_SearchTextChanged;
            //
            // lblCollectorSearchNamePrompt
            //
            this.lblCollectorSearchNamePrompt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                                             | System.Windows.Forms.AnchorStyles.Right)));
            this.lblCollectorSearchNamePrompt.AutoSize  = true;
            this.lblCollectorSearchNamePrompt.TabIndex  = 4;
            this.lblCollectorSearchNamePrompt.Text      = "Name";
            this.lblCollectorSearchNamePrompt.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            //
            // lblCollectorSearchPhoneNumberPrompt
            //
            this.lblCollectorSearchPhoneNumberPrompt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                                                    | System.Windows.Forms.AnchorStyles.Right)));
            this.lblCollectorSearchPhoneNumberPrompt.AutoSize  = true;
            this.lblCollectorSearchPhoneNumberPrompt.TabIndex  = 5;
            this.lblCollectorSearchPhoneNumberPrompt.Text      = "Phone Number";
            this.lblCollectorSearchPhoneNumberPrompt.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            selectedItemType = "Book";

            this.SetFontSizes(this.Controls);
        }
        private void UpdateCollectorScreen_ParentChanged(object sender, EventArgs e)
        {
            if (this.Parent != null)
            {
                MasterForm master = (this.Parent.Parent as MasterForm);
                master.AcceptButton = btnUpdate;
                master.CancelButton = (master.Controls.Find("btnBack", true)[0] as Button);

                try
                {
                    DBControlHelper.PopulateWithControls <DBTag, CheckBox>(tlpTagsBookSelection, DBTag.GetTags(), "Description", "ID", DBCollector.GetInterestsOfType((int)nudCollectorId.Value, 1));
                    DBControlHelper.PopulateWithControls <DBTag, CheckBox>(tlpTagsMapSelection, DBTag.GetTags(), "Description", "ID", DBCollector.GetInterestsOfType((int)nudCollectorId.Value, 2));
                    DBControlHelper.PopulateWithControls <DBTag, CheckBox>(tlpTagsPeriodicalSelection, DBTag.GetTags(), "Description", "ID", DBCollector.GetInterestsOfType((int)nudCollectorId.Value, 3));
                }
                catch (Exception ex)
                {
                    master.SetStatus("Error! Failed to load tags: " + ex.Message);
                }
            }
        }