private void findUserToolStripMenuItem_Click(object sender, EventArgs e) { label4.Hide(); ListTimes newMDIChild = new ListTimes(); newMDIChild.MdiParent = this; newMDIChild.Show(); }
private void toolStripButton1_Click(object sender, EventArgs e) { TimeSpent item = new TimeSpent(); NewTime newTime = new NewTime(item); if (newTime.ShowDialog() == DialogResult.OK) { ListTimes create = new ListTimes(); create.NewTime(item); SetTimeSources(); } }
private void toolStripButton2_Click(object sender, EventArgs e) { Int32 selectedRowCount = dataGridView2.Rows.GetRowCount(DataGridViewElementStates.Selected); if (selectedRowCount > 0) { DialogResult result = MessageBox.Show("Are you sure you want to delete this item", "Delete item", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { TimeSpent time = (TimeSpent)timeBindingSource.Current; ListTimes del = new ListTimes(); del.DeleteTime(time); SetTimeSources(); } } }