private void Back_Click(object sender, RoutedEventArgs e) { SY_ViewSpecificCase wnd = new SY_ViewSpecificCase(caseName); wnd.Show(); Close(); }
private void validation_button(object sender, RoutedEventArgs e) { LogsDAO logdb = new LogsDAO(); //Validation if ((Log_Name.Text.Equals(oldName)) || (logdb.checkIfLogs(Log_Name.Text)) || !(String.IsNullOrEmpty(Log_Name.Text))) { if (!(String.IsNullOrEmpty(Log_Desc.Text))) { Boolean checker = logdb.UpdateToTable(Log_Name.Text, Log_Desc.Text, oldName); if (checker) { SY_TagDAO tagdb = new SY_TagDAO(); tagdb.UpdateLogName(Log_Name.Text, oldName); Console.WriteLine("WE DID IT!"); SY_ViewSpecificCase wnd = new SY_ViewSpecificCase(caseName); wnd.Show(); Close(); } } else { MessageBox.Show("Please fill up the Log Description"); } } else { MessageBox.Show("Please fill up in the Log Name"); } }
private void validation_button(object sender, RoutedEventArgs e) { LogsDAO logdb = new LogsDAO(); //Validation if (!(String.IsNullOrEmpty(Log_Name.Text)) && (logdb.checkIfLogs(Log_Name.Text))) { if (!(String.IsNullOrEmpty(Log_Desc.Text))) { if (!(String.IsNullOrEmpty(filePath))) { if (formatBox.SelectedIndex > -1 && formatBox.SelectedIndex == 0) { CaseDAO casedb = new CaseDAO(); int caseId = casedb.getCaseId(c_name); Boolean checker = logdb.addLogToTable(Log_Name.Text, Log_Desc.Text, caseId, filePath, formatBox.Text); if (checker) { int logId = logdb.getLogId(Log_Name.Text); SY_TagDAO tagdb = new SY_TagDAO(); tagdb.addTagToTable(Log_Name.Text, logId); Console.WriteLine("WE DID IT!"); SY_ViewSpecificCase wnd = new SY_ViewSpecificCase(c_name); wnd.Show(); Close(); } } else { MessageBox.Show("Please select a file format"); } } else { MessageBox.Show("Please upload a path to load into"); } } else { MessageBox.Show("Please fill up the Log Description"); } } else { MessageBox.Show("Please fill up in the Log Name"); } }
private void View_Case(object sender, RoutedEventArgs e) { var button = sender as DependencyObject; while ((button != null) && !(button is DataGridRow)) { button = VisualTreeHelper.GetParent(button); } if (button is DataGridRow) { Console.WriteLine("YESH"); DataGridRow cell = button as DataGridRow; TextBlock potatoe = CaseTable.Columns[0].GetCellContent(cell) as TextBlock; SY_ViewSpecificCase wnd = new SY_ViewSpecificCase(potatoe.Text); wnd.Show(); Close(); } }