Click here to Skip to main content
15,897,273 members
Articles / Desktop Programming / Windows Forms

XML Serialization and Deserialization

Rate me:
Please Sign up or sign in to vote.
3.78/5 (27 votes)
22 Apr 2008CPOL3 min read 74.6K   1.1K   33  
This is a sample Windows application on how .NET does serialization and deserialization of strongly typed custom collection, while handling derived collection items.
namespace EmployessInformation
{
    partial class FrmEmployeesInfo
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmEmployeesInfo));
            this.radBtnAddNewEmployee = new System.Windows.Forms.RadioButton();
            this.radbtnViewUpdateEmployee = new System.Windows.Forms.RadioButton();
            this.grpViewEmployeesInfo = new System.Windows.Forms.GroupBox();
            this.btnViewClientInformation = new System.Windows.Forms.Button();
            this.btnDeleteClientInformation = new System.Windows.Forms.Button();
            this.grdViewEmployeesInformation = new System.Windows.Forms.DataGridView();
            this.FirstName = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.LastName = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.WorkPhone = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.HomePhone = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.BtnExit = new System.Windows.Forms.Button();
            this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
            this.grpAddNewEmpInfo = new System.Windows.Forms.GroupBox();
            this.lblError = new System.Windows.Forms.Label();
            this.btnCancelToAddUPdateEmployeeInformation = new System.Windows.Forms.Button();
            this.bntClearEmployeeInformation = new System.Windows.Forms.Button();
            this.bntEditEmployeeInformation = new System.Windows.Forms.Button();
            this.btnSaveNewEmployeeInformation = new System.Windows.Forms.Button();
            this.txtEmpWorkPhone = new System.Windows.Forms.TextBox();
            this.txtEmpHomePhone = new System.Windows.Forms.TextBox();
            this.txtEmpZip = new System.Windows.Forms.TextBox();
            this.txtEmpCountry = new System.Windows.Forms.TextBox();
            this.txtEmpState = new System.Windows.Forms.TextBox();
            this.txtEmpCity = new System.Windows.Forms.TextBox();
            this.txtEmpAddress2 = new System.Windows.Forms.TextBox();
            this.txtEmpAddress1 = new System.Windows.Forms.TextBox();
            this.txtEmpLastName = new System.Windows.Forms.TextBox();
            this.txtEmpFirstName = new System.Windows.Forms.TextBox();
            this.lblWorkPhone = new System.Windows.Forms.Label();
            this.lblHomePhone = new System.Windows.Forms.Label();
            this.lblZip = new System.Windows.Forms.Label();
            this.lblCountry = new System.Windows.Forms.Label();
            this.lblState = new System.Windows.Forms.Label();
            this.lblCity = new System.Windows.Forms.Label();
            this.lblAddress2 = new System.Windows.Forms.Label();
            this.lblAddress1 = new System.Windows.Forms.Label();
            this.lblLastName = new System.Windows.Forms.Label();
            this.lblFirstName = new System.Windows.Forms.Label();
            this.grpViewEmployeesInfo.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.grdViewEmployeesInformation)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
            this.grpAddNewEmpInfo.SuspendLayout();
            this.SuspendLayout();
            // 
            // radBtnAddNewEmployee
            // 
            this.radBtnAddNewEmployee.AutoSize = true;
            this.radBtnAddNewEmployee.CausesValidation = false;
            this.radBtnAddNewEmployee.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.radBtnAddNewEmployee.ForeColor = System.Drawing.Color.Firebrick;
            this.radBtnAddNewEmployee.Location = new System.Drawing.Point(297, 12);
            this.radBtnAddNewEmployee.Name = "radBtnAddNewEmployee";
            this.radBtnAddNewEmployee.Size = new System.Drawing.Size(134, 17);
            this.radBtnAddNewEmployee.TabIndex = 7;
            this.radBtnAddNewEmployee.TabStop = true;
            this.radBtnAddNewEmployee.Text = "Add New Employee";
            this.radBtnAddNewEmployee.UseVisualStyleBackColor = true;
            this.radBtnAddNewEmployee.CheckedChanged += new System.EventHandler(this.radBtnAddNewEmployee_CheckedChanged);
            // 
            // radbtnViewUpdateEmployee
            // 
            this.radbtnViewUpdateEmployee.AutoSize = true;
            this.radbtnViewUpdateEmployee.CausesValidation = false;
            this.radbtnViewUpdateEmployee.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.radbtnViewUpdateEmployee.ForeColor = System.Drawing.Color.Firebrick;
            this.radbtnViewUpdateEmployee.Location = new System.Drawing.Point(40, 12);
            this.radbtnViewUpdateEmployee.Name = "radbtnViewUpdateEmployee";
            this.radbtnViewUpdateEmployee.Size = new System.Drawing.Size(187, 17);
            this.radbtnViewUpdateEmployee.TabIndex = 6;
            this.radbtnViewUpdateEmployee.TabStop = true;
            this.radbtnViewUpdateEmployee.Text = "View  Employees Information";
            this.radbtnViewUpdateEmployee.UseVisualStyleBackColor = true;
            this.radbtnViewUpdateEmployee.CheckedChanged += new System.EventHandler(this.radbtnViewUpdateEmployee_CheckedChanged);
            // 
            // grpViewEmployeesInfo
            // 
            this.grpViewEmployeesInfo.BackColor = System.Drawing.Color.Silver;
            this.grpViewEmployeesInfo.Controls.Add(this.btnViewClientInformation);
            this.grpViewEmployeesInfo.Controls.Add(this.btnDeleteClientInformation);
            this.grpViewEmployeesInfo.Controls.Add(this.grdViewEmployeesInformation);
            this.grpViewEmployeesInfo.Location = new System.Drawing.Point(25, 49);
            this.grpViewEmployeesInfo.Name = "grpViewEmployeesInfo";
            this.grpViewEmployeesInfo.Size = new System.Drawing.Size(520, 395);
            this.grpViewEmployeesInfo.TabIndex = 9;
            this.grpViewEmployeesInfo.TabStop = false;
            this.grpViewEmployeesInfo.Visible = false;
            // 
            // btnViewClientInformation
            // 
            this.btnViewClientInformation.BackColor = System.Drawing.SystemColors.ButtonFace;
            this.btnViewClientInformation.Location = new System.Drawing.Point(98, 263);
            this.btnViewClientInformation.Name = "btnViewClientInformation";
            this.btnViewClientInformation.Size = new System.Drawing.Size(75, 23);
            this.btnViewClientInformation.TabIndex = 9;
            this.btnViewClientInformation.Text = "View";
            this.btnViewClientInformation.UseVisualStyleBackColor = false;
            this.btnViewClientInformation.Click += new System.EventHandler(this.btnViewEmployeeInformation_Click);
            // 
            // btnDeleteClientInformation
            // 
            this.btnDeleteClientInformation.BackColor = System.Drawing.SystemColors.ButtonFace;
            this.btnDeleteClientInformation.Location = new System.Drawing.Point(17, 263);
            this.btnDeleteClientInformation.Name = "btnDeleteClientInformation";
            this.btnDeleteClientInformation.Size = new System.Drawing.Size(75, 23);
            this.btnDeleteClientInformation.TabIndex = 8;
            this.btnDeleteClientInformation.Text = "Delete";
            this.btnDeleteClientInformation.UseVisualStyleBackColor = false;
            this.btnDeleteClientInformation.Click += new System.EventHandler(this.btnDeleteEmployeeInformation_Click);
            // 
            // grdViewEmployeesInformation
            // 
            this.grdViewEmployeesInformation.AllowDrop = true;
            this.grdViewEmployeesInformation.AllowUserToAddRows = false;
            this.grdViewEmployeesInformation.AllowUserToDeleteRows = false;
            this.grdViewEmployeesInformation.AllowUserToResizeColumns = false;
            this.grdViewEmployeesInformation.AllowUserToResizeRows = false;
            dataGridViewCellStyle1.BackColor = System.Drawing.Color.LightCyan;
            dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Maroon;
            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.Gray;
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black;
            this.grdViewEmployeesInformation.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
            this.grdViewEmployeesInformation.BackgroundColor = System.Drawing.SystemColors.ButtonHighlight;
            this.grdViewEmployeesInformation.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
            this.grdViewEmployeesInformation.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle2.BackColor = System.Drawing.Color.DarkSlateGray;
            dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.GradientActiveCaption;
            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.grdViewEmployeesInformation.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
            this.grdViewEmployeesInformation.ColumnHeadersHeight = 30;
            this.grdViewEmployeesInformation.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            this.grdViewEmployeesInformation.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.FirstName,
            this.LastName,
            this.WorkPhone,
            this.HomePhone});
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.InactiveCaption;
            dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.Maroon;
            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlLightLight;
            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
            this.grdViewEmployeesInformation.DefaultCellStyle = dataGridViewCellStyle3;
            this.grdViewEmployeesInformation.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
            this.grdViewEmployeesInformation.EnableHeadersVisualStyles = false;
            this.grdViewEmployeesInformation.GridColor = System.Drawing.SystemColors.ControlLightLight;
            this.grdViewEmployeesInformation.Location = new System.Drawing.Point(6, 31);
            this.grdViewEmployeesInformation.MultiSelect = false;
            this.grdViewEmployeesInformation.Name = "grdViewEmployeesInformation";
            this.grdViewEmployeesInformation.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.HotTrack;
            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.ButtonFace;
            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ButtonHighlight;
            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.grdViewEmployeesInformation.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
            this.grdViewEmployeesInformation.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToFirstHeader;
            this.grdViewEmployeesInformation.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            this.grdViewEmployeesInformation.Size = new System.Drawing.Size(499, 210);
            this.grdViewEmployeesInformation.TabIndex = 7;
            // 
            // FirstName
            // 
            this.FirstName.HeaderText = "First Name";
            this.FirstName.Name = "FirstName";
            this.FirstName.Width = 120;
            // 
            // LastName
            // 
            this.LastName.HeaderText = "LastName";
            this.LastName.Name = "LastName";
            this.LastName.Width = 120;
            // 
            // WorkPhone
            // 
            this.WorkPhone.HeaderText = "Work Phone";
            this.WorkPhone.Name = "WorkPhone";
            this.WorkPhone.Width = 120;
            // 
            // HomePhone
            // 
            this.HomePhone.HeaderText = "HomePhone";
            this.HomePhone.Name = "HomePhone";
            this.HomePhone.Width = 120;
            // 
            // BtnExit
            // 
            this.BtnExit.BackColor = System.Drawing.SystemColors.ButtonFace;
            this.BtnExit.Location = new System.Drawing.Point(174, 421);
            this.BtnExit.Name = "BtnExit";
            this.BtnExit.Size = new System.Drawing.Size(75, 23);
            this.BtnExit.TabIndex = 11;
            this.BtnExit.Text = "Exit";
            this.BtnExit.UseVisualStyleBackColor = false;
            this.BtnExit.Click += new System.EventHandler(this.BtnExit_Click);
            // 
            // errorProvider
            // 
            this.errorProvider.ContainerControl = this;
            // 
            // grpAddNewEmpInfo
            // 
            this.grpAddNewEmpInfo.BackColor = System.Drawing.Color.Silver;
            this.grpAddNewEmpInfo.Controls.Add(this.lblError);
            this.grpAddNewEmpInfo.Controls.Add(this.btnCancelToAddUPdateEmployeeInformation);
            this.grpAddNewEmpInfo.Controls.Add(this.bntClearEmployeeInformation);
            this.grpAddNewEmpInfo.Controls.Add(this.bntEditEmployeeInformation);
            this.grpAddNewEmpInfo.Controls.Add(this.btnSaveNewEmployeeInformation);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpWorkPhone);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpHomePhone);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpZip);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpCountry);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpState);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpCity);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpAddress2);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpAddress1);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpLastName);
            this.grpAddNewEmpInfo.Controls.Add(this.txtEmpFirstName);
            this.grpAddNewEmpInfo.Controls.Add(this.lblWorkPhone);
            this.grpAddNewEmpInfo.Controls.Add(this.lblHomePhone);
            this.grpAddNewEmpInfo.Controls.Add(this.lblZip);
            this.grpAddNewEmpInfo.Controls.Add(this.lblCountry);
            this.grpAddNewEmpInfo.Controls.Add(this.lblState);
            this.grpAddNewEmpInfo.Controls.Add(this.lblCity);
            this.grpAddNewEmpInfo.Controls.Add(this.lblAddress2);
            this.grpAddNewEmpInfo.Controls.Add(this.lblAddress1);
            this.grpAddNewEmpInfo.Controls.Add(this.lblLastName);
            this.grpAddNewEmpInfo.Controls.Add(this.lblFirstName);
            this.grpAddNewEmpInfo.Location = new System.Drawing.Point(25, 49);
            this.grpAddNewEmpInfo.Name = "grpAddNewEmpInfo";
            this.grpAddNewEmpInfo.Size = new System.Drawing.Size(526, 354);
            this.grpAddNewEmpInfo.TabIndex = 11;
            this.grpAddNewEmpInfo.TabStop = false;
            // 
            // lblError
            // 
            this.lblError.AutoSize = true;
            this.lblError.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblError.ForeColor = System.Drawing.Color.Red;
            this.lblError.Location = new System.Drawing.Point(6, 19);
            this.lblError.Name = "lblError";
            this.lblError.Size = new System.Drawing.Size(0, 13);
            this.lblError.TabIndex = 66;
            // 
            // btnCancelToAddUPdateEmployeeInformation
            // 
            this.btnCancelToAddUPdateEmployeeInformation.BackColor = System.Drawing.SystemColors.ButtonFace;
            this.btnCancelToAddUPdateEmployeeInformation.Location = new System.Drawing.Point(280, 301);
            this.btnCancelToAddUPdateEmployeeInformation.Name = "btnCancelToAddUPdateEmployeeInformation";
            this.btnCancelToAddUPdateEmployeeInformation.Size = new System.Drawing.Size(75, 23);
            this.btnCancelToAddUPdateEmployeeInformation.TabIndex = 64;
            this.btnCancelToAddUPdateEmployeeInformation.Text = "Cancel";
            this.btnCancelToAddUPdateEmployeeInformation.UseVisualStyleBackColor = false;
            this.btnCancelToAddUPdateEmployeeInformation.Click += new System.EventHandler(this.btnCancelToAddUPdateEmployeeInformation_Click);
            // 
            // bntClearEmployeeInformation
            // 
            this.bntClearEmployeeInformation.BackColor = System.Drawing.SystemColors.ButtonFace;
            this.bntClearEmployeeInformation.Location = new System.Drawing.Point(357, 301);
            this.bntClearEmployeeInformation.Name = "bntClearEmployeeInformation";
            this.bntClearEmployeeInformation.Size = new System.Drawing.Size(75, 23);
            this.bntClearEmployeeInformation.TabIndex = 63;
            this.bntClearEmployeeInformation.Text = "Clear";
            this.bntClearEmployeeInformation.UseVisualStyleBackColor = false;
            this.bntClearEmployeeInformation.Visible = false;
            this.bntClearEmployeeInformation.Click += new System.EventHandler(this.bntClearEmployeeInformation_Click);
            // 
            // bntEditEmployeeInformation
            // 
            this.bntEditEmployeeInformation.BackColor = System.Drawing.SystemColors.ButtonFace;
            this.bntEditEmployeeInformation.Location = new System.Drawing.Point(120, 301);
            this.bntEditEmployeeInformation.Name = "bntEditEmployeeInformation";
            this.bntEditEmployeeInformation.Size = new System.Drawing.Size(75, 23);
            this.bntEditEmployeeInformation.TabIndex = 62;
            this.bntEditEmployeeInformation.Text = "Edit";
            this.bntEditEmployeeInformation.UseVisualStyleBackColor = false;
            this.bntEditEmployeeInformation.Click += new System.EventHandler(this.bntEditEmployeeInformation_Click);
            // 
            // btnSaveNewEmployeeInformation
            // 
            this.btnSaveNewEmployeeInformation.BackColor = System.Drawing.SystemColors.ButtonFace;
            this.btnSaveNewEmployeeInformation.Location = new System.Drawing.Point(201, 301);
            this.btnSaveNewEmployeeInformation.Name = "btnSaveNewEmployeeInformation";
            this.btnSaveNewEmployeeInformation.Size = new System.Drawing.Size(75, 23);
            this.btnSaveNewEmployeeInformation.TabIndex = 61;
            this.btnSaveNewEmployeeInformation.Text = "Save";
            this.btnSaveNewEmployeeInformation.UseVisualStyleBackColor = false;
            this.btnSaveNewEmployeeInformation.Visible = false;
            this.btnSaveNewEmployeeInformation.Click += new System.EventHandler(this.btnSaveNewEmployeeORUpdateEmployeeInformation_Click);
            // 
            // txtEmpWorkPhone
            // 
            this.txtEmpWorkPhone.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpWorkPhone.Location = new System.Drawing.Point(171, 230);
            this.txtEmpWorkPhone.MaxLength = 50;
            this.txtEmpWorkPhone.Name = "txtEmpWorkPhone";
            this.txtEmpWorkPhone.Size = new System.Drawing.Size(188, 20);
            this.txtEmpWorkPhone.TabIndex = 56;
            // 
            // txtEmpHomePhone
            // 
            this.txtEmpHomePhone.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpHomePhone.Location = new System.Drawing.Point(171, 210);
            this.txtEmpHomePhone.MaxLength = 50;
            this.txtEmpHomePhone.Name = "txtEmpHomePhone";
            this.txtEmpHomePhone.Size = new System.Drawing.Size(188, 20);
            this.txtEmpHomePhone.TabIndex = 55;
            // 
            // txtEmpZip
            // 
            this.txtEmpZip.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpZip.Location = new System.Drawing.Point(171, 189);
            this.txtEmpZip.MaxLength = 50;
            this.txtEmpZip.Name = "txtEmpZip";
            this.txtEmpZip.Size = new System.Drawing.Size(188, 20);
            this.txtEmpZip.TabIndex = 54;
            // 
            // txtEmpCountry
            // 
            this.txtEmpCountry.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpCountry.Location = new System.Drawing.Point(171, 171);
            this.txtEmpCountry.MaxLength = 50;
            this.txtEmpCountry.Name = "txtEmpCountry";
            this.txtEmpCountry.Size = new System.Drawing.Size(188, 20);
            this.txtEmpCountry.TabIndex = 53;
            // 
            // txtEmpState
            // 
            this.txtEmpState.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpState.Location = new System.Drawing.Point(171, 150);
            this.txtEmpState.MaxLength = 10;
            this.txtEmpState.Name = "txtEmpState";
            this.txtEmpState.Size = new System.Drawing.Size(188, 20);
            this.txtEmpState.TabIndex = 52;
            // 
            // txtEmpCity
            // 
            this.txtEmpCity.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpCity.Location = new System.Drawing.Point(171, 132);
            this.txtEmpCity.MaxLength = 10;
            this.txtEmpCity.Name = "txtEmpCity";
            this.txtEmpCity.Size = new System.Drawing.Size(188, 20);
            this.txtEmpCity.TabIndex = 51;
            // 
            // txtEmpAddress2
            // 
            this.txtEmpAddress2.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpAddress2.Location = new System.Drawing.Point(171, 111);
            this.txtEmpAddress2.MaxLength = 50;
            this.txtEmpAddress2.Name = "txtEmpAddress2";
            this.txtEmpAddress2.Size = new System.Drawing.Size(188, 20);
            this.txtEmpAddress2.TabIndex = 50;
            // 
            // txtEmpAddress1
            // 
            this.txtEmpAddress1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpAddress1.Location = new System.Drawing.Point(171, 93);
            this.txtEmpAddress1.MaxLength = 50;
            this.txtEmpAddress1.Name = "txtEmpAddress1";
            this.txtEmpAddress1.Size = new System.Drawing.Size(188, 20);
            this.txtEmpAddress1.TabIndex = 49;
            // 
            // txtEmpLastName
            // 
            this.txtEmpLastName.AcceptsReturn = true;
            this.txtEmpLastName.AcceptsTab = true;
            this.txtEmpLastName.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpLastName.Location = new System.Drawing.Point(171, 72);
            this.txtEmpLastName.MaxLength = 50;
            this.txtEmpLastName.Name = "txtEmpLastName";
            this.txtEmpLastName.Size = new System.Drawing.Size(188, 20);
            this.txtEmpLastName.TabIndex = 48;
            // 
            // txtEmpFirstName
            // 
            this.txtEmpFirstName.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.txtEmpFirstName.Location = new System.Drawing.Point(171, 54);
            this.txtEmpFirstName.MaxLength = 50;
            this.txtEmpFirstName.Name = "txtEmpFirstName";
            this.txtEmpFirstName.Size = new System.Drawing.Size(188, 20);
            this.txtEmpFirstName.TabIndex = 47;
            // 
            // lblWorkPhone
            // 
            this.lblWorkPhone.AutoSize = true;
            this.lblWorkPhone.Location = new System.Drawing.Point(98, 233);
            this.lblWorkPhone.Name = "lblWorkPhone";
            this.lblWorkPhone.Size = new System.Drawing.Size(67, 13);
            this.lblWorkPhone.TabIndex = 43;
            this.lblWorkPhone.Text = "Work Phone";
            // 
            // lblHomePhone
            // 
            this.lblHomePhone.AutoSize = true;
            this.lblHomePhone.Location = new System.Drawing.Point(98, 213);
            this.lblHomePhone.Name = "lblHomePhone";
            this.lblHomePhone.Size = new System.Drawing.Size(69, 13);
            this.lblHomePhone.TabIndex = 42;
            this.lblHomePhone.Text = "Home Phone";
            // 
            // lblZip
            // 
            this.lblZip.AutoSize = true;
            this.lblZip.Location = new System.Drawing.Point(81, 192);
            this.lblZip.Name = "lblZip";
            this.lblZip.Size = new System.Drawing.Size(84, 13);
            this.lblZip.TabIndex = 41;
            this.lblZip.Text = "Zip/Postal Code";
            // 
            // lblCountry
            // 
            this.lblCountry.AutoSize = true;
            this.lblCountry.Location = new System.Drawing.Point(117, 174);
            this.lblCountry.Name = "lblCountry";
            this.lblCountry.Size = new System.Drawing.Size(43, 13);
            this.lblCountry.TabIndex = 40;
            this.lblCountry.Text = "Country";
            // 
            // lblState
            // 
            this.lblState.AutoSize = true;
            this.lblState.Location = new System.Drawing.Point(128, 153);
            this.lblState.Name = "lblState";
            this.lblState.Size = new System.Drawing.Size(32, 13);
            this.lblState.TabIndex = 39;
            this.lblState.Text = "State";
            // 
            // lblCity
            // 
            this.lblCity.AutoSize = true;
            this.lblCity.Location = new System.Drawing.Point(136, 135);
            this.lblCity.Name = "lblCity";
            this.lblCity.Size = new System.Drawing.Size(24, 13);
            this.lblCity.TabIndex = 38;
            this.lblCity.Text = "City";
            // 
            // lblAddress2
            // 
            this.lblAddress2.AutoSize = true;
            this.lblAddress2.Location = new System.Drawing.Point(109, 114);
            this.lblAddress2.Name = "lblAddress2";
            this.lblAddress2.Size = new System.Drawing.Size(51, 13);
            this.lblAddress2.TabIndex = 37;
            this.lblAddress2.Text = "Address2";
            // 
            // lblAddress1
            // 
            this.lblAddress1.AutoSize = true;
            this.lblAddress1.Location = new System.Drawing.Point(109, 96);
            this.lblAddress1.Name = "lblAddress1";
            this.lblAddress1.Size = new System.Drawing.Size(51, 13);
            this.lblAddress1.TabIndex = 36;
            this.lblAddress1.Text = "Address1";
            // 
            // lblLastName
            // 
            this.lblLastName.AutoSize = true;
            this.lblLastName.Location = new System.Drawing.Point(102, 75);
            this.lblLastName.Name = "lblLastName";
            this.lblLastName.Size = new System.Drawing.Size(58, 13);
            this.lblLastName.TabIndex = 35;
            this.lblLastName.Text = "Last Name";
            // 
            // lblFirstName
            // 
            this.lblFirstName.AutoSize = true;
            this.lblFirstName.Location = new System.Drawing.Point(103, 57);
            this.lblFirstName.Name = "lblFirstName";
            this.lblFirstName.Size = new System.Drawing.Size(57, 13);
            this.lblFirstName.TabIndex = 34;
            this.lblFirstName.Text = "First Name";
            // 
            // FrmEmployeesInfo
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.Silver;
            this.ClientSize = new System.Drawing.Size(572, 479);
            this.Controls.Add(this.grpAddNewEmpInfo);
            this.Controls.Add(this.BtnExit);
            this.Controls.Add(this.grpViewEmployeesInfo);
            this.Controls.Add(this.radBtnAddNewEmployee);
            this.Controls.Add(this.radbtnViewUpdateEmployee);
            this.ForeColor = System.Drawing.Color.Maroon;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximumSize = new System.Drawing.Size(580, 513);
            this.MinimumSize = new System.Drawing.Size(570, 513);
            this.Name = "FrmEmployeesInfo";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Employees Information Demo";
            this.grpViewEmployeesInfo.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.grdViewEmployeesInformation)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
            this.grpAddNewEmpInfo.ResumeLayout(false);
            this.grpAddNewEmpInfo.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion
        #region controls

        private System.Windows.Forms.RadioButton radBtnAddNewEmployee;
        private System.Windows.Forms.RadioButton radbtnViewUpdateEmployee;
        private System.Windows.Forms.GroupBox grpViewEmployeesInfo;
        private System.Windows.Forms.Button btnViewClientInformation;
        private System.Windows.Forms.Button btnDeleteClientInformation;
        private System.Windows.Forms.DataGridView grdViewEmployeesInformation;
        private System.Windows.Forms.Button BtnExit;
        private System.Windows.Forms.ErrorProvider errorProvider;
        #endregion
        private System.Windows.Forms.GroupBox grpAddNewEmpInfo;
        private System.Windows.Forms.Label lblError;
        private System.Windows.Forms.Button btnCancelToAddUPdateEmployeeInformation;
        private System.Windows.Forms.Button bntClearEmployeeInformation;
        private System.Windows.Forms.Button bntEditEmployeeInformation;
        private System.Windows.Forms.Button btnSaveNewEmployeeInformation;
        public System.Windows.Forms.TextBox txtEmpWorkPhone;
        public System.Windows.Forms.TextBox txtEmpHomePhone;
        public System.Windows.Forms.TextBox txtEmpZip;
        public System.Windows.Forms.TextBox txtEmpCountry;
        public System.Windows.Forms.TextBox txtEmpState;
        public System.Windows.Forms.TextBox txtEmpCity;
        public System.Windows.Forms.TextBox txtEmpAddress2;
        public System.Windows.Forms.TextBox txtEmpAddress1;
        public System.Windows.Forms.TextBox txtEmpLastName;
        public System.Windows.Forms.TextBox txtEmpFirstName;
        private System.Windows.Forms.Label lblWorkPhone;
        private System.Windows.Forms.Label lblHomePhone;
        private System.Windows.Forms.Label lblZip;
        private System.Windows.Forms.Label lblCountry;
        private System.Windows.Forms.Label lblState;
        private System.Windows.Forms.Label lblCity;
        private System.Windows.Forms.Label lblAddress2;
        private System.Windows.Forms.Label lblAddress1;
        private System.Windows.Forms.Label lblLastName;
        private System.Windows.Forms.Label lblFirstName;
        private System.Windows.Forms.DataGridViewTextBoxColumn FirstName;
        private System.Windows.Forms.DataGridViewTextBoxColumn LastName;
        private System.Windows.Forms.DataGridViewTextBoxColumn WorkPhone;
        private System.Windows.Forms.DataGridViewTextBoxColumn HomePhone;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer IBM
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions