Exemple #1
0
        private void newTaskByCurrentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OneTask currTask = new OneTask();
            int     currRow  = dataGridView1.CurrentRow.Index;

            currTask.subject          = dataGridView1.Rows[currRow].Cells["SUBJECT"].Value.ToString();
            currTask.shortDescription = dataGridView1.Rows[currRow].Cells["SHORTDESCR"].Value.ToString();
            DateTime dateDEADLINE = new DateTime();

            if (!DateTime.TryParse(dataGridView1.Rows[currRow].Cells["DEADLINE"].Value.ToString(), out dateDEADLINE))
            {
                dateDEADLINE = DateTime.Now;
            }
            currTask.deadLine = dateDEADLINE;
            currTask.priority = dataGridView1.Rows[currRow].Cells["PRIORITY"].Value.ToString();
            DateTime dateDATEDOC = new DateTime();

            if (!DateTime.TryParse(dataGridView1.Rows[currRow].Cells["DATEDOC"].Value.ToString(), out dateDATEDOC))
            {
                dateDATEDOC = DateTime.Now;
            }
            currTask.dateDoc   = dateDATEDOC;
            currTask.numberDoc = dataGridView1.Rows[currRow].Cells["NUMBERDOC"].Value.ToString();
            NewTaskForm newTaskForm = new NewTaskForm(glb.employeeID, currTask);

            if (newTaskForm.ShowDialog() == DialogResult.OK)
            {
                ReloadData();
            }
        }
Exemple #2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            NewTaskForm newTaskForm = new NewTaskForm(glb.employeeID);

            newTaskForm.ShowDialog();
            ReloadData();
        }
Exemple #3
0
        private void newTaskToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewTaskForm newTaskForm = new NewTaskForm(glb.employeeID);

            newTaskForm.ShowDialog();
            if (newTaskForm.ShowDialog() == DialogResult.OK)
            {
                ReloadData();
            }
        }