Esempio n. 1
0
 private void CreateProjectCreateButtom_Click(object sender, EventArgs e)
 {
     if (CreateProjectCustomerComboBox.SelectedItem == null)
     {
         Models.NeedCustommerWarningPopup needCustommerWarningPopup = new Models.NeedCustommerWarningPopup();
         needCustommerWarningPopup.ShowDialog();
     }
     else
     {
         List <Models.User> attandances = new List <Models.User>();
         attandances.Add(currUser);
         foreach (string attendance in projectAttendances)
         {
             attandances.Add(database.GetUserByName(attendance));
         }
         database.addProject(new Models.Project(currUser, CreateProjectTitleTextBox.Text, database.GetCustomerByName(CreateProjectCustomerComboBox.SelectedItem.ToString()), CreateProjectAdressTextBox.Text, richTextBox1.Text, attandances, new List <Models.Attachment>()), attandances);
         ProjectsMenuItem_Click(sender, e);
         //ChangeTab(ProjectTab, ProjectsMenuItem);
         projectAttendances.Clear();
         CreateProjectAdressTextBox.Clear();
         CreateProjectAttendanceComboBox.Items.Clear();
         CreateProjectAttendanceRichTextBox.Clear();
         CreateProjectCustomerComboBox.Items.Clear();
         CreateProjectTitleTextBox.Clear();
         richTextBox1.Clear();
     }
 }
Esempio n. 2
0
 private void CreateProjectCancelButtom_Click(object sender, EventArgs e)
 {
     ChangeTab(ProjectTab, ProjectsMenuItem);
     projectAttendances.Clear();
     CreateProjectAdressTextBox.Clear();
     CreateProjectAttendanceComboBox.Items.Clear();
     CreateProjectAttendanceRichTextBox.Clear();
     CreateProjectCustomerComboBox.Items.Clear();
     CreateProjectTitleTextBox.Clear();
     richTextBox1.Clear();
 }