public override string ToString() { g = (DBGet)base.Tag; Binding myBinding = new Binding("family"); myBinding.Mode = BindingMode.TwoWay; myBinding.Source = g; txtfam.SetBinding(TextBox.TextProperty, myBinding); Binding myBinding2 = new Binding("key"); myBinding2.Mode = BindingMode.TwoWay; myBinding2.Source = g; txtkey.SetBinding(TextBox.TextProperty, myBinding2); Binding myBinding3 = new Binding("varname"); myBinding3.Mode = BindingMode.TwoWay; myBinding3.Source = g; txtval.SetBinding(TextBox.TextProperty, myBinding3); Binding descbinding = new Binding("Description"); descbinding.Mode = BindingMode.TwoWay; descbinding.Source = g; txtdesc.SetBinding(TextBox.TextProperty, descbinding); return(base.ToString()); }
private void DefinePhase(object context) { if (datepickPlannedStartdate == null || datepickPlannedEnddate == null || datepickPlannedReviewdate == null || String.IsNullOrWhiteSpace(txtPhaseDocumentsLink)) { MessageBox.Show("Um eine Phase zu definieren, müssen alle Felder ausgefüllt werden.", "Phase definieren"); } else if (datepickPlannedEnddate < datepickPlannedStartdate) { MessageBox.Show("Das geplante Enddatum kann nicht vor dem geplanten Startdatum liegen.", "Phase definieren"); } else if (datepickPlannedReviewdate < datepickPlannedStartdate || datepickPlannedReviewdate > datepickPlannedEnddate) { MessageBox.Show("Das geplante Reviewdatum muss zwischen geplantem Start- und Enddatum liegen.", "Phase definieren"); } else { selectedProjectPhase.Define(datepickPlannedStartdate, datepickPlannedEnddate, datepickPlannedReviewdate, txtPhaseDocumentsLink, selectedVProjectPhasePhase.PhaseName); DBGet dbGetObj = new DBGet(); var dbGetVProjectPhasePhase = dbGetObj.GeneralGet("v_Project_phase_Phase", contextProjectViewViewModel.lblProjectKey); contextProjectViewViewModel.lvProjectPhase = dbGetVProjectPhasePhase; Close?.Invoke(); } }
public override string ToString() { g = (DBGet)base.Tag; Binding myBinding = new Binding("family"); myBinding.Mode = BindingMode.TwoWay; myBinding.Source = g; txtfam.SetBinding(TextBox.TextProperty, myBinding); Binding myBinding2 = new Binding("key"); myBinding2.Mode = BindingMode.TwoWay; myBinding2.Source = g; txtkey.SetBinding(TextBox.TextProperty, myBinding2); Binding myBinding3 = new Binding("varname"); myBinding3.Mode = BindingMode.TwoWay; myBinding3.Source = g; txtval.SetBinding(TextBox.TextProperty, myBinding3); Binding descbinding = new Binding("Description"); descbinding.Mode = BindingMode.TwoWay; descbinding.Source = g; txtdesc.SetBinding(TextBox.TextProperty, descbinding); return base.ToString(); }
static Directory _getDirectory(SQLiteDataReader reader) { Directory d = new Directory(); d.pk = Convert.ToInt16(reader["pk_directory"]); d.name = Convert.ToString(reader["name"]); d.description = Convert.ToString(reader["description"]); d.fk_parent_directory = DBGet.GetInt(reader["fk_parent_directory"]); d.color = Convert.ToString(reader["color"]); try { d.files_count = Convert.ToInt16(reader["files_count"]); } catch { } return(d); }
static File _getFile(DataRow row) { File f = new File(); f.pk = Convert.ToInt16(row["pk_file"]); f.name = Convert.ToString(row["name"]); f.ext = Convert.ToString(row["ext"]); f.length = Convert.ToInt32(row["length"]); //f.file = (byte[])row["file"]; //avoiding blob file loading to increase speed f.description = Convert.ToString(row["description"]); f.creation_date = DBGet.GetDateTime(row["creation_date"]); f.last_edit_date = DBGet.GetDateTime(row["last_edit_date"]); f.fk_directory = DBGet.GetInt(row["fk_directory"]); return(f); }
static File _getFile(SQLiteDataReader reader) { File f = new File(); f.pk = Convert.ToInt16(reader["pk_file"]); f.name = Convert.ToString(reader["name"]); f.ext = Convert.ToString(reader["ext"]); f.length = Convert.ToInt32(reader["length"]); f.file = (byte[])reader["file"]; f.description = Convert.ToString(reader["description"]); f.creation_date = DBGet.GetDateTime(reader["creation_date"]); f.last_edit_date = DBGet.GetDateTime(reader["last_edit_date"]); f.fk_directory = DBGet.GetInt(reader["fk_directory"]); return(f); }
// Setzen der Labels mit den Infos der ausgewählten Aktivität public void SetActivityValues() { DBGet dbGetObj = new DBGet(); lvActivityEmployee = dbGetObj.GeneralGet("v_Employee_Department", selectedActivity.EmployeeId); lblActivityName = selectedActivity.ActivityName; lblPlannedStartdate = selectedActivity.PlannedStartdate; lblPlannedEnddate = selectedActivity.PlannedEnddate; lblStartdate = selectedActivity.Startdate; lblEnddate = selectedActivity.Enddate; lblActivityProgress = selectedActivity.ActivityProgress; txtActivityDocumentsLink = selectedActivity.ActivityDocumentsLink; UpdateExternalCost(); UpdateEmployeeResource(); }
// Projektphasen definieren public void Define(Nullable <DateTime> t_plannedstartdate, Nullable <DateTime> t_plannedenddate, Nullable <DateTime> t_plannedreviewdate, string t_phasedocumentslink, string t_phasename) { DBUpdate dbUpdateObj = new DBUpdate(); dbUpdateObj.DefineProjectPhase(Id, t_plannedstartdate, t_plannedenddate, t_plannedreviewdate, t_phasedocumentslink); // Prüfen, ob schon ein Meilenstein existiert DBGet dbGetObj = new DBGet(); var checkMilestone = dbGetObj.GeneralGet("Milestone", Id); // Existiert noch kein Meilenstein, wird eine Meilenstein am geplanten Phasenende definiert if (checkMilestone.Count == 0) { if (t_plannedenddate != null) { string milestoneName = t_phasename + " Ende"; DBCreate dbCreateObj = new DBCreate(); dbCreateObj.MilestoneCreate(milestoneName, t_plannedenddate, Id); } } }
// Projektwerte setzen public void SetProjectValues() { // Vorgehensmodell auslesen DBGet dbGetObj = new DBGet(); var dbGetProjectMethod = dbGetObj.GetSpecificProjectMethod(_selectedProject.ProjectMethodId); lblProjectKey = _selectedProject.Id; lblProjectName = _selectedProject.ProjectName; lblPriority = _selectedProject.Priority; lblProjectMethod = dbGetProjectMethod[0].MethodName; lblProjectState = _selectedProject.ProjectState; lblProjectProgress = _selectedProject.ProjectProgress; lblApprovalDate = _selectedProject.ApprovalDate; lblStartdatePlanned = _selectedProject.PlannedStartdate; lblEnddatePlanned = _selectedProject.PlannedEnddate; lblStartdate = _selectedProject.Startdate; lblEnddate = _selectedProject.Enddate; txtProjectDocumentsLink = _selectedProject.ProjectDocumentsLink; txtbProjectDescription = _selectedProject.ProjectDescription; lvProjectmanager = dbGetObj.GeneralGet("v_Employee_Department", selectedProject.EmployeeId); lvProjectPhase = dbGetObj.GeneralGet("v_Project_phase_Phase", _selectedProject.Id); }
private void CreateProject(object context) { var selectedProjectmanager = (Employee)context; if (String.IsNullOrWhiteSpace(txtProjectName) || selectedProjectMethod == null || selectedProjectmanager == null || datepickerPlannedStartDate == null || datepickerPlannedEndDate == null || String.IsNullOrWhiteSpace(txtProjectDocumentsLink) || String.IsNullOrWhiteSpace(txtProjectDescription)) { MessageBox.Show("Um ein Projekt zu erstellen, müssen alle Felder ausgefüllt und ein/e Projektleiter/in ausgewählt sein.", "Projekt erstellen"); } else if (datepickerPlannedEndDate < datepickerPlannedStartDate) { MessageBox.Show("Das geplante Enddatum kann nicht vor dem geplanten Startdatum liegen.", "Projekt erstellen"); } else { DBGet dbGetObj = new DBGet(); var dbGetPhase = dbGetObj.GeneralGet("Phase", selectedProjectMethod.Id); if (dbGetPhase.Count == 0) { MessageBox.Show("Es wurde ein Vorgehensmodell ausgewählt, welche keine Phasen enthält. Bitte ein Vorgehensmodell mit Phasen auswählen oder dem aktuellen Vorgehensmodell Phasen hinzufügen.", "Projekt erstellen"); } else { DBCreate dbCreateObj = new DBCreate(); dbCreateObj.ProjectCreate(txtProjectName, cmbbxPriority, datepickerPlannedStartDate, datepickerPlannedEndDate, txtProjectDocumentsLink, txtProjectDescription, selectedProjectMethod.Id, selectedProjectmanager.Id); var dbGetProjects = dbGetObj.GeneralGet("Project", 0); contextProjectOverviewModel.lvProjectOverview = dbGetProjects; // Neustes Projekt in List abgreifen und ProjektView öffnen var createdProject = contextProjectOverviewModel.lvProjectOverview.Last(); contextProjectOverviewModel.OpenProject(createdProject); Close?.Invoke(); } } }
// Alle Abteilungen anzeigen public void SetDepartments() { DBGet dbGetObj = new DBGet(); lvDepartment = dbGetObj.GeneralGet("Department", 0); }
// Projektübersicht updaten public void UpdateProjectOverview() { DBGet dbGetObj = new DBGet(); contextProjectOverviewViewModel.lvProjectOverview = dbGetObj.GeneralGet("Project", 0); }
// Methode zum Vorgehensmodell Liste updaten public void UpdateProjectMethodList() { DBGet dbGet = new DBGet(); dtagrdProjectMethod = dbGet.GeneralGet("Project_method", 0); }
// Methode Projektliste updaten public void UpdateProjectList() { DBGet dbGet = new DBGet(); lvProjectOverview = dbGet.GeneralGet("Project", 0); }
// Alle möglichen Mitarbeiter/innen als Projektleiter/in anzeigen public void SetEmployeeValues() { DBGet dbGetObj = new DBGet(); lvProjectmanager = dbGetObj.GeneralGet("Employee", 0); }
// Meilensteinansicht updaten public void SetMilestoneView() { DBGet dbGetObj = new DBGet(); lvMilestoneOverview = dbGetObj.GeneralGet("Milestone", selectedProjectPhase.Id); }
// Personelle Ressourcen ListView updaten public void UpdateEmployeeResource() { DBGet dbGetObj = new DBGet(); lvEmployeeResource = dbGetObj.GeneralGet("v_Employee_resource_Function", selectedActivity.Id); }
// Alle möglichen Mitarbeiter/innen anzeigen public void SetEmployeeValues() { DBGet dbGetObj = new DBGet(); lvEmployee = dbGetObj.GeneralGet("Employee", 0); }
// Externe Kosten Listview updaten public void UpdateExternalCost() { DBGet dbGetObj = new DBGet(); lvExternalCost = dbGetObj.GeneralGet("v_External_cost_Cost_type", selectedActivity.Id); }
// Updaten der Phasenlistview public void UpdatePhaseList() { DBGet dbGet = new DBGet(); lvPhase = dbGet.GeneralGet("Phase", _selectedProjectMethod.Id); }
// Aktivitätsübersicht updaten public void SetActivityView() { DBGet dbGetObj = new DBGet(); lvActivity = dbGetObj.GeneralGet("Activity", selectedProjectPhase.Id); }
// Kostenart Listview updaten public void UpdateCostTypeList() { DBGet dbGetObj = new DBGet(); lvCostType = dbGetObj.GeneralGet("Cost_type", 0); }
// Funktions Listview updaten public void UpdateFunctionList() { DBGet dbGetObj = new DBGet(); lvFunction = dbGetObj.GeneralGet("Function", 0); }
// Methode um Phasenliste zu updaten auf der Projektansicht public void UpdatePhaseOverview() { DBGet dbGetObj = new DBGet(); contextProjectViewViewModel.lvProjectPhase = dbGetObj.GeneralGet("v_Project_phase_Phase", contextProjectViewViewModel.selectedProject.Id); }