Exemplo n.º 1
0
        private void AddBatteryButton_Click(object sender, EventArgs e)
        {
            //TODO:
            BatteryForm child = new BatteryForm();

            child.FormClosed += new FormClosedEventHandler(AddBatteryForm_Closed);
            child.Show();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Edit Button Click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditButton_Click(object sender, EventArgs e)
        {
            if (batteriesDGV.SelectedRows.Count > 0)
            {
                BatteryForm child = new BatteryForm
                {
                    PartNumber   = batteriesDGV.SelectedRows[0].Cells[partCell].Value.ToString(),
                    Revision     = batteriesDGV.SelectedRows[0].Cells[revisionCell].Value.ToString(),
                    SerialNumber = batteriesDGV.SelectedRows[0].Cells[serialCell].Value.ToString(),
                    edit         = true
                };

                child.FormClosed += new FormClosedEventHandler(AddBatteryForm_Closed);
                child.Show();
            }
        }