예제 #1
0
 private void btn_edit_Click(object sender, EventArgs e)
 {
     try
     {
         DataGridViewRow row      = dgv_tasks.CurrentCell.OwningRow;
         int             pid      = projectid;
         int             taskid   = int.Parse(row.Cells["taskid"].Value.ToString());
         string          taskname = row.Cells["TASK"].Value.ToString();
         string          taskdesc = row.Cells["Description"].Value.ToString();
         DateTime        estdtime = Convert.ToDateTime(row.Cells["Estimated Time"].Value.ToString());
         DateTime        stdate   = Convert.ToDateTime(row.Cells["Start Date"].Value.ToString());
         int             teamid   = int.Parse(row.Cells["Team"].Value.ToString());
         taskform        editform = new taskform(pid, taskid, taskname, taskdesc, estdtime, stdate, teamid);
         editform.Show();
     }
     catch (Exception) {
         MessageBox.Show("No Task is selected!");
     }
 }
예제 #2
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            taskform tskf = new taskform(projectid);

            tskf.Show();
        }