Example #1
0
        private void EditItem()
        {
            int row = partnumber_grid.CurrentCellAddress.Y;

            string partnumber = partnumber_grid.CurrentRow.Cells["number"].Value.ToString();

            string author = partnumber_grid.CurrentRow.Cells["author"].Value.ToString();

            string created = partnumber_grid.CurrentRow.Cells["effective_date"].Value.ToString();

            string obsoleted = partnumber_grid.CurrentRow.Cells["obsolete"].Value.ToString();

            string base_num = partnumber_grid.CurrentRow.Cells["base_number"].Value.ToString();

            string desc = partnumber_grid.CurrentRow.Cells["description"].Value.ToString();

            Edit_Part EP = new Edit_Part(partnumber, author, created, obsoleted, base_num, desc);

            EP.ShowDialog();
        }
Example #2
0
        void partnumber_grid_DoubleClick(object sender, EventArgs e)
        {
            int row = partnumber_grid.CurrentCellAddress.Y;

            string partnumber = partnumber_grid.CurrentRow.Cells["number"].Value.ToString();

            string author = partnumber_grid.CurrentRow.Cells["author"].Value.ToString();

            string created = partnumber_grid.CurrentRow.Cells["effective_date"].Value.ToString();

            created = created.Substring(0, created.IndexOf(" "));

            string obsoleted = partnumber_grid.CurrentRow.Cells["obsolete"].Value.ToString();

            string base_num = partnumber_grid.CurrentRow.Cells["base_number"].Value.ToString();

            string desc = partnumber_grid.CurrentRow.Cells["description"].Value.ToString();

            Edit_Part EP = new Edit_Part(partnumber, author, created, obsoleted, base_num, desc);

            EP.ShowDialog();
        }