Exemple #1
0
        public ExistingUpdates(MainMenu m)
        {
            InitializeComponent();
            mainMenu = m;

            inspectUpdate = new InspectUpdate(this);
            editUpdate    = new EditUpdate(this);

            UpdatesGrid.Columns.Clear();
            DataGridViewTextBoxColumn  csPK             = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csCustomerPK     = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csVersionPK      = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csCustomerName   = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csVersionID      = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csEmployee       = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csVersionExpDate = new DataGridViewTextBoxColumn();
            DataGridViewCheckBoxColumn csDeleted        = new DataGridViewCheckBoxColumn();
            DataGridViewTextBoxColumn  csComment        = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn  csContactedDate  = new DataGridViewTextBoxColumn();
            DataGridViewCheckBoxColumn csContacted      = new DataGridViewCheckBoxColumn();
            DataGridViewTextBoxColumn  csVersionActDate = new DataGridViewTextBoxColumn();

            csDone = new DataGridViewCheckBoxColumn();

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

            csCustomerPK.Name             = "CustomerPK";
            csCustomerPK.DataPropertyName = "CustomerPK";
            csCustomerPK.HeaderText       = "Customer PK";
            csCustomerPK.Visible          = false;
            UpdatesGrid.Columns.Add(csCustomerPK);

            csCustomerName.Name             = "CustomerName";
            csCustomerName.DataPropertyName = "CustomerName";
            csCustomerName.HeaderText       = "Customer Name";
            UpdatesGrid.Columns.Add(csCustomerName);

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

            csVersionID.Name             = "VersionID";
            csVersionID.DataPropertyName = "VersionID";
            csVersionID.HeaderText       = "Version";
            UpdatesGrid.Columns.Add(csVersionID);

            csVersionExpDate.Name             = "ExpectedDate";
            csVersionExpDate.DataPropertyName = "ExpectedDate";
            csVersionExpDate.HeaderText       = "Expected Date";
            UpdatesGrid.Columns.Add(csVersionExpDate);

            csComment.Name             = "Comment";
            csComment.DataPropertyName = "Comment";
            csComment.Visible          = false;
            UpdatesGrid.Columns.Add(csComment);

            csDeleted.Name             = "isDeleted";
            csDeleted.DataPropertyName = "isDeleted";
            csDeleted.HeaderText       = "Deleted";
            csDeleted.Visible          = false;
            UpdatesGrid.Columns.Add(csDeleted);

            csEmployee.Name             = "AssignedTo";
            csEmployee.HeaderText       = "Assigned To";
            csEmployee.DataPropertyName = "Employee";
            csEmployee.Visible          = false;
            UpdatesGrid.Columns.Add(csEmployee);

            csContactedDate.Name             = "ContactedDate";
            csContactedDate.DataPropertyName = "ContactedDate";
            csContactedDate.HeaderText       = "Contacted Date";
            UpdatesGrid.Columns.Add(csContactedDate);

            csContacted.Name             = "Contacted";
            csContacted.HeaderText       = "Has Been Contacted";
            csContacted.DataPropertyName = "Contacted";
            UpdatesGrid.Columns.Add(csContacted);

            csVersionActDate.Name             = "ActualDate";
            csVersionActDate.DataPropertyName = "ActualDate";
            csVersionActDate.HeaderText       = "Actual Date";
            UpdatesGrid.Columns.Add(csVersionActDate);

            csDone.Name             = "isDone";
            csDone.HeaderText       = "Done";
            csDone.DataPropertyName = "Done";
            UpdatesGrid.Columns.Add(csDone);

            foreach (DataGridViewColumn dc in UpdatesGrid.Columns)
            {
                if (dc.Index.Equals(10) || dc.Index.Equals(12))
                {
                    dc.ReadOnly = false;
                }
                else
                {
                    dc.ReadOnly = true;
                }
            }
        }
        public ExistingUpdates(MainMenu m)
        {
            InitializeComponent();
            mainMenu = m;

            inspectUpdate = new InspectUpdate(this);
            editUpdate = new EditUpdate(this);

            UpdatesGrid.Columns.Clear();
            DataGridViewTextBoxColumn csPK = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csCustomerPK = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csVersionPK = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csCustomerName = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csVersionID = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csEmployee = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csVersionExpDate = new DataGridViewTextBoxColumn();
            DataGridViewCheckBoxColumn csDeleted = new DataGridViewCheckBoxColumn();
            DataGridViewTextBoxColumn csComment = new DataGridViewTextBoxColumn();
            DataGridViewTextBoxColumn csContactedDate = new DataGridViewTextBoxColumn();
            DataGridViewCheckBoxColumn csContacted = new DataGridViewCheckBoxColumn();
            DataGridViewTextBoxColumn csVersionActDate = new DataGridViewTextBoxColumn();
            csDone = new DataGridViewCheckBoxColumn();

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

            csCustomerPK.Name = "CustomerPK";
            csCustomerPK.DataPropertyName = "CustomerPK";
            csCustomerPK.HeaderText = "Customer PK";
            csCustomerPK.Visible = false;
            UpdatesGrid.Columns.Add(csCustomerPK);

            csCustomerName.Name = "CustomerName";
            csCustomerName.DataPropertyName = "CustomerName";
            csCustomerName.HeaderText = "Customer Name";
            UpdatesGrid.Columns.Add(csCustomerName);

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

            csVersionID.Name = "VersionID";
            csVersionID.DataPropertyName = "VersionID";
            csVersionID.HeaderText = "Version";
            UpdatesGrid.Columns.Add(csVersionID);

            csVersionExpDate.Name = "ExpectedDate";
            csVersionExpDate.DataPropertyName = "ExpectedDate";
            csVersionExpDate.HeaderText = "Expected Date";
            UpdatesGrid.Columns.Add(csVersionExpDate);

            csComment.Name = "Comment";
            csComment.DataPropertyName = "Comment";
            csComment.Visible = false;
            UpdatesGrid.Columns.Add(csComment);

            csDeleted.Name = "isDeleted";
            csDeleted.DataPropertyName = "isDeleted";
            csDeleted.HeaderText = "Deleted";
            csDeleted.Visible = false;
            UpdatesGrid.Columns.Add(csDeleted);

            csEmployee.Name = "AssignedTo";
            csEmployee.HeaderText = "Assigned To";
            csEmployee.DataPropertyName = "Employee";
            csEmployee.Visible = false;
            UpdatesGrid.Columns.Add(csEmployee);

            csContactedDate.Name = "ContactedDate";
            csContactedDate.DataPropertyName = "ContactedDate";
            csContactedDate.HeaderText = "Contacted Date";
            UpdatesGrid.Columns.Add(csContactedDate);

            csContacted.Name = "Contacted";
            csContacted.HeaderText = "Has Been Contacted";
            csContacted.DataPropertyName = "Contacted";
            UpdatesGrid.Columns.Add(csContacted);

            csVersionActDate.Name = "ActualDate";
            csVersionActDate.DataPropertyName = "ActualDate";
            csVersionActDate.HeaderText = "Actual Date";
            UpdatesGrid.Columns.Add(csVersionActDate);

            csDone.Name = "isDone";
            csDone.HeaderText = "Done";
            csDone.DataPropertyName = "Done";
            UpdatesGrid.Columns.Add(csDone);

            foreach (DataGridViewColumn dc in UpdatesGrid.Columns)
            {
                if (dc.Index.Equals(10) || dc.Index.Equals(12))
                {
                    dc.ReadOnly = false;
                }
                else
                {
                    dc.ReadOnly = true;
                }
            }
        }