예제 #1
0
        private void ViewTask_Click(object sender, EventArgs e)
        {
            if (ProjectID.SelectedItem == null || Tasks.SelectedItem == null)
            {
                MessageBox.Show("All FiledsAre Requierd");
                return;
            }

            String selected = Tasks.SelectedItem.ToString().ToString();
            int    id       = Tools.getId(selected);

            if (Admin)
            {
                ViewTaskForm viewTaskForm = new ViewTaskForm(adminActionForm, id);
                viewTaskForm.Show();
                adminActionForm.Hide();
            }
            else
            {
                ViewTaskForm viewTaskForm = new ViewTaskForm(userActionForm, id);
                viewTaskForm.Show();
                adminActionForm.Hide();
            }
        }
예제 #2
0
 public void initialize(Form form, ViewTaskForm viewTaskForm, int id)
 {
     this.form         = form;
     this.ViewTaskForm = viewTaskForm;
     this.id           = id;
 }