Exemple #1
0
        public NewVersionCustomers(ExistingVersions m, NewVersionPage nvp)
        {
            InitializeComponent();
            mainMenu    = m;
            versionPage = nvp;

            CustomersGrid.Columns.Clear();
            DataGridViewTextBoxColumn  csPK          = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csName        = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csVersionPK   = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csVersionID   = new DataGridViewTextBoxColumn();
            DataGridViewCheckBoxColumn csSelected    = new DataGridViewCheckBoxColumn();
            DataGridViewTextBoxColumn  csPLC         = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csContacts    = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csLogonDetail = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csDetail      = new DataGridViewTextBoxColumn();

            csSelected.Name       = "Selected";
            csSelected.HeaderText = "Selected";
            CustomersGrid.Columns.Add(csSelected);

            csName.DataPropertyName = "Name";
            csName.HeaderText       = "Name";
            CustomersGrid.Columns.Add(csName);

            csVersionID.DataPropertyName = "VersionID";
            csVersionID.HeaderText       = "Current Version";
            CustomersGrid.Columns.Add(csVersionID);

            csVersionPK.DataPropertyName = "VersionPK";
            csVersionPK.HeaderText       = "Version PK";
            csVersionPK.Visible          = false;
            CustomersGrid.Columns.Add(csVersionPK);

            csPK.DataPropertyName = "PK";
            csPK.HeaderText       = "PK";
            csPK.Name             = "PK";
            csPK.Visible          = false;
            CustomersGrid.Columns.Add(csPK);

            csDetail.DataPropertyName = "Details";
            csDetail.Visible          = false;
            CustomersGrid.Columns.Add(csDetail);

            csPLC.Name             = "PLC";
            csPLC.DataPropertyName = "PLC";
            csPLC.HeaderText       = "PLC";
            csPLC.Visible          = false;
            CustomersGrid.Columns.Add(csPLC);

            csContacts.Name             = "Contacts";
            csContacts.DataPropertyName = "Contacts";
            csContacts.HeaderText       = "Contacts";
            csContacts.Visible          = false;
            CustomersGrid.Columns.Add(csContacts);

            csLogonDetail.Name             = "LogonDetail";
            csLogonDetail.DataPropertyName = "LogonDetails";
            csLogonDetail.HeaderText       = "Logon Details";
            csLogonDetail.Visible          = false;
            CustomersGrid.Columns.Add(csLogonDetail);

            foreach (DataGridViewColumn dc in CustomersGrid.Columns)
            {
                if (dc.Index.Equals(0))
                {
                    dc.ReadOnly = false;
                }
                else
                {
                    dc.ReadOnly = true;
                }
            }
        }
Exemple #2
0
 public EditVersion(ExistingVersions ev)
 {
     InitializeComponent();
     versionsPage = ev;
     typeCmboBx.DataSource = Enum.GetValues(typeof(Version.TypeEnum));
 }
Exemple #3
0
 public EditVersion(ExistingVersions ev)
 {
     InitializeComponent();
     versionsPage          = ev;
     typeCmboBx.DataSource = Enum.GetValues(typeof(Version.TypeEnum));
 }
        public NewVersionCustomers(ExistingVersions m, NewVersionPage nvp)
        {
            InitializeComponent();
            mainMenu = m;
            versionPage = nvp;

            CustomersGrid.Columns.Clear();
            DataGridViewTextBoxColumn csPK = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csName = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csVersionPK = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csVersionID = new DataGridViewTextBoxColumn();
            DataGridViewCheckBoxColumn csSelected = new DataGridViewCheckBoxColumn();
            DataGridViewTextBoxColumn csPLC = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csContacts = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csLogonDetail = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csDetail = new DataGridViewTextBoxColumn();

            csSelected.Name = "Selected";
            csSelected.HeaderText = "Selected";
            CustomersGrid.Columns.Add(csSelected);

            csName.DataPropertyName = "Name";
            csName.HeaderText = "Name";
            CustomersGrid.Columns.Add(csName);

            csVersionID.DataPropertyName = "VersionID";
            csVersionID.HeaderText = "Current Version";
            CustomersGrid.Columns.Add(csVersionID);

            csVersionPK.DataPropertyName = "VersionPK";
            csVersionPK.HeaderText = "Version PK";
            csVersionPK.Visible = false;
            CustomersGrid.Columns.Add(csVersionPK);

            csPK.DataPropertyName = "PK";
            csPK.HeaderText = "PK";
            csPK.Name = "PK";
            csPK.Visible = false;
            CustomersGrid.Columns.Add(csPK);

            csDetail.DataPropertyName = "Details";
            csDetail.Visible = false;
            CustomersGrid.Columns.Add(csDetail);

            csPLC.Name = "PLC";
            csPLC.DataPropertyName = "PLC";
            csPLC.HeaderText = "PLC";
            csPLC.Visible = false;
            CustomersGrid.Columns.Add(csPLC);

            csContacts.Name = "Contacts";
            csContacts.DataPropertyName = "Contacts";
            csContacts.HeaderText = "Contacts";
            csContacts.Visible = false;
            CustomersGrid.Columns.Add(csContacts);

            csLogonDetail.Name = "LogonDetail";
            csLogonDetail.DataPropertyName = "LogonDetails";
            csLogonDetail.HeaderText = "Logon Details";
            csLogonDetail.Visible = false;
            CustomersGrid.Columns.Add(csLogonDetail);

            foreach (DataGridViewColumn dc in CustomersGrid.Columns)
            {
                if (dc.Index.Equals(0))
                {
                    dc.ReadOnly = false;
                }
                else
                {
                    dc.ReadOnly = true;
                }
            }
        }