diff --git a/.vs/HospitalServerManager/v15/.suo b/.vs/HospitalServerManager/v15/.suo
index ba53633..760c65e 100644
Binary files a/.vs/HospitalServerManager/v15/.suo and b/.vs/HospitalServerManager/v15/.suo differ
diff --git a/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide b/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide
index 63436ee..a687ca1 100644
Binary files a/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide and b/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide differ
diff --git a/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-shm b/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-shm
index b2d9721..399190d 100644
Binary files a/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-shm and b/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-shm differ
diff --git a/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-wal b/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-wal
index 5f33c40..1e69014 100644
Binary files a/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-wal and b/.vs/HospitalServerManager/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/HospitalServerManager.csproj b/HospitalServerManager.csproj
index 2e62842..226ce53 100644
--- a/HospitalServerManager.csproj
+++ b/HospitalServerManager.csproj
@@ -122,9 +122,18 @@
+
+ AdmissionsPage.xaml
+
+
+ DiagnosesPage.xaml
+
DoctorsPage.xaml
+
+ EditRecordDialog.xaml
+
MainFrameView.xaml
@@ -162,10 +171,22 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/InterfacesAndEnums/Interfaces.cs b/InterfacesAndEnums/Interfaces.cs
index 64429ec..a8c7e02 100644
--- a/InterfacesAndEnums/Interfaces.cs
+++ b/InterfacesAndEnums/Interfaces.cs
@@ -7,8 +7,9 @@ using Windows.UI.Xaml.Controls;
namespace HospitalServerManager.InterfacesAndEnums
{
- public interface ISqlTableModelable : IPrimaryKeyGetable
+ public interface ISqlTableModel
{
+
List GetColumnNames();
}
public interface IPrimaryKeyGetable
diff --git a/Model/Basic/Admission.cs b/Model/Basic/Admission.cs
index a48d5d9..3a05bb9 100644
--- a/Model/Basic/Admission.cs
+++ b/Model/Basic/Admission.cs
@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -9,7 +10,7 @@ namespace HospitalServerManager.Model.Basic
class Admission : SqlTable
{
public DateTime AdmissionDate { get; protected set; }
- public DateTime LeavingDate { get; protected set; }
+ public DateTime? LeavingDate { get; protected set; }
public string PatientPESEL { get; protected set; }
public string DiagnosisSymbol { get; protected set; }
public int MainDoctor { get; protected set; }
@@ -30,5 +31,19 @@ namespace HospitalServerManager.Model.Basic
RoomNumber = int.Parse(listOfValues[7]);
IsPlanned = bool.Parse(listOfValues[8]);
}
+ [JsonConstructor]
+ protected Admission(string admissionID, DateTime admissionDate, DateTime? endDate, string patientPESEL, string diagnosisSymbol,
+ int mainDoctor, int planedOperation, int roomNumber, bool isPlanned)
+ : base (admissionID, "Id_przyjecia", new List())
+ {
+ AdmissionDate = admissionDate;
+ LeavingDate = endDate ?? null;
+ PatientPESEL = patientPESEL;
+ DiagnosisSymbol = diagnosisSymbol;
+ MainDoctor = mainDoctor;
+ OperationID = planedOperation;
+ RoomNumber = roomNumber;
+ IsPlanned = isPlanned;
+ }
}
}
diff --git a/Model/Basic/Diagnosis.cs b/Model/Basic/Diagnosis.cs
index 57b25b2..b1648e0 100644
--- a/Model/Basic/Diagnosis.cs
+++ b/Model/Basic/Diagnosis.cs
@@ -1,4 +1,5 @@
using HospitalServerManager.InterfacesAndEnums;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -21,5 +22,13 @@ namespace HospitalServerManager.Model.Basic
FieldOfSurgery = listOfValues[2].GetEnumFromDescription();
Description = listOfValues[3];
}
+ [JsonConstructor]
+ protected Diagnosis(string icdSymbol, string name, string fieldOfSurgery, string description)
+ : base(icdSymbol, "Symbol_ICD", new List())
+ {
+ Name = name;
+ FieldOfSurgery = fieldOfSurgery.GetEnumFromDescription();
+ Description = description;
+ }
}
}
diff --git a/Model/Basic/Room.cs b/Model/Basic/Room.cs
index 45a18f5..4abfe54 100644
--- a/Model/Basic/Room.cs
+++ b/Model/Basic/Room.cs
@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -19,5 +20,12 @@ namespace HospitalServerManager.Model.Basic
PlacesNumber = placesNumber;
IsSpecialCare = bool.Parse(listOfValues[2]);
}
+ [JsonConstructor]
+ protected Room(int roomNumber, int numberOfBeds, bool increasedCare)
+ :base(roomNumber.ToString(), "Nr_sali", new List())
+ {
+ PlacesNumber = numberOfBeds;
+ IsSpecialCare = increasedCare;
+ }
}
}
diff --git a/Model/Basic/SqlTable.cs b/Model/Basic/SqlTable.cs
index 3971461..363cebb 100644
--- a/Model/Basic/SqlTable.cs
+++ b/Model/Basic/SqlTable.cs
@@ -8,11 +8,11 @@ using HospitalServerManager.Model.Controllers;
namespace HospitalServerManager.Model.Basic
{
- internal abstract class SqlTable : ISqlTableModelable
+ internal abstract class SqlTable : ISqlTableModel
{
// TODO: Dodac table do klas modelu
public string PrimaryKey { get; protected set; }
- protected string PrimaryKeyName { get; set; }
+ public string PrimaryKeyName { get; set; }
protected List ColumnNames { get; set; }
protected SqlTable()
{
@@ -27,19 +27,9 @@ namespace HospitalServerManager.Model.Basic
ColumnNames = columnNames;
}
- public string GetPrimaryKey()
- {
- return PrimaryKey;
- }
-
- public string GetPrimaryKeyName()
- {
- return PrimaryKeyName;
- }
-
- public List GetColumnNames()
- {
- return ColumnNames;
- }
- }
+ public List GetColumnNames()
+ {
+ return ColumnNames;
+ }
+ }
}
diff --git a/Model/Controllers/ApiCommandProvider.cs b/Model/Controllers/ApiCommandProvider.cs
index 4667446..f4f5b17 100644
--- a/Model/Controllers/ApiCommandProvider.cs
+++ b/Model/Controllers/ApiCommandProvider.cs
@@ -20,7 +20,7 @@ namespace HospitalServerManager.Model.Controllers
{
return @"/getcolumntypes/" + tableName;
}
- public static string CreateNewRecordAsync(string tableName, List valuesList)
+ public static string CreateNewRecord(string tableName, List valuesList)
{
string createRequest = "/insertrec/" + tableName + "/nr/" + valuesList.Count() + "/pk/" + valuesList[0];
for(int i = 1; i<8; i++)
@@ -33,5 +33,26 @@ namespace HospitalServerManager.Model.Controllers
}
return createRequest;
}
+ public static string UpdateRecordHttpRequest(string tableName, string primaryKey, string primaryKeyName, string fieldToUpdate, string valueToUpdate)
+ {
+ string updateRequest = "/updaterec/" + tableName + "/pk/" + primaryKey + "/pkn/";
+ updateRequest += primaryKeyName + "/ftu/" + fieldToUpdate + "/vti/" + valueToUpdate;
+ return updateRequest;
+ }
+ public static string DeleteRecordHttpRequest(string tableName, string primaryKey, string primaryKeyName)
+ {
+ string updateRequest = "/deleterec/" + tableName + "/pk/" + primaryKey + "/pkn/" + primaryKeyName;
+ return updateRequest;
+ }
+ public static string SortedRecordsHttpRequest(string tableName, string orderBy, string criterium)
+ {
+ string sortReq = "/sort/" + tableName + "/sortby/" + orderBy + "/sorttype/" + criterium;
+ return sortReq;
+ }
+ public static string SearchRecordHttpRequest(string tableName, string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ string search = "/search/" + tableName + "/where/" + searchIn + "/is/" + searchValue + "/sortby/" + orderBy + "/sorttype/" + criterium;
+ return search;
+ }
}
}
diff --git a/Model/Controllers/WebService.cs b/Model/Controllers/WebService.cs
index 4c35129..4448c18 100644
--- a/Model/Controllers/WebService.cs
+++ b/Model/Controllers/WebService.cs
@@ -9,6 +9,7 @@ using System.Net.Http.Headers;
using HospitalServerManager.InterfacesAndEnums;
using Newtonsoft.Json;
using System.IO;
+using HospitalServerManager.Model.Basic;
namespace HospitalServerManager.Model.Controllers
{
@@ -32,21 +33,41 @@ namespace HospitalServerManager.Model.Controllers
{
httpClient.BaseAddress = baseAdress;
httpClient.DefaultRequestHeaders.Clear();
- //httpClient.DefaultRequestHeaders.Add("JSON", new MediaTypeWithQualityHeaderValue("application/json"));
}
public async Task> GetRecordAsync(string tableName)
{
// TODO: SPRAWDZIC CZY IMPLEMENTUJE INTERFACE!!
- List modelsList = new List();
- //using (var client = httpClient)
+ List modelsList = new List();
using (var message = new HttpRequestMessage(HttpMethod.Get, ApiCommandProvider.GetRecordHttpRequest(tableName)))
using (var response = await httpClient.SendAsync(message))
{
response.EnsureSuccessStatusCode();
var stream = await response.Content.ReadAsStreamAsync();
return DeserializeJsonFromStream>(stream);
- //return JsonConvert.DeserializeObject>(content);
+ }
+ }
+ public async Task> GetSortedRecordsAsync(string tableName, string orderBy, string criterium)
+ {
+ List modelsList = new List();
+ using (var message = new HttpRequestMessage(HttpMethod.Get, ApiCommandProvider.SortedRecordsHttpRequest(tableName, orderBy, criterium)))
+ using (var response = await httpClient.SendAsync(message))
+ {
+ response.EnsureSuccessStatusCode();
+ var stream = await response.Content.ReadAsStreamAsync();
+ return DeserializeJsonFromStream>(stream);
+ }
+ }
+ public async Task> SearchRecordsAsync(string tableName, string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ List modelsList = new List();
+ using (var message = new HttpRequestMessage(HttpMethod.Get,
+ ApiCommandProvider.SearchRecordHttpRequest(tableName, orderBy, criterium, searchIn, searchValue)))
+ using (var response = await httpClient.SendAsync(message))
+ {
+ response.EnsureSuccessStatusCode();
+ var stream = await response.Content.ReadAsStreamAsync();
+ return DeserializeJsonFromStream>(stream);
}
}
public async Task> GetColumnNamesAsync(string tableName)
@@ -56,6 +77,7 @@ namespace HospitalServerManager.Model.Controllers
{
response.EnsureSuccessStatusCode();
var columns = await response.Content.ReadAsStringAsync();
+ columns = columns.Remove(0, 1);
var columnNames = columns.Split(".");
var x = columnNames.ToList();
x.RemoveAt(x.Count - 1);
@@ -82,7 +104,27 @@ namespace HospitalServerManager.Model.Controllers
}
public async Task CreateNewRecordAsync(string tableName, IEnumerable valuesList)
{
- using (var message = new HttpRequestMessage(HttpMethod.Get, ApiCommandProvider.CreateNewRecordAsync(tableName, valuesList.ToList())))
+ using (var message = new HttpRequestMessage(HttpMethod.Get, ApiCommandProvider.CreateNewRecord(tableName, valuesList.ToList())))
+ using (var response = await httpClient.SendAsync(message))
+ {
+ response.EnsureSuccessStatusCode();
+ return true;
+ }
+ }
+ public async Task UpdateRecordAsync(string tableName, string primaryKey, string primaryKeyName, string fieldToEdit, string valueToUpdate)
+ {
+ using (var message = new HttpRequestMessage(HttpMethod.Get,
+ ApiCommandProvider.UpdateRecordHttpRequest(tableName, primaryKey, primaryKeyName, fieldToEdit, valueToUpdate)))
+ using (var response = await httpClient.SendAsync(message))
+ {
+ response.EnsureSuccessStatusCode();
+ return true;
+ }
+ }
+ public async Task DeleteRecordAsync(string tableName, string primaryKey, string primaryKeyName)
+ {
+ using (var message = new HttpRequestMessage(HttpMethod.Get,
+ ApiCommandProvider.DeleteRecordHttpRequest(tableName, primaryKey, primaryKeyName)))
using (var response = await httpClient.SendAsync(message))
{
response.EnsureSuccessStatusCode();
@@ -103,11 +145,5 @@ namespace HospitalServerManager.Model.Controllers
return searchResult;
}
}
-
-
- private string GetRecordHttpRequest(string tableName)
- {
- return @"/getfromdb/" + tableName;
- }
}
}
diff --git a/Model/ModelRoster.cs b/Model/ModelRoster.cs
index 843c657..5823d0d 100644
--- a/Model/ModelRoster.cs
+++ b/Model/ModelRoster.cs
@@ -7,18 +7,19 @@ using System.Threading.Tasks;
using HospitalServerManager.InterfacesAndEnums;
using HospitalServerManager.Model.Basic;
using HospitalServerManager.Model.Controllers;
+using Windows.UI.Popups;
namespace HospitalServerManager.Model
{
class ModelRoster
{
- private List _modelsList = new List();
+ private List _modelsList = new List();
private WebService webService = new WebService(new Uri("http://localhost:8080/"));
public string ActualTableName { get; private set; }
public IEnumerable ColumnNames { get; private set; }
public IDictionary ColumnTypes { get; private set; }
public Dictionary EnumTypes { get; protected set; }
- public IEnumerable ModelsEnumerable { get => _modelsList; }
+ public IEnumerable ModelsEnumerable { get => _modelsList; }
//private Controllers.DatabaseReader DatabaseReader = new Controllers.DatabaseReader();
public ModelRoster()
{
@@ -32,35 +33,66 @@ namespace HospitalServerManager.Model
_modelsList.Clear();
if(ColumnNames.Any())
ColumnNames.ToList().Clear();
- /*MethodInfo method = typeof(WebService).GetMethod("GetRecordAsync");
- method = method.MakeGenericMethod(type);
- var resp = method.Invoke(webService, new[] { "Pacjenci" });*/
ActualTableName = tableName;
- ColumnNames = await GetColumnNames();
- ColumnTypes = await GetColumnTypes();
- IEnumerable response = new List();
+ /*ColumnNames = await GetColumnNames();
+ ColumnTypes = await GetColumnTypes();*/
+ IEnumerable response = new List();
if(tableName == "Pacjenci") response = await webService.GetRecordAsync(tableName);
else if(tableName == "Lekarze") response = await webService.GetRecordAsync(tableName);
_modelsList.AddRange(response);
-
- //ColumnNames = await GetColumnNames();
}
- public async Task> GetColumnNames()
+ public async Task> GetColumnNames(string tableName)
{
+ ActualTableName = tableName;
if (ActualTableName == string.Empty)
throw new Exception();
- return await webService.GetColumnNamesAsync(ActualTableName);
+ ColumnNames = await webService.GetColumnNamesAsync(ActualTableName);
+
+ return ColumnNames;
}
- public async Task> GetColumnTypes()
+ public async Task> GetColumnTypes(string tableName)
{
+ ActualTableName = tableName;
if (ActualTableName == string.Empty)
throw new Exception();
- return await webService.GetColumnTypesAsync(ActualTableName);
+ ColumnTypes = await webService.GetColumnTypesAsync(ActualTableName);
+ return ColumnTypes;
}
public async void CreateRecord(string tableName, IEnumerable valueList)
{
await webService.CreateNewRecordAsync(tableName, valueList);
}
+ public async void UpdateRecord(string tableName, string primaryKey, string primaryKeyName, string fieldToUpdate, string valueToUpdate)
+ {
+ await webService.UpdateRecordAsync(tableName, primaryKey, primaryKeyName, fieldToUpdate, valueToUpdate);
+ }
+ public async void DeleteRecord(string tableName, SqlTable modelToDelete)
+ {
+ if(!(modelToDelete is Admission))
+ {
+ var centralTableRecords = await webService.GetRecordAsync("Przyjecia");
+ if (IsCentralTableContainsDeletedModelForeginKey(tableName, modelToDelete.PrimaryKey, centralTableRecords.ToList()))
+ {
+ IUICommand response = null;
+ MessageDialog mDialog = new MessageDialog("W tabeli Przyjęcia znajduje się odwołanie do usuwanego rekordu." +
+ "Jeśli usuniesz ten rekord, wpis z tabeli Przyjęcia zostanie również usunięty. Czy nadal chcesz usunąć rekord?");
+ mDialog.Commands.Add(new UICommand("Tak, usuń"));
+ mDialog.Commands.Add(new UICommand("Nie, pozostaw rekord"));
+ response = await mDialog.ShowAsync();
+ if (response == mDialog.Commands.First())
+ {
+ DeleteRecord("Przyjecia", modelToDelete.PrimaryKey, GetForeignKeyNameFromAdmissionsTable(tableName));
+ DeleteRecord(tableName, modelToDelete.PrimaryKey, modelToDelete.PrimaryKeyName);
+ }
+ }
+ }
+ else
+ DeleteRecord(tableName, modelToDelete.PrimaryKey, modelToDelete.PrimaryKeyName);
+ }
+ private async void DeleteRecord(string tableName, string primaryKey, string primaryKeyName)
+ {
+ await webService.DeleteRecordAsync(tableName, primaryKey, primaryKeyName);
+ }
private Dictionary CreateEnumTypesDictionary()
{
// TODO: Uzupełniać w miare dodawania tabel!
@@ -70,12 +102,133 @@ namespace HospitalServerManager.Model
newDictionary.Add("Stopien_naukowy", typeof(AcademicDegrees));
newDictionary.Add("Specjalizacja", typeof(MedicalSpecializations));
newDictionary.Add("Stanowisko", typeof(JobPositions));
+ newDictionary.Add("Dziedzina_chirurgii", typeof(SurgeryField));
return newDictionary;
}
- public void AddRange(IEnumerable modelsList)
+
+ public void AddRange(IEnumerable modelsList)
{
_modelsList.Clear();
_modelsList.AddRange(modelsList);
}
- }
+ private string GetForeignKeyNameFromAdmissionsTable(string typeOfTable)
+ {
+ string stringToReturn = null;
+ switch (typeOfTable)
+ {
+ case "Przyjecia":
+ stringToReturn = null;
+ break;
+ case "Pacjenci":
+ stringToReturn = "PESEL_pacjenta";
+ break;
+ case "Lekarze":
+ stringToReturn = "Lekarz_prowadzacy";
+ break;
+ case "Diagnozy":
+ stringToReturn = "Symbol_diagnozy";
+ break;
+ case "Operacje":
+ stringToReturn = "Planowana_operacja";
+
+ break;
+ case "Sale":
+ stringToReturn = "Nr_sali";
+ break;
+ }
+
+ return stringToReturn;
+ }
+ private bool IsCentralTableContainsDeletedModelForeginKey(string tableName, string searchedModelPrimaryKey, List centralTableList)
+ {
+ bool contains;
+ switch (tableName)
+ {
+ case "Przyjecia":
+ contains = false;
+ break;
+ case "Pacjenci":
+ contains = centralTableList.FindIndex(x => x.PatientPESEL == searchedModelPrimaryKey) >= 0 ? true : false;
+ break;
+ case "Lekarze":
+ contains = centralTableList.FindIndex(x => x.MainDoctor.ToString() == searchedModelPrimaryKey) >= 0 ? true : false;
+ break;
+ case "Diagnozy":
+ contains = centralTableList.FindIndex(x => x.DiagnosisSymbol == searchedModelPrimaryKey) >= 0 ? true : false;
+ break;
+ case "Operacje":
+ contains = centralTableList.FindIndex(x => x.OperationID.ToString() == searchedModelPrimaryKey) >= 0 ? true : false;
+ break;
+ case "Sale":
+ contains = centralTableList.FindIndex(x => x.RoomNumber.ToString() == searchedModelPrimaryKey) >= 0 ? true : false;
+ break;
+ default:
+ contains = false;
+ break;
+ }
+
+ return contains;
+ }
+ public async Task Sort(string tableName, string orderBy, string criterium)
+ {
+ _modelsList.Clear();
+ IEnumerable response = new List();
+ switch (tableName)
+ {
+ case "Przyjecia":
+ response = await webService.GetSortedRecordsAsync(tableName, orderBy, criterium);
+ break;
+ case "Pacjenci":
+ response = await webService.GetSortedRecordsAsync(tableName, orderBy, criterium);
+ break;
+ case "Lekarze":
+ response = await webService.GetSortedRecordsAsync(tableName, orderBy, criterium);
+ break;
+ case "Diagnozy":
+ response = await webService.GetSortedRecordsAsync(tableName, orderBy, criterium);
+ break;
+ case "Operacje":
+ response = await webService.GetSortedRecordsAsync(tableName, orderBy, criterium);
+ break;
+ case "Sale":
+ response = await webService.GetSortedRecordsAsync(tableName, orderBy, criterium);
+ break;
+ default:
+ response = null;
+ break;
+ }
+ _modelsList.AddRange(response);
+ }
+ public async Task Search(string tableName, string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ _modelsList.Clear();
+ IEnumerable response = new List();
+ switch (tableName)
+ {
+ case "Przyjecia":
+ response = await webService.SearchRecordsAsync(tableName, orderBy, criterium, searchIn, searchValue);
+ break;
+ case "Pacjenci":
+ response = await webService.SearchRecordsAsync(tableName, orderBy, criterium, searchIn, searchValue);
+ break;
+ case "Lekarze":
+ response = await webService.SearchRecordsAsync(tableName, orderBy, criterium, searchIn, searchValue);
+ break;
+ case "Diagnozy":
+ response = await webService.SearchRecordsAsync(tableName, orderBy, criterium, searchIn, searchValue);
+ break;
+ case "Operacje":
+ response = await webService.SearchRecordsAsync(tableName, orderBy, criterium, searchIn, searchValue);
+ break;
+ case "Sale":
+ response = await webService.SearchRecordsAsync(tableName, orderBy, criterium, searchIn, searchValue);
+ break;
+ default:
+ response = null;
+ break;
+ }
+ if(response != null && response.Any())
+ _modelsList.AddRange(response);
+ }
+ }
}
diff --git a/View/AdmissionsPage.xaml b/View/AdmissionsPage.xaml
new file mode 100644
index 0000000..2b77429
--- /dev/null
+++ b/View/AdmissionsPage.xaml
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/AdmissionsPage.xaml.cs b/View/AdmissionsPage.xaml.cs
new file mode 100644
index 0000000..ffee190
--- /dev/null
+++ b/View/AdmissionsPage.xaml.cs
@@ -0,0 +1,147 @@
+using HospitalServerManager.InterfacesAndEnums;
+using HospitalServerManager.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+//Szablon elementu Pusta strona jest udokumentowany na stronie https://go.microsoft.com/fwlink/?LinkId=234238
+
+namespace HospitalServerManager.View
+{
+ ///
+ /// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
+ ///
+ public sealed partial class AdmissionsPage : Page, IPageNavigateable
+ {
+ public AdmissionsPage()
+ {
+ this.InitializeComponent();
+ }
+ private async void NewRecord()
+ {
+ Dictionary typesOfColumnDictionary = (Dictionary)RosterViewModel.ColumnTypes;
+ NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await createDialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
+ {
+ List valuesList = createDialog.ValuesOfNewObject;
+ RosterViewModel.CreateRecord("Przyjecia", valuesList);
+ }
+ }
+ private async void EditRecord()
+ {
+ AdmissionViewModel admission = databaseView.SelectedItem as AdmissionViewModel;
+ string textToTitle = "Edytowany rekord: " + admission.PrimaryKey;
+ EditRecordDialog dialog = new EditRecordDialog(RosterViewModel.ColumnNames, RosterViewModel.ColumnTypes, textToTitle,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await dialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && !string.IsNullOrEmpty(dialog.Result))
+ {
+ string result = dialog.Result;
+ string fieldToEdit = dialog.FieldToUpdate;
+ RosterViewModel.UpdateRecord("Przyjecia", admission, fieldToEdit, result);
+ }
+ }
+ public void Sort(string orderBy, string criterium)
+ {
+ RosterViewModel.Sort(typeof(AdmissionViewModel), "Przyjecia", orderBy, criterium);
+ }
+ public void Search(string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ RosterViewModel.Search(typeof(AdmissionViewModel), "Przyjecia", orderBy, criterium, searchIn, searchValue);
+ }
+
+ #region Events
+
+ private void SortComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
+
+ private void RadionBtn_Click(object sender, RoutedEventArgs e)
+ {
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
+
+ private void SearchButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (searchBox.Text == string.Empty)
+ return;
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ string searchIn = lookInComboBox.SelectedItem.ToString();
+ string searchedExpression = searchBox.Text;
+ Search(sortComboBox.SelectedItem.ToString(), criterium, searchIn, searchedExpression);
+ }
+
+ private async void ResetButton_Click(object sender, RoutedEventArgs e)
+ {
+ await RosterViewModel.Read(typeof(AdmissionViewModel), "Przyjecia");
+ }
+
+ private void DeleteButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ {
+ var admission = databaseView.SelectedItem as IPrimaryKeyGetable;
+ RosterViewModel.DeleteRecord("Przyjecia", admission);
+ }
+ }
+
+ private void EditButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ EditRecord();
+ }
+
+ private void NewRecordButton_Click(object sender, RoutedEventArgs e)
+ {
+ NewRecord();
+ }
+ #endregion
+
+ protected async override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ //await RosterViewModel.Read(typeof(AdmissionViewModel), "Przyjecia");
+ await RosterViewModel.InitializeViewModels("Przyjecia");
+ databaseView.ItemsSource = RosterViewModel.ModelsCollection;
+ lookInComboBox.ItemsSource = sortComboBox.ItemsSource = RosterViewModel.ColumnNames;
+ lookInComboBox.SelectedIndex = sortComboBox.SelectedIndex = 0;
+ }
+
+ private async void Page_Loaded(object sender, RoutedEventArgs e)
+ {
+ ;
+ }
+
+ public void UnloadPage()
+ {
+ //throw new NotImplementedException();
+ }
+ }
+}
diff --git a/View/DiagnosesPage.xaml b/View/DiagnosesPage.xaml
new file mode 100644
index 0000000..3d11e1c
--- /dev/null
+++ b/View/DiagnosesPage.xaml
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/DiagnosesPage.xaml.cs b/View/DiagnosesPage.xaml.cs
new file mode 100644
index 0000000..d8ce2c0
--- /dev/null
+++ b/View/DiagnosesPage.xaml.cs
@@ -0,0 +1,147 @@
+using HospitalServerManager.InterfacesAndEnums;
+using HospitalServerManager.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+//Szablon elementu Pusta strona jest udokumentowany na stronie https://go.microsoft.com/fwlink/?LinkId=234238
+
+namespace HospitalServerManager.View
+{
+ ///
+ /// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
+ ///
+ public sealed partial class DiagnosesPage : Page, IPageNavigateable
+ {
+ public DiagnosesPage()
+ {
+ this.InitializeComponent();
+ }
+ private async void NewRecord()
+ {
+ Dictionary typesOfColumnDictionary = (Dictionary)RosterViewModel.ColumnTypes;
+ NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await createDialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
+ {
+ List valuesList = createDialog.ValuesOfNewObject;
+ RosterViewModel.CreateRecord("Diagnozy", valuesList);
+ }
+ }
+ private async void EditRecord()
+ {
+ DiagnosisViewModel diagnosis = databaseView.SelectedItem as DiagnosisViewModel;
+ string textToTitle = "Edytowany rekord: " + diagnosis.Name + " " + diagnosis.PrimaryKey;
+ EditRecordDialog dialog = new EditRecordDialog(RosterViewModel.ColumnNames, RosterViewModel.ColumnTypes, textToTitle,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await dialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && !string.IsNullOrEmpty(dialog.Result))
+ {
+ string result = dialog.Result;
+ string fieldToEdit = dialog.FieldToUpdate;
+ RosterViewModel.UpdateRecord("Diagnozy", diagnosis, fieldToEdit, result);
+ }
+ }
+ public void Sort(string orderBy, string criterium)
+ {
+ RosterViewModel.Sort(typeof(DiagnosisViewModel), "Diagnozy", orderBy, criterium);
+ }
+ public void Search(string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ RosterViewModel.Search(typeof(DiagnosisViewModel), "Diagnozy", orderBy, criterium, searchIn, searchValue);
+ }
+
+ #region Events
+
+ private void SortComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
+
+ private void RadionBtn_Click(object sender, RoutedEventArgs e)
+ {
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
+
+ private void SearchButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (searchBox.Text == string.Empty)
+ return;
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ string searchIn = lookInComboBox.SelectedItem.ToString();
+ string searchedExpression = searchBox.Text;
+ Search(sortComboBox.SelectedItem.ToString(), criterium, searchIn, searchedExpression);
+ }
+
+ private async void ResetButton_Click(object sender, RoutedEventArgs e)
+ {
+ await RosterViewModel.Read(typeof(DiagnosisViewModel), "Diagnozy");
+ }
+
+ private void DeleteButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ {
+ var diagnosis = databaseView.SelectedItem as IPrimaryKeyGetable;
+ RosterViewModel.DeleteRecord("Diagnozy", diagnosis);
+ }
+ }
+
+ private void EditButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ EditRecord();
+ }
+
+ private void NewRecordButton_Click(object sender, RoutedEventArgs e)
+ {
+ NewRecord();
+ }
+ #endregion
+
+ protected async override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ //await RosterViewModel.Read(typeof(DiagnosisViewModel), "Diagnozy");
+ await RosterViewModel.InitializeViewModels("Diagnozy");
+ databaseView.ItemsSource = RosterViewModel.ModelsCollection;
+ lookInComboBox.ItemsSource = sortComboBox.ItemsSource = RosterViewModel.ColumnNames;
+ lookInComboBox.SelectedIndex = sortComboBox.SelectedIndex = 0;
+ }
+
+ private void Page_Loaded(object sender, RoutedEventArgs e)
+ {
+ ;
+ }
+
+ public void UnloadPage()
+ {
+ //throw new NotImplementedException();
+ }
+ }
+}
diff --git a/View/DoctorsPage.xaml.cs b/View/DoctorsPage.xaml.cs
index 3a78c0d..88f68fa 100644
--- a/View/DoctorsPage.xaml.cs
+++ b/View/DoctorsPage.xaml.cs
@@ -29,53 +29,115 @@ namespace HospitalServerManager.View
this.InitializeComponent();
}
+ private async void NewRecord()
+ {
+ Dictionary typesOfColumnDictionary = (Dictionary)RosterViewModel.ColumnTypes;
+ NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await createDialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
+ {
+ List valuesList = createDialog.ValuesOfNewObject;
+ RosterViewModel.CreateRecord("Lekarze", valuesList);
+ }
+ }
+ private async void EditRecord()
+ {
+ DoctorViewModel doctor = databaseView.SelectedItem as DoctorViewModel;
+ string textToTitle = "Edytowany rekord: " + doctor.Name + " " + doctor.Surname;
+ EditRecordDialog dialog = new EditRecordDialog(RosterViewModel.ColumnNames, RosterViewModel.ColumnTypes, textToTitle,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await dialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && !string.IsNullOrEmpty(dialog.Result))
+ {
+ string result = dialog.Result;
+ string fieldToEdit = dialog.FieldToUpdate;
+ RosterViewModel.UpdateRecord("Lekarze", doctor, fieldToEdit, result);
+ }
+ }
+ public void Sort(string orderBy, string criterium)
+ {
+ RosterViewModel.Sort(typeof(DoctorViewModel), "Lekarze", orderBy, criterium);
+ }
+ public void Search(string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ RosterViewModel.Search(typeof(DoctorViewModel), "Lekarze", orderBy, criterium, searchIn, searchValue);
+ }
+
#region Events
private void SortComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
-
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
}
private void RadionBtn_Click(object sender, RoutedEventArgs e)
{
-
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
}
private void SearchButton_Click(object sender, RoutedEventArgs e)
{
-
+ if (searchBox.Text == string.Empty)
+ return;
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ string searchIn = lookInComboBox.SelectedItem.ToString();
+ string searchedExpression = searchBox.Text;
+ Search(sortComboBox.SelectedItem.ToString(), criterium, searchIn, searchedExpression);
}
- private void ResetButton_Click(object sender, RoutedEventArgs e)
- {
-
- }
-
- private void DeleteButton_Click(object sender, RoutedEventArgs e)
- {
-
- }
-
- private void EditButton_Click(object sender, RoutedEventArgs e)
- {
-
- }
-
- private void NewRecordButton_Click(object sender, RoutedEventArgs e)
- {
-
- }
- #endregion
-
- protected override async void OnNavigatedTo(NavigationEventArgs e)
+ private async void ResetButton_Click(object sender, RoutedEventArgs e)
{
await RosterViewModel.Read(typeof(DoctorViewModel), "Lekarze");
}
+ private void DeleteButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ {
+ var doctor = databaseView.SelectedItem as IPrimaryKeyGetable;
+ RosterViewModel.DeleteRecord("Lekarze", doctor);
+ }
+ }
+
+ private void EditButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ EditRecord();
+ }
+
+ private void NewRecordButton_Click(object sender, RoutedEventArgs e)
+ {
+ NewRecord();
+ }
+ #endregion
+
+ protected async override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ //await RosterViewModel.Read(typeof(DoctorViewModel), "Lekarze");
+ await RosterViewModel.InitializeViewModels("Lekarze");
+ databaseView.ItemsSource = RosterViewModel.ModelsCollection;
+ lookInComboBox.ItemsSource = sortComboBox.ItemsSource = RosterViewModel.ColumnNames;
+ lookInComboBox.SelectedIndex = sortComboBox.SelectedIndex = 0;
+ }
+
private async void Page_Loaded(object sender, RoutedEventArgs e)
{
- databaseView.ItemsSource = RosterViewModel.ModelsCollection;
- sortComboBox.ItemsSource = RosterViewModel.ColumnNames;
+ ;
}
public void UnloadPage()
diff --git a/View/EditRecordDialog.xaml b/View/EditRecordDialog.xaml
new file mode 100644
index 0000000..db870a7
--- /dev/null
+++ b/View/EditRecordDialog.xaml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/EditRecordDialog.xaml.cs b/View/EditRecordDialog.xaml.cs
new file mode 100644
index 0000000..6973d30
--- /dev/null
+++ b/View/EditRecordDialog.xaml.cs
@@ -0,0 +1,141 @@
+using HospitalServerManager.InterfacesAndEnums;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+//Szablon elementu Okno dialogowe zawartości jest udokumentowany na stronie https://go.microsoft.com/fwlink/?LinkId=234238
+
+namespace HospitalServerManager.View
+{
+ public sealed partial class EditRecordDialog : ContentDialog
+ {
+ public string Result { get; private set; }
+ public string FieldToUpdate { get; private set; }
+ private Dictionary comboBoxes = new Dictionary();
+ private Dictionary controlsDictionary = new Dictionary();
+ private Dictionary _TypesDictionary { get; set; }
+ private Dictionary enumTypes;
+ public EditRecordDialog(IEnumerable comboboxSource, IDictionary typesDictionary, string editedFieldToTitle,
+ IDictionary enumTypesDictionary)
+ {
+ this.InitializeComponent();
+ var valuesToCombobox = new List( comboboxSource);
+ _TypesDictionary = new Dictionary( typesDictionary as Dictionary);
+ valuesToCombobox.RemoveAt(0);
+ _TypesDictionary.Remove(0);
+ enumTypes = enumTypesDictionary as Dictionary;
+ CreateBasicInterface(valuesToCombobox, editedFieldToTitle);
+ fieldToEdit.SelectedIndex = 0;
+
+ }
+ private void CreateBasicInterface(IEnumerable comboboxSource, string editedFieldToTitle)
+ {
+ Title = editedFieldToTitle;
+
+ TextBox textBox = new TextBox();
+ textBox.VerticalAlignment = VerticalAlignment.Center;
+ //textBox.Width = 170;
+ textBox.Margin = new Thickness(20D);
+
+ grid.Children.Add(textBox);
+ Grid.SetRow(textBox, 2);
+ /*Button btn = new Button();
+ btn.Content = "+";
+ grid.Children.Add(btn);
+ comboBoxes.Add(0, fieldToEdit);*/
+ controlsDictionary.Add(0, textBox);
+ fieldToEdit.ItemsSource = comboboxSource;
+ }
+
+ private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
+ {
+ if (controlsDictionary[0] is ComboBox)
+ Result = (controlsDictionary[0] as ComboBox).SelectedItem.ToString();
+ else
+ Result = (controlsDictionary[0] as TextBox).Text;
+ FieldToUpdate = fieldToEdit.SelectedItem.ToString();
+
+ // return Result;
+ }
+
+ private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
+ {
+
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ //AddNextField();
+ }
+
+ private void FieldToEdit_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ int selectedIndex = fieldToEdit.SelectedIndex;
+ string selectedText = fieldToEdit.SelectedItem.ToString();
+ string typeOfField = _TypesDictionary[selectedIndex + 1];
+ int changeInRow = Grid.GetRow(sender as ComboBox);
+
+ // TODO: Dodać warunki co do pozostałych tabel, COMBOBOX JUZ JEST GENEROWANY!
+ if (typeOfField.ToLower() == "date")
+ additionalFormatInfo.Text = "Format: RRRR-MM-DD";
+ else
+ additionalFormatInfo.Text = "Format: brak wymagań";
+
+ if (enumTypes.Keys.ToList().Contains(selectedText))
+ {
+ // TODO: Dodać moze datapicker dla wartosci datowych ?
+ ComboBox cBox = new ComboBox();
+ Type type = enumTypes[selectedText];
+ List list = new List(Enum.GetNames(enumTypes[selectedText]).ToList());
+ List descriptionsList = new List();
+ foreach (string x in list)
+ {
+ var enumX = Enum.Parse(type, x);
+ descriptionsList.Add((enumX as Enum).GetEnumDescription());
+
+ }
+ cBox.VerticalAlignment = VerticalAlignment.Center;
+ cBox.HorizontalAlignment = HorizontalAlignment.Stretch;
+ cBox.Margin = new Thickness(20D);
+ cBox.ItemsSource = descriptionsList;
+ cBox.SelectedIndex = 0;
+ grid.Children.Remove(controlsDictionary[changeInRow]);
+ controlsDictionary[changeInRow] = cBox;
+ grid.Children.Insert(0, controlsDictionary[changeInRow]);
+ Grid.SetRow(cBox, 2);
+ additionalFilterInfo.Text = "Wybierz z dostępnych wartości";
+ //firstValueStackPanel.Children.Add(controlsDictionary[changeInRow]);
+ //additionalFilterInfo.Text = "Możliwości: 'KRYTYCZNY', 'STABILNY', 'ZAGROŻONY', 'NULL'";
+ }
+ else
+ {
+ TextBox tBox = new TextBox();
+ tBox.VerticalAlignment = VerticalAlignment.Center;
+ tBox.HorizontalAlignment = HorizontalAlignment.Stretch;
+ tBox.Margin = new Thickness(20D);
+ grid.Children.Remove(controlsDictionary[changeInRow]);
+ Grid.SetRow(tBox, 2);
+ controlsDictionary[changeInRow] = tBox;
+ grid.Children.Insert(0, controlsDictionary[changeInRow]);
+ additionalFilterInfo.Text = "Brak dodatkowych wymagań";
+ }
+
+
+ if (typeOfField == "varchar")
+ additionalTypeInfo.Text = "Typ: " + "text";
+ else
+ additionalTypeInfo.Text = "Typ: " + typeOfField;
+ }
+ }
+}
diff --git a/View/MainFrameView.xaml b/View/MainFrameView.xaml
index a38da51..95e360d 100644
--- a/View/MainFrameView.xaml
+++ b/View/MainFrameView.xaml
@@ -15,9 +15,9 @@
-
-
-
+
+
+
diff --git a/View/MainFrameView.xaml.cs b/View/MainFrameView.xaml.cs
index 216382c..8a20d5d 100644
--- a/View/MainFrameView.xaml.cs
+++ b/View/MainFrameView.xaml.cs
@@ -19,9 +19,7 @@ using Windows.UI.Xaml.Navigation;
namespace HospitalServerManager.View
{
- ///
- /// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
- ///
+ /// WebService powinien byc chyba wlasciwoscia w roznych kontrolerach np. GetController/PutController itp.
public sealed partial class MainFrameView : Page
{
private INavigator Navigator { get; set; }
@@ -37,26 +35,21 @@ namespace HospitalServerManager.View
Type pageType = TypeProvider.GetTypeFromString(pageTypeName);
IPageNavigateable page = Navigator.ChangeFrame(pageType, mainFrame);
- //mainFrame.Navigate(typeof(PatientsPage), new HospitalServerManager.ViewModel.Controllers.DatabaseReader());
- //Frame.Navigate(typeof(PatientsPage));
}
private void InitializeProperties()
{
IValidateIfInterfaceIsImplemented validator = new ViewModel.Validators.InterfaceImplementValidator();
- //mainFrame.Content = new AdmissionsPage();
- Navigator = new ViewNavigator(validator, /*mainFrame.Content as IPageNavigateable*/new PatientsPage());
- //Navigator.SetParameter(controler);
+ Navigator = new ViewNavigator(validator, new PatientsPage());
// TODO: Dodać pozostałe Page
TypeProvider = new ViewModel.DataProvider.NavigationPageTypeProvider(validator,
new List
{
- typeof(PatientsPage), typeof(DoctorsPage),
+ typeof(PatientsPage), typeof(DoctorsPage), typeof(AdmissionsPage), typeof(DiagnosesPage),
+ typeof(RoomsPage),
});
- Type pageType = TypeProvider.GetTypeFromString("PatientsPage");
+ Type pageType = TypeProvider.GetTypeFromString("AdmissionsPage");
Navigator.ChangeFrame(pageType, mainFrame);
- /*Type type = typeof(Model.Patient);
- type.In*/
}
}
}
diff --git a/View/NewRecordDialog.xaml.cs b/View/NewRecordDialog.xaml.cs
index cf2af03..c9ee245 100644
--- a/View/NewRecordDialog.xaml.cs
+++ b/View/NewRecordDialog.xaml.cs
@@ -60,7 +60,7 @@ namespace HospitalServerManager.View
grid.Children.Add(descriptionTextBlock);
Grid.SetRow(descriptionTextBlock, rowIndex);
// TODO: Dopisac pozostałe wyjatki dla pozostalych widokow
- if (typesOfColumn[rowIndex] == "date")
+ if (typesOfColumn[rowIndex].ToLower() == "date")
descriptionTextBlock.Text = "Format: RRRR-MM-DD";
else if (value == "PESEL")
descriptionTextBlock.Text = "Format: 11 cyfr";
diff --git a/View/PatientsPage.xaml.cs b/View/PatientsPage.xaml.cs
index 4fe7140..c5ed71d 100644
--- a/View/PatientsPage.xaml.cs
+++ b/View/PatientsPage.xaml.cs
@@ -1,19 +1,10 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
-using System.Runtime.InteropServices.WindowsRuntime;
-using Windows.Foundation;
-using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Controls.Primitives;
-using Windows.UI.Xaml.Data;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using HospitalServerManager.InterfacesAndEnums;
-using System.Collections.ObjectModel;
using HospitalServerManager.ViewModel;
//Szablon elementu Pusta strona jest udokumentowany na stronie https://go.microsoft.com/fwlink/?LinkId=234238
@@ -30,7 +21,6 @@ namespace HospitalServerManager.View
public PatientsPage()
{
this.InitializeComponent();
-
}
private async void NewRecord()
@@ -38,6 +28,8 @@ namespace HospitalServerManager.View
Dictionary typesOfColumnDictionary = (Dictionary) RosterViewModel.ColumnTypes;
NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
RosterViewModel.EnumTypes);
+ createDialog.Width = Window.Current.Bounds.Width;
+ createDialog.Height = Window.Current.Bounds.Height;
ContentDialogResult dialogResult = await createDialog.ShowAsync();
if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
{
@@ -45,37 +37,83 @@ namespace HospitalServerManager.View
RosterViewModel.CreateRecord("Pacjenci", valuesList);
}
}
+ private async void EditRecord()
+ {
+ PatientViewModel patient = databaseView.SelectedItem as PatientViewModel;
+ string textToTitle = "Edytowany pacjent: " + patient.Name + " " + patient.Surname;
+ EditRecordDialog dialog = new EditRecordDialog(RosterViewModel.ColumnNames, RosterViewModel.ColumnTypes, textToTitle,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await dialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && !string.IsNullOrEmpty(dialog.Result))
+ {
+ string result = dialog.Result;
+ string fieldToEdit = dialog.FieldToUpdate;
+ RosterViewModel.UpdateRecord("Pacjenci", patient, fieldToEdit, result);
+ }
+ }
+ public void Sort(string orderBy, string criterium)
+ {
+ RosterViewModel.Sort(typeof(PatientViewModel), "Pacjenci", orderBy, criterium);
+ }
+ public void Search(string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ RosterViewModel.Search(typeof(PatientViewModel), "Pacjenci", orderBy, criterium, searchIn, searchValue);
+ }
#region Events
private void SortComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
-
- }
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
private void RadionBtn_Click(object sender, RoutedEventArgs e)
{
-
- }
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
private void SearchButton_Click(object sender, RoutedEventArgs e)
{
-
+ if (searchBox.Text == string.Empty)
+ return;
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ string searchIn = lookInComboBox.SelectedItem.ToString();
+ string searchedExpression = searchBox.Text;
+ Search(sortComboBox.SelectedItem.ToString(), criterium, searchIn, searchedExpression);
}
- private void ResetButton_Click(object sender, RoutedEventArgs e)
+ private async void ResetButton_Click(object sender, RoutedEventArgs e)
{
-
- }
+ await RosterViewModel.Read(typeof(PatientViewModel), "Pacjenci");
+ }
private void DeleteButton_Click(object sender, RoutedEventArgs e)
{
-
- }
+ if (databaseView.SelectedItem != null)
+ {
+ var patient = databaseView.SelectedItem as IPrimaryKeyGetable;
+ RosterViewModel.DeleteRecord("Pacjenci", patient);
+ }
+ }
private void EditButton_Click(object sender, RoutedEventArgs e)
{
-
- }
+ if (databaseView.SelectedItem != null)
+ EditRecord();
+ }
private void NewRecordButton_Click(object sender, RoutedEventArgs e)
{
@@ -83,21 +121,20 @@ namespace HospitalServerManager.View
}
#endregion
- protected override async void OnNavigatedTo(NavigationEventArgs e)
+ protected async override void OnNavigatedTo(NavigationEventArgs e)
{
- await RosterViewModel.Read(typeof(PatientViewModel), "Pacjenci");
- //databaseReader = e.Parameter as HospitalServerManager.ViewModel.Controllers.DatabaseReader;
- //_IsDataLoaded = false;
- // DatabaseController.OnPropertyChanged("IsDataLoaded");
- }
+ //await RosterViewModel.Read(typeof(PatientViewModel), "Pacjenci");
+ await RosterViewModel.InitializeViewModels("Pacjenci");
+ databaseView.ItemsSource = RosterViewModel.ModelsCollection;
+ lookInComboBox.ItemsSource = sortComboBox.ItemsSource = RosterViewModel.ColumnNames;
+ lookInComboBox.SelectedIndex = sortComboBox.SelectedIndex = 0;
+ }
private async void Page_Loaded(object sender, RoutedEventArgs e)
{
- databaseView.ItemsSource = RosterViewModel.ModelsCollection;
- lookInComboBox.ItemsSource = RosterViewModel.ColumnNames;
- var sortList = RosterViewModel.ColumnNames.ToList();
- sortList.RemoveAt(0);
- sortComboBox.ItemsSource = sortList;
+ /*databaseView.ItemsSource = RosterViewModel.ModelsCollection;
+ lookInComboBox.ItemsSource = sortComboBox.ItemsSource = RosterViewModel.ColumnNames;
+ lookInComboBox.SelectedIndex = sortComboBox.SelectedIndex = 0;*/
}
public void UnloadPage()
diff --git a/View/RoomsPage.xaml b/View/RoomsPage.xaml
index 5b3d8f7..57713df 100644
--- a/View/RoomsPage.xaml
+++ b/View/RoomsPage.xaml
@@ -3,12 +3,154 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:HospitalServerManager.View"
+ xmlns:viewmodel="using:HospitalServerManager.ViewModel"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
- Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
+ Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Loaded="Page_Loaded">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/RoomsPage.xaml.cs b/View/RoomsPage.xaml.cs
index 5434df9..6821fde 100644
--- a/View/RoomsPage.xaml.cs
+++ b/View/RoomsPage.xaml.cs
@@ -1,4 +1,6 @@
-using System;
+using HospitalServerManager.InterfacesAndEnums;
+using HospitalServerManager.ViewModel;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -20,11 +22,126 @@ namespace HospitalServerManager.View
///
/// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
///
- public sealed partial class RoomsPage : Page
+ public sealed partial class RoomsPage : Page, IPageNavigateable
{
public RoomsPage()
{
this.InitializeComponent();
}
+ private async void NewRecord()
+ {
+ Dictionary typesOfColumnDictionary = (Dictionary)RosterViewModel.ColumnTypes;
+ NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await createDialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
+ {
+ List valuesList = createDialog.ValuesOfNewObject;
+ RosterViewModel.CreateRecord("Sale", valuesList);
+ }
+ }
+ private async void EditRecord()
+ {
+ RoomViewModel room = databaseView.SelectedItem as RoomViewModel;
+ string textToTitle = "Edytowany rekord: " + room.PrimaryKey;
+ EditRecordDialog dialog = new EditRecordDialog(RosterViewModel.ColumnNames, RosterViewModel.ColumnTypes, textToTitle,
+ RosterViewModel.EnumTypes);
+ ContentDialogResult dialogResult = await dialog.ShowAsync();
+ if (dialogResult == ContentDialogResult.Primary && !string.IsNullOrEmpty(dialog.Result))
+ {
+ string result = dialog.Result;
+ string fieldToEdit = dialog.FieldToUpdate;
+ RosterViewModel.UpdateRecord("Sale", room, fieldToEdit, result);
+ }
+ }
+ public void Sort(string orderBy, string criterium)
+ {
+ RosterViewModel.Sort(typeof(RoomViewModel), "Sale", orderBy, criterium);
+ }
+ public void Search(string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ RosterViewModel.Search(typeof(RoomViewModel), "Sale", orderBy, criterium, searchIn, searchValue);
+ }
+
+ #region Events
+
+ private void SortComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
+
+ private void RadionBtn_Click(object sender, RoutedEventArgs e)
+ {
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ Sort(sortComboBox.SelectedItem.ToString(), criterium);
+ }
+
+ private void SearchButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (searchBox.Text == string.Empty)
+ return;
+ string criterium;
+ if ((bool)radioBtn1.IsChecked)
+ criterium = "asc";
+ else
+ criterium = "desc";
+ string searchIn = lookInComboBox.SelectedItem.ToString();
+ string searchedExpression = searchBox.Text;
+ Search(sortComboBox.SelectedItem.ToString(), criterium, searchIn, searchedExpression);
+ }
+
+ private async void ResetButton_Click(object sender, RoutedEventArgs e)
+ {
+ await RosterViewModel.Read(typeof(RoomViewModel), "Sale");
+ }
+
+ private void DeleteButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ {
+ var room = databaseView.SelectedItem as IPrimaryKeyGetable;
+ RosterViewModel.DeleteRecord("Sale", room);
+ }
+ }
+
+ private void EditButton_Click(object sender, RoutedEventArgs e)
+ {
+ if (databaseView.SelectedItem != null)
+ EditRecord();
+ }
+
+ private void NewRecordButton_Click(object sender, RoutedEventArgs e)
+ {
+ NewRecord();
+ }
+ #endregion
+
+ protected async override void OnNavigatedTo(NavigationEventArgs e)
+ {
+ //await RosterViewModel.Read(typeof(RoomViewModel), "Sale");
+ await RosterViewModel.InitializeViewModels("Sale");
+ databaseView.ItemsSource = RosterViewModel.ModelsCollection;
+ lookInComboBox.ItemsSource = sortComboBox.ItemsSource = RosterViewModel.ColumnNames;
+ lookInComboBox.SelectedIndex = sortComboBox.SelectedIndex = 0;
+ }
+
+ private void Page_Loaded(object sender, RoutedEventArgs e)
+ {
+ ;
+ }
+
+ public void UnloadPage()
+ {
+ //throw new NotImplementedException();
+ }
}
}
diff --git a/ViewModel/AdmissionViewModel.cs b/ViewModel/AdmissionViewModel.cs
index db25ea3..a477e57 100644
--- a/ViewModel/AdmissionViewModel.cs
+++ b/ViewModel/AdmissionViewModel.cs
@@ -1,4 +1,5 @@
-using HospitalServerManager.Model.Basic;
+using HospitalServerManager.InterfacesAndEnums;
+using HospitalServerManager.Model.Basic;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,12 +8,12 @@ using System.Threading.Tasks;
namespace HospitalServerManager.ViewModel
{
- class AdmissionViewModel
+ class AdmissionViewModel : IPrimaryKeyGetable
{
private Admission model;
public string PrimaryKey { get => model.PrimaryKey; }
public DateTime AdmissionDate { get => model.AdmissionDate; }
- public DateTime LeavingDate { get => model.LeavingDate; }
+ public DateTime? LeavingDate { get => model.LeavingDate; }
public string PatientPESEL { get => model.PatientPESEL; }
public string DiagnosisSymbol { get => model.DiagnosisSymbol; }
public int MainDoctor { get => model.MainDoctor; }
@@ -24,5 +25,15 @@ namespace HospitalServerManager.ViewModel
{
this.model = model;
}
+
+ public string GetPrimaryKey()
+ {
+ return PrimaryKey;
+ }
+
+ public string GetPrimaryKeyName()
+ {
+ return model.PrimaryKeyName;
+ }
}
}
diff --git a/ViewModel/Controllers/DatabaseReader.cs b/ViewModel/Controllers/DatabaseReader.cs
index 2ba2dc1..0184ab3 100644
--- a/ViewModel/Controllers/DatabaseReader.cs
+++ b/ViewModel/Controllers/DatabaseReader.cs
@@ -11,12 +11,12 @@ namespace HospitalServerManager.ViewModel.Controllers
{
class DatabaseReader
{
- private List _ModelsList { get; set; }
+ private List _ModelsList { get; set; }
- public IReadOnlyList LastReadedModels { get => _ModelsList; }
+ public IReadOnlyList LastReadedModels { get => _ModelsList; }
public DatabaseReader()
{
- _ModelsList = new List();
+ _ModelsList = new List();
}
///
@@ -66,7 +66,7 @@ namespace HospitalServerManager.ViewModel.Controllers
}
var model = Activator.CreateInstance(typeOfModel, valueList);
- _ModelsList.Add(model as ISqlTableModelable);
+ _ModelsList.Add(model as ISqlTableModel);
}
return true;
}
diff --git a/ViewModel/DiagnosisViewModel.cs b/ViewModel/DiagnosisViewModel.cs
index c8f0950..382fe7f 100644
--- a/ViewModel/DiagnosisViewModel.cs
+++ b/ViewModel/DiagnosisViewModel.cs
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace HospitalServerManager.ViewModel
{
- class DiagnosisViewModel
+ class DiagnosisViewModel : IPrimaryKeyGetable
{
private Diagnosis model;
public string PrimaryKey { get => model.PrimaryKey; }
@@ -20,5 +20,15 @@ namespace HospitalServerManager.ViewModel
{
this.model = model;
}
+
+ public string GetPrimaryKey()
+ {
+ return PrimaryKey;
+ }
+
+ public string GetPrimaryKeyName()
+ {
+ return model.PrimaryKeyName;
+ }
}
}
diff --git a/ViewModel/DoctorViewModel.cs b/ViewModel/DoctorViewModel.cs
index 70d9758..ee0fa98 100644
--- a/ViewModel/DoctorViewModel.cs
+++ b/ViewModel/DoctorViewModel.cs
@@ -8,7 +8,7 @@ using HospitalServerManager.Model.Basic;
namespace HospitalServerManager.ViewModel
{
- class DoctorViewModel : ISqlTableModelable // TODO: Dodać intrefejs dla VIEW MODEL!!
+ class DoctorViewModel : IPrimaryKeyGetable // TODO: Dodać intrefejs dla VIEW MODEL!!
{
private Doctor model;
public string PrimaryKey { get => model.PrimaryKey; }
@@ -24,19 +24,14 @@ namespace HospitalServerManager.ViewModel
this.model = model;
}
- public List GetColumnNames()
- {
- throw new NotImplementedException();
- }
-
public string GetPrimaryKey()
{
- throw new NotImplementedException();
+ return PrimaryKey;
}
public string GetPrimaryKeyName()
{
- throw new NotImplementedException();
+ return model.PrimaryKeyName;
}
}
}
diff --git a/ViewModel/PatientViewModel.cs b/ViewModel/PatientViewModel.cs
index ba94c52..b34477d 100644
--- a/ViewModel/PatientViewModel.cs
+++ b/ViewModel/PatientViewModel.cs
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
namespace HospitalServerManager.ViewModel
{
//Zmienic interfejs na taki dla viewmodeli
- class PatientViewModel : ISqlTableModelable
+ class PatientViewModel : IPrimaryKeyGetable
{
private Patient model;
public string PrimaryKey { get => model.PrimaryKey; }
@@ -24,19 +24,14 @@ namespace HospitalServerManager.ViewModel
model = patient;
}
- public List GetColumnNames()
- {
- throw new NotImplementedException();
- }
-
public string GetPrimaryKey()
{
- throw new NotImplementedException();
+ return PrimaryKey;
}
public string GetPrimaryKeyName()
{
- throw new NotImplementedException();
+ return model.PrimaryKeyName;
}
}
}
diff --git a/ViewModel/RoomViewModel.cs b/ViewModel/RoomViewModel.cs
index 2c31ffb..e35aead 100644
--- a/ViewModel/RoomViewModel.cs
+++ b/ViewModel/RoomViewModel.cs
@@ -1,4 +1,5 @@
-using HospitalServerManager.Model.Basic;
+using HospitalServerManager.InterfacesAndEnums;
+using HospitalServerManager.Model.Basic;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,7 +8,7 @@ using System.Threading.Tasks;
namespace HospitalServerManager.ViewModel
{
- class RoomViewModel
+ class RoomViewModel : IPrimaryKeyGetable
{
private Room model;
public string PrimaryKey { get => model.PrimaryKey; }
@@ -18,5 +19,15 @@ namespace HospitalServerManager.ViewModel
{
this.model = model;
}
+
+ public string GetPrimaryKey()
+ {
+ return PrimaryKey;
+ }
+
+ public string GetPrimaryKeyName()
+ {
+ return model.PrimaryKeyName;
+ }
}
}
diff --git a/ViewModel/RosterViewModel.cs b/ViewModel/RosterViewModel.cs
index dd68245..0ac7c7d 100644
--- a/ViewModel/RosterViewModel.cs
+++ b/ViewModel/RosterViewModel.cs
@@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using HospitalServerManager.InterfacesAndEnums;
using HospitalServerManager.Model;
+using HospitalServerManager.Model.Basic;
using HospitalServerManager.Model.Controllers;
namespace HospitalServerManager.ViewModel
@@ -12,10 +13,9 @@ namespace HospitalServerManager.ViewModel
class RosterViewModel
{
private ModelRoster _Roster { get; set; }
- private IProvideDBInfo databaseInfoProvider;
private Controllers.DatabaseReader DbReader { get; set; }
- private List ModelsList => _Roster.ModelsEnumerable.ToList();
- public RangeObservableCollection ModelsCollection = new RangeObservableCollection();
+ private List ModelsList => _Roster.ModelsEnumerable.ToList();
+ public RangeObservableCollection ModelsCollection = new RangeObservableCollection();
public IEnumerable ColumnNames { get => _Roster.ColumnNames; }
public IDictionary ColumnTypes { get => _Roster.ColumnTypes; }
public Dictionary EnumTypes { get => _Roster.EnumTypes; }
@@ -29,19 +29,53 @@ namespace HospitalServerManager.ViewModel
public async Task Read(Type viewModel, string tableName)
{
ModelsCollection.Clear();
- /*await DbReader.ReadDataFromDatabase(@"Data Source=MARCELPC;Initial Catalog = DB_s439397; Integrated Security = true;",
- "SELECT * FROM Pacjenci", typeof(Model.Basic.Patient));*/
- List lista = new List();
- // DbReader.LastReadedModels.ToList().ForEach(model => lista.Add(new PatientViewModel(model as HospitalServerManager.Model.Basic.Patient)));
+ List lista = new List();
await _Roster.ReadModels(tableName);
- ModelsList.ToList().ForEach(model => lista.Add((ISqlTableModelable)Activator.CreateInstance(viewModel, model)));
- //_Roster.AddRange(lista);
+ ModelsList.ToList().ForEach(model => lista.Add((IPrimaryKeyGetable)Activator.CreateInstance(viewModel, model)));
ModelsCollection.AddRange(lista);
return;
}
+ public async Task InitializeViewModels(string tableName)
+ {
+ await _Roster.GetColumnNames(tableName);
+ await _Roster.GetColumnTypes(tableName);
+ }
+ private async Task GetColumnNames(string tableName)
+ {
+ await _Roster.GetColumnNames(tableName);
+ }
public void CreateRecord(string tableName, IEnumerable valuesList)
{
_Roster.CreateRecord(tableName, valuesList);
}
- }
+ public void UpdateRecord(string tableName, IPrimaryKeyGetable viewModel, string fieldToUpdate, string valueToUpdate)
+ {
+ _Roster.UpdateRecord(tableName, viewModel.GetPrimaryKey(), viewModel.GetPrimaryKeyName() , fieldToUpdate, valueToUpdate);
+ }
+ public void DeleteRecord(string tableName, IPrimaryKeyGetable viewModel)
+ {
+ var actualModelType = ModelsList[0].GetType();
+ var sqlModelToDelete = ModelsList.Where(x => (x as SqlTable).PrimaryKey == viewModel.GetPrimaryKey()).First();
+ _Roster.DeleteRecord(tableName, sqlModelToDelete as SqlTable);
+ }
+ public async void Sort(Type viewModel, string tableName, string orderBy, string criterium)
+ {
+ ModelsCollection.Clear();
+ List lista = new List();
+ await _Roster.Sort(tableName, orderBy, criterium);
+ ModelsList.ToList().ForEach(model => lista.Add((IPrimaryKeyGetable)Activator.CreateInstance(viewModel, model)));
+ ModelsCollection.AddRange(lista);
+ return;
+ }
+ public async void Search(Type viewModel, string tableName, string orderBy, string criterium, string searchIn, string searchValue)
+ {
+ ModelsCollection.Clear();
+ List lista = new List();
+ await _Roster.Search(tableName, orderBy, criterium, searchIn, searchValue);
+ ModelsList.ToList().ForEach(model => lista.Add((IPrimaryKeyGetable)Activator.CreateInstance(viewModel, model)));
+ ModelsCollection.AddRange(lista);
+ return;
+ }
+
+ }
}
diff --git a/ViewModel/SurgeryViewModel.cs b/ViewModel/SurgeryViewModel.cs
index 0da3832..ebfc4c1 100644
--- a/ViewModel/SurgeryViewModel.cs
+++ b/ViewModel/SurgeryViewModel.cs
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace HospitalServerManager.ViewModel
{
- class SurgeryViewModel
+ class SurgeryViewModel : IPrimaryKeyGetable
{
private Surgery model;
public string PrimaryKey { get => model.PrimaryKey; }
@@ -22,5 +22,15 @@ namespace HospitalServerManager.ViewModel
{
this.model = model;
}
+
+ public string GetPrimaryKey()
+ {
+ return PrimaryKey;
+ }
+
+ public string GetPrimaryKeyName()
+ {
+ return model.PrimaryKeyName;
+ }
}
}
diff --git a/bin/x86/Debug/App.xbf b/bin/x86/Debug/App.xbf
index f85e235..5a1d538 100644
Binary files a/bin/x86/Debug/App.xbf and b/bin/x86/Debug/App.xbf differ
diff --git a/bin/x86/Debug/AppX/App.xbf b/bin/x86/Debug/AppX/App.xbf
index f85e235..5a1d538 100644
Binary files a/bin/x86/Debug/AppX/App.xbf and b/bin/x86/Debug/AppX/App.xbf differ
diff --git a/bin/x86/Debug/AppX/HospitalServerManager.xr.xml b/bin/x86/Debug/AppX/HospitalServerManager.xr.xml
index 1ac2aed..e20d0e9 100644
--- a/bin/x86/Debug/AppX/HospitalServerManager.xr.xml
+++ b/bin/x86/Debug/AppX/HospitalServerManager.xr.xml
@@ -128,7 +128,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -148,14 +161,6 @@
-
-
-
-
-
-
-
-
diff --git a/bin/x86/Debug/AppX/View/AdmissionsPage.xbf b/bin/x86/Debug/AppX/View/AdmissionsPage.xbf
new file mode 100644
index 0000000..1edf919
Binary files /dev/null and b/bin/x86/Debug/AppX/View/AdmissionsPage.xbf differ
diff --git a/bin/x86/Debug/AppX/View/DiagnosesPage.xbf b/bin/x86/Debug/AppX/View/DiagnosesPage.xbf
new file mode 100644
index 0000000..daca93d
Binary files /dev/null and b/bin/x86/Debug/AppX/View/DiagnosesPage.xbf differ
diff --git a/bin/x86/Debug/AppX/View/DoctorsPage.xbf b/bin/x86/Debug/AppX/View/DoctorsPage.xbf
index 74f454b..0911e6a 100644
Binary files a/bin/x86/Debug/AppX/View/DoctorsPage.xbf and b/bin/x86/Debug/AppX/View/DoctorsPage.xbf differ
diff --git a/bin/x86/Debug/AppX/View/EditRecordDialog.xbf b/bin/x86/Debug/AppX/View/EditRecordDialog.xbf
new file mode 100644
index 0000000..6b46ff0
Binary files /dev/null and b/bin/x86/Debug/AppX/View/EditRecordDialog.xbf differ
diff --git a/bin/x86/Debug/AppX/View/MainFrameView.xbf b/bin/x86/Debug/AppX/View/MainFrameView.xbf
index 911e61f..15deffe 100644
Binary files a/bin/x86/Debug/AppX/View/MainFrameView.xbf and b/bin/x86/Debug/AppX/View/MainFrameView.xbf differ
diff --git a/bin/x86/Debug/AppX/View/NewRecordDialog.xbf b/bin/x86/Debug/AppX/View/NewRecordDialog.xbf
index 5f8e2f4..f97d487 100644
Binary files a/bin/x86/Debug/AppX/View/NewRecordDialog.xbf and b/bin/x86/Debug/AppX/View/NewRecordDialog.xbf differ
diff --git a/bin/x86/Debug/AppX/View/PatientsPage.xbf b/bin/x86/Debug/AppX/View/PatientsPage.xbf
index bd3ab8f..fbab531 100644
Binary files a/bin/x86/Debug/AppX/View/PatientsPage.xbf and b/bin/x86/Debug/AppX/View/PatientsPage.xbf differ
diff --git a/bin/x86/Debug/AppX/View/RoomsPage.xbf b/bin/x86/Debug/AppX/View/RoomsPage.xbf
index 6ff1276..fa602d0 100644
Binary files a/bin/x86/Debug/AppX/View/RoomsPage.xbf and b/bin/x86/Debug/AppX/View/RoomsPage.xbf differ
diff --git a/bin/x86/Debug/AppX/View/UserControls/ColumnListView.xbf b/bin/x86/Debug/AppX/View/UserControls/ColumnListView.xbf
index 455f0e4..0a3df4f 100644
Binary files a/bin/x86/Debug/AppX/View/UserControls/ColumnListView.xbf and b/bin/x86/Debug/AppX/View/UserControls/ColumnListView.xbf differ
diff --git a/bin/x86/Debug/AppX/entrypoint/HospitalServerManager.exe b/bin/x86/Debug/AppX/entrypoint/HospitalServerManager.exe
index 18ba8fe..afdd0a3 100644
Binary files a/bin/x86/Debug/AppX/entrypoint/HospitalServerManager.exe and b/bin/x86/Debug/AppX/entrypoint/HospitalServerManager.exe differ
diff --git a/bin/x86/Debug/AppX/resources.pri b/bin/x86/Debug/AppX/resources.pri
index 83ae89d..224d8a6 100644
Binary files a/bin/x86/Debug/AppX/resources.pri and b/bin/x86/Debug/AppX/resources.pri differ
diff --git a/bin/x86/Debug/AppX/vs.appxrecipe b/bin/x86/Debug/AppX/vs.appxrecipe
index e39fc51..c1ca2bb 100644
--- a/bin/x86/Debug/AppX/vs.appxrecipe
+++ b/bin/x86/Debug/AppX/vs.appxrecipe
@@ -30,13 +30,13 @@
AppxManifest.xml
true
- 2018-12-28T18:47:53.642
+ 2019-01-06T18:01:50.131
entrypoint\HospitalServerManager.exe
- 2018-12-28T18:47:53.301
+ 2019-01-06T18:01:49.804
Newtonsoft.Json.dll
@@ -738,35 +738,47 @@
HospitalServerManager.xr.xml
- 2018-12-28T18:09:39.467
+ 2019-01-06T14:54:13.864
App.xbf
- 2018-12-28T18:47:53.110
+ 2019-01-06T18:01:49.561
+
+
+ View\AdmissionsPage.xbf
+ 2019-01-06T18:01:49.561
+
+
+ View\DiagnosesPage.xbf
+ 2019-01-06T18:01:49.562
View\DoctorsPage.xbf
- 2018-12-28T18:47:53.111
+ 2019-01-06T18:01:49.562
+
+
+ View\EditRecordDialog.xbf
+ 2019-01-06T18:01:49.562
View\MainFrameView.xbf
- 2018-12-28T18:47:53.111
+ 2019-01-06T18:01:49.562
View\NewRecordDialog.xbf
- 2018-12-28T18:47:53.111
+ 2019-01-06T18:01:49.562
View\PatientsPage.xbf
- 2018-12-28T18:47:53.112
+ 2019-01-06T18:01:49.563
View\RoomsPage.xbf
- 2018-12-28T18:47:53.112
+ 2019-01-06T18:01:49.563
View\UserControls\ColumnListView.xbf
- 2018-12-28T18:47:53.112
+ 2019-01-06T18:01:49.563
WinMetadata\Windows.winmd
@@ -774,11 +786,11 @@
resources.pri
- 2018-12-28T18:09:40.377
+ 2019-01-06T14:54:14.579
HospitalServerManager.exe
- 2018-12-28T18:47:53.637
+ 2019-01-06T18:01:50.126
diff --git a/bin/x86/Debug/HospitalServerManager.build.appxrecipe b/bin/x86/Debug/HospitalServerManager.build.appxrecipe
index a0f7391..c7b78e6 100644
--- a/bin/x86/Debug/HospitalServerManager.build.appxrecipe
+++ b/bin/x86/Debug/HospitalServerManager.build.appxrecipe
@@ -559,9 +559,18 @@
App.xbf
+
+ View\AdmissionsPage.xbf
+
+
+ View\DiagnosesPage.xbf
+
View\DoctorsPage.xbf
+
+ View\EditRecordDialog.xbf
+
View\MainFrameView.xbf
diff --git a/bin/x86/Debug/HospitalServerManager.exe b/bin/x86/Debug/HospitalServerManager.exe
index 18ba8fe..afdd0a3 100644
Binary files a/bin/x86/Debug/HospitalServerManager.exe and b/bin/x86/Debug/HospitalServerManager.exe differ
diff --git a/bin/x86/Debug/HospitalServerManager.pdb b/bin/x86/Debug/HospitalServerManager.pdb
index ded3d61..82dbfc1 100644
Binary files a/bin/x86/Debug/HospitalServerManager.pdb and b/bin/x86/Debug/HospitalServerManager.pdb differ
diff --git a/bin/x86/Debug/HospitalServerManager.xr.xml b/bin/x86/Debug/HospitalServerManager.xr.xml
index 1ac2aed..e20d0e9 100644
--- a/bin/x86/Debug/HospitalServerManager.xr.xml
+++ b/bin/x86/Debug/HospitalServerManager.xr.xml
@@ -128,7 +128,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -148,14 +161,6 @@
-
-
-
-
-
-
-
-
diff --git a/bin/x86/Debug/View/AdmissionsPage.xbf b/bin/x86/Debug/View/AdmissionsPage.xbf
new file mode 100644
index 0000000..1edf919
Binary files /dev/null and b/bin/x86/Debug/View/AdmissionsPage.xbf differ
diff --git a/bin/x86/Debug/View/DiagnosesPage.xbf b/bin/x86/Debug/View/DiagnosesPage.xbf
new file mode 100644
index 0000000..daca93d
Binary files /dev/null and b/bin/x86/Debug/View/DiagnosesPage.xbf differ
diff --git a/bin/x86/Debug/View/DoctorsPage.xbf b/bin/x86/Debug/View/DoctorsPage.xbf
index 74f454b..0911e6a 100644
Binary files a/bin/x86/Debug/View/DoctorsPage.xbf and b/bin/x86/Debug/View/DoctorsPage.xbf differ
diff --git a/bin/x86/Debug/View/EditRecordDialog.xbf b/bin/x86/Debug/View/EditRecordDialog.xbf
new file mode 100644
index 0000000..6b46ff0
Binary files /dev/null and b/bin/x86/Debug/View/EditRecordDialog.xbf differ
diff --git a/bin/x86/Debug/View/MainFrameView.xbf b/bin/x86/Debug/View/MainFrameView.xbf
index 911e61f..15deffe 100644
Binary files a/bin/x86/Debug/View/MainFrameView.xbf and b/bin/x86/Debug/View/MainFrameView.xbf differ
diff --git a/bin/x86/Debug/View/NewRecordDialog.xbf b/bin/x86/Debug/View/NewRecordDialog.xbf
index 5f8e2f4..f97d487 100644
Binary files a/bin/x86/Debug/View/NewRecordDialog.xbf and b/bin/x86/Debug/View/NewRecordDialog.xbf differ
diff --git a/bin/x86/Debug/View/PatientsPage.xbf b/bin/x86/Debug/View/PatientsPage.xbf
index bd3ab8f..fbab531 100644
Binary files a/bin/x86/Debug/View/PatientsPage.xbf and b/bin/x86/Debug/View/PatientsPage.xbf differ
diff --git a/bin/x86/Debug/View/RoomsPage.xbf b/bin/x86/Debug/View/RoomsPage.xbf
index 6ff1276..fa602d0 100644
Binary files a/bin/x86/Debug/View/RoomsPage.xbf and b/bin/x86/Debug/View/RoomsPage.xbf differ
diff --git a/bin/x86/Debug/View/UserControls/ColumnListView.xbf b/bin/x86/Debug/View/UserControls/ColumnListView.xbf
index 455f0e4..0a3df4f 100644
Binary files a/bin/x86/Debug/View/UserControls/ColumnListView.xbf and b/bin/x86/Debug/View/UserControls/ColumnListView.xbf differ
diff --git a/bin/x86/Debug/resources.pri b/bin/x86/Debug/resources.pri
index 83ae89d..224d8a6 100644
Binary files a/bin/x86/Debug/resources.pri and b/bin/x86/Debug/resources.pri differ
diff --git a/obj/x86/Debug/App.xbf b/obj/x86/Debug/App.xbf
index f85e235..5a1d538 100644
Binary files a/obj/x86/Debug/App.xbf and b/obj/x86/Debug/App.xbf differ
diff --git a/obj/x86/Debug/HospitalServerManager.csproj.CoreCompileInputs.cache b/obj/x86/Debug/HospitalServerManager.csproj.CoreCompileInputs.cache
index 9992eb7..0f27b75 100644
--- a/obj/x86/Debug/HospitalServerManager.csproj.CoreCompileInputs.cache
+++ b/obj/x86/Debug/HospitalServerManager.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-941c3f1a8423bd3d7083b7479824892c4db76de2
+f03c17be22ceb22b1ce3324e21e3371a79db21a6
diff --git a/obj/x86/Debug/HospitalServerManager.csproj.FileListAbsolute.txt b/obj/x86/Debug/HospitalServerManager.csproj.FileListAbsolute.txt
index 86eaf0e..db69db9 100644
--- a/obj/x86/Debug/HospitalServerManager.csproj.FileListAbsolute.txt
+++ b/obj/x86/Debug/HospitalServerManager.csproj.FileListAbsolute.txt
@@ -927,3 +927,18 @@ C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\
C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\NewRecordDialog.xaml
C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\NewRecordDialog.xbf
C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\NewRecordDialog.xbf
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\EditRecordDialog.xbf
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\EditRecordDialog.g.i.cs
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\EditRecordDialog.g.cs
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\EditRecordDialog.xaml
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\EditRecordDialog.xbf
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\AdmissionsPage.xbf
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\AdmissionsPage.g.i.cs
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\AdmissionsPage.g.cs
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\AdmissionsPage.xaml
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\AdmissionsPage.xbf
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\DiagnosesPage.xbf
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\DiagnosesPage.g.i.cs
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\DiagnosesPage.g.cs
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\DiagnosesPage.xaml
+C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\DiagnosesPage.xbf
diff --git a/obj/x86/Debug/HospitalServerManager.exe b/obj/x86/Debug/HospitalServerManager.exe
index 18ba8fe..afdd0a3 100644
Binary files a/obj/x86/Debug/HospitalServerManager.exe and b/obj/x86/Debug/HospitalServerManager.exe differ
diff --git a/obj/x86/Debug/HospitalServerManager.pdb b/obj/x86/Debug/HospitalServerManager.pdb
index ded3d61..82dbfc1 100644
Binary files a/obj/x86/Debug/HospitalServerManager.pdb and b/obj/x86/Debug/HospitalServerManager.pdb differ
diff --git a/obj/x86/Debug/HospitalServerManager.xr.xml b/obj/x86/Debug/HospitalServerManager.xr.xml
index 1ac2aed..e20d0e9 100644
--- a/obj/x86/Debug/HospitalServerManager.xr.xml
+++ b/obj/x86/Debug/HospitalServerManager.xr.xml
@@ -128,7 +128,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -148,14 +161,6 @@
-
-
-
-
-
-
-
-
diff --git a/obj/x86/Debug/View/AdmissionsPage.g.cs b/obj/x86/Debug/View/AdmissionsPage.g.cs
new file mode 100644
index 0000000..fe009cc
--- /dev/null
+++ b/obj/x86/Debug/View/AdmissionsPage.g.cs
@@ -0,0 +1,402 @@
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\AdmissionsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E7F790C1DC46B1BD7555B0808C61D134"
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace HospitalServerManager.View
+{
+ partial class AdmissionsPage :
+ global::Windows.UI.Xaml.Controls.Page,
+ global::Windows.UI.Xaml.Markup.IComponentConnector,
+ global::Windows.UI.Xaml.Markup.IComponentConnector2
+ {
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private static class XamlBindingSetters
+ {
+ public static void Set_Windows_UI_Xaml_Controls_TextBlock_Text(global::Windows.UI.Xaml.Controls.TextBlock obj, global::System.String value, string targetNullValue)
+ {
+ if (value == null && targetNullValue != null)
+ {
+ value = targetNullValue;
+ }
+ obj.Text = value ?? global::System.String.Empty;
+ }
+ };
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private class AdmissionsPage_obj5_Bindings :
+ global::Windows.UI.Xaml.IDataTemplateExtension,
+ global::Windows.UI.Xaml.Markup.IDataTemplateComponent,
+ global::Windows.UI.Xaml.Markup.IComponentConnector,
+ IAdmissionsPage_Bindings
+ {
+ private global::HospitalServerManager.ViewModel.AdmissionViewModel dataRoot;
+ private bool initialized = false;
+ private const int NOT_PHASED = (1 << 31);
+ private const int DATA_CHANGED = (1 << 30);
+ private bool removedDataContextHandler = false;
+
+ // Fields for each control that has bindings.
+ private global::System.WeakReference obj5;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj6;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj7;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj8;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj9;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj10;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj11;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj12;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj13;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj14;
+
+ public AdmissionsPage_obj5_Bindings()
+ {
+ }
+
+ // IComponentConnector
+
+ public void Connect(int connectionId, global::System.Object target)
+ {
+ switch(connectionId)
+ {
+ case 5: // View\AdmissionsPage.xaml line 145
+ this.obj5 = new global::System.WeakReference((global::Windows.UI.Xaml.Controls.Grid)target);
+ break;
+ case 6: // View\AdmissionsPage.xaml line 157
+ this.obj6 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 7: // View\AdmissionsPage.xaml line 160
+ this.obj7 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 8: // View\AdmissionsPage.xaml line 163
+ this.obj8 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 9: // View\AdmissionsPage.xaml line 165
+ this.obj9 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 10: // View\AdmissionsPage.xaml line 167
+ this.obj10 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 11: // View\AdmissionsPage.xaml line 169
+ this.obj11 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 12: // View\AdmissionsPage.xaml line 171
+ this.obj12 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 13: // View\AdmissionsPage.xaml line 173
+ this.obj13 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 14: // View\AdmissionsPage.xaml line 175
+ this.obj14 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ default:
+ break;
+ }
+ }
+
+ public void DataContextChangedHandler(global::Windows.UI.Xaml.FrameworkElement sender, global::Windows.UI.Xaml.DataContextChangedEventArgs args)
+ {
+ if (this.SetDataRoot(args.NewValue))
+ {
+ this.Update();
+ }
+ }
+
+ // IDataTemplateExtension
+
+ public bool ProcessBinding(uint phase)
+ {
+ throw new global::System.NotImplementedException();
+ }
+
+ public int ProcessBindings(global::Windows.UI.Xaml.Controls.ContainerContentChangingEventArgs args)
+ {
+ int nextPhase = -1;
+ ProcessBindings(args.Item, args.ItemIndex, (int)args.Phase, out nextPhase);
+ return nextPhase;
+ }
+
+ public void ResetTemplate()
+ {
+ Recycle();
+ }
+
+ // IDataTemplateComponent
+
+ public void ProcessBindings(global::System.Object item, int itemIndex, int phase, out int nextPhase)
+ {
+ nextPhase = -1;
+ switch(phase)
+ {
+ case 0:
+ nextPhase = -1;
+ this.SetDataRoot(item);
+ if (!removedDataContextHandler)
+ {
+ removedDataContextHandler = true;
+ (this.obj5.Target as global::Windows.UI.Xaml.Controls.Grid).DataContextChanged -= this.DataContextChangedHandler;
+ }
+ this.initialized = true;
+ break;
+ }
+ this.Update_((global::HospitalServerManager.ViewModel.AdmissionViewModel) item, 1 << phase);
+ }
+
+ public void Recycle()
+ {
+ }
+
+ // IAdmissionsPage_Bindings
+
+ public void Initialize()
+ {
+ if (!this.initialized)
+ {
+ this.Update();
+ }
+ }
+
+ public void Update()
+ {
+ this.Update_(this.dataRoot, NOT_PHASED);
+ this.initialized = true;
+ }
+
+ public void StopTracking()
+ {
+ }
+
+ public void DisconnectUnloadedObject(int connectionId)
+ {
+ throw new global::System.ArgumentException("No unloadable elements to disconnect.");
+ }
+
+ public bool SetDataRoot(global::System.Object newDataRoot)
+ {
+ if (newDataRoot != null)
+ {
+ this.dataRoot = (global::HospitalServerManager.ViewModel.AdmissionViewModel)newDataRoot;
+ return true;
+ }
+ return false;
+ }
+
+ // Update methods for each path node used in binding steps.
+ private void Update_(global::HospitalServerManager.ViewModel.AdmissionViewModel obj, int phase)
+ {
+ if (obj != null)
+ {
+ if ((phase & (NOT_PHASED | (1 << 0))) != 0)
+ {
+ this.Update_PrimaryKey(obj.PrimaryKey, phase);
+ this.Update_AdmissionDate(obj.AdmissionDate, phase);
+ this.Update_LeavingDate(obj.LeavingDate, phase);
+ this.Update_PatientPESEL(obj.PatientPESEL, phase);
+ this.Update_DiagnosisSymbol(obj.DiagnosisSymbol, phase);
+ this.Update_MainDoctor(obj.MainDoctor, phase);
+ this.Update_OperationID(obj.OperationID, phase);
+ this.Update_RoomNumber(obj.RoomNumber, phase);
+ this.Update_IsPlanned(obj.IsPlanned, phase);
+ }
+ }
+ }
+ private void Update_PrimaryKey(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 157
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj6, obj, null);
+ }
+ }
+ private void Update_AdmissionDate(global::System.DateTime obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 160
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj7, obj.ToString(), null);
+ }
+ }
+ private void Update_LeavingDate(global::System.Nullable obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 163
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj8, obj.ToString(), null);
+ }
+ }
+ private void Update_PatientPESEL(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 165
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj9, obj, null);
+ }
+ }
+ private void Update_DiagnosisSymbol(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 167
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj10, obj, null);
+ }
+ }
+ private void Update_MainDoctor(global::System.Int32 obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 169
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj11, obj.ToString(), null);
+ }
+ }
+ private void Update_OperationID(global::System.Nullable obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 171
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj12, obj.ToString(), null);
+ }
+ }
+ private void Update_RoomNumber(global::System.Int32 obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 173
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj13, obj.ToString(), null);
+ }
+ }
+ private void Update_IsPlanned(global::System.Boolean obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\AdmissionsPage.xaml line 175
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj14, obj.ToString(), null);
+ }
+ }
+ }
+ ///
+ /// Connect()
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void Connect(int connectionId, object target)
+ {
+ switch(connectionId)
+ {
+ case 1: // View\AdmissionsPage.xaml line 1
+ {
+ global::Windows.UI.Xaml.Controls.Page element1 = (global::Windows.UI.Xaml.Controls.Page)(target);
+ ((global::Windows.UI.Xaml.Controls.Page)element1).Loaded += this.Page_Loaded;
+ }
+ break;
+ case 2: // View\AdmissionsPage.xaml line 12
+ {
+ this.RosterViewModel = (global::HospitalServerManager.ViewModel.RosterViewModel)(target);
+ }
+ break;
+ case 3: // View\AdmissionsPage.xaml line 31
+ {
+ this.pageTitle = (global::Windows.UI.Xaml.Controls.TextBlock)(target);
+ }
+ break;
+ case 4: // View\AdmissionsPage.xaml line 132
+ {
+ this.databaseView = (global::Windows.UI.Xaml.Controls.ListView)(target);
+ }
+ break;
+ case 16: // View\AdmissionsPage.xaml line 85
+ {
+ this.sortComboBox = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
+ ((global::Windows.UI.Xaml.Controls.ComboBox)this.sortComboBox).SelectionChanged += this.SortComboBox_SelectionChanged;
+ }
+ break;
+ case 17: // View\AdmissionsPage.xaml line 88
+ {
+ this.radioBtn1 = (global::Windows.UI.Xaml.Controls.RadioButton)(target);
+ ((global::Windows.UI.Xaml.Controls.RadioButton)this.radioBtn1).Click += this.RadionBtn_Click;
+ }
+ break;
+ case 18: // View\AdmissionsPage.xaml line 89
+ {
+ this.radionBtn2 = (global::Windows.UI.Xaml.Controls.RadioButton)(target);
+ ((global::Windows.UI.Xaml.Controls.RadioButton)this.radionBtn2).Click += this.RadionBtn_Click;
+ }
+ break;
+ case 19: // View\AdmissionsPage.xaml line 58
+ {
+ this.searchBox = (global::Windows.UI.Xaml.Controls.TextBox)(target);
+ }
+ break;
+ case 20: // View\AdmissionsPage.xaml line 60
+ {
+ this.lookInComboBox = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
+ }
+ break;
+ case 21: // View\AdmissionsPage.xaml line 63
+ {
+ global::Windows.UI.Xaml.Controls.Button element21 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element21).Click += this.SearchButton_Click;
+ }
+ break;
+ case 22: // View\AdmissionsPage.xaml line 64
+ {
+ global::Windows.UI.Xaml.Controls.Button element22 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element22).Click += this.ResetButton_Click;
+ }
+ break;
+ case 23: // View\AdmissionsPage.xaml line 34
+ {
+ global::Windows.UI.Xaml.Controls.Button element23 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element23).Click += this.NewRecordButton_Click;
+ }
+ break;
+ case 24: // View\AdmissionsPage.xaml line 35
+ {
+ global::Windows.UI.Xaml.Controls.Button element24 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element24).Click += this.DeleteButton_Click;
+ }
+ break;
+ case 25: // View\AdmissionsPage.xaml line 36
+ {
+ global::Windows.UI.Xaml.Controls.Button element25 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element25).Click += this.EditButton_Click;
+ }
+ break;
+ default:
+ break;
+ }
+ this._contentLoaded = true;
+ }
+
+ ///
+ /// GetBindingConnector(int connectionId, object target)
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target)
+ {
+ global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null;
+ switch(connectionId)
+ {
+ case 5: // View\AdmissionsPage.xaml line 145
+ {
+ global::Windows.UI.Xaml.Controls.Grid element5 = (global::Windows.UI.Xaml.Controls.Grid)target;
+ AdmissionsPage_obj5_Bindings bindings = new AdmissionsPage_obj5_Bindings();
+ returnValue = bindings;
+ bindings.SetDataRoot(element5.DataContext);
+ element5.DataContextChanged += bindings.DataContextChangedHandler;
+ global::Windows.UI.Xaml.DataTemplate.SetExtensionInstance(element5, bindings);
+ global::Windows.UI.Xaml.Markup.XamlBindingHelper.SetDataTemplateComponent(element5, bindings);
+ }
+ break;
+ }
+ return returnValue;
+ }
+ }
+}
+
diff --git a/obj/x86/Debug/View/AdmissionsPage.g.i.cs b/obj/x86/Debug/View/AdmissionsPage.g.i.cs
new file mode 100644
index 0000000..fdb1389
--- /dev/null
+++ b/obj/x86/Debug/View/AdmissionsPage.g.i.cs
@@ -0,0 +1,67 @@
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\AdmissionsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E7F790C1DC46B1BD7555B0808C61D134"
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace HospitalServerManager.View
+{
+ partial class AdmissionsPage : global::Windows.UI.Xaml.Controls.Page
+ {
+
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::HospitalServerManager.ViewModel.RosterViewModel RosterViewModel;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBlock pageTitle;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ListView databaseView;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ComboBox sortComboBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.RadioButton radioBtn1;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.RadioButton radionBtn2;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBox searchBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ComboBox lookInComboBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private bool _contentLoaded;
+
+ ///
+ /// InitializeComponent()
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent()
+ {
+ if (_contentLoaded)
+ return;
+
+ _contentLoaded = true;
+
+ global::System.Uri resourceLocator = new global::System.Uri("ms-appx:///View/AdmissionsPage.xaml");
+ global::Windows.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
+ }
+
+ partial void UnloadObject(global::Windows.UI.Xaml.DependencyObject unloadableObject);
+
+ private interface IAdmissionsPage_Bindings
+ {
+ void Initialize();
+ void Update();
+ void StopTracking();
+ void DisconnectUnloadedObject(int connectionId);
+ }
+#pragma warning disable 0169 // Proactively suppress unused field warning in case Bindings is not used.
+ private IAdmissionsPage_Bindings Bindings;
+#pragma warning restore 0169
+ }
+}
+
+
diff --git a/obj/x86/Debug/View/AdmissionsPage.xaml b/obj/x86/Debug/View/AdmissionsPage.xaml
new file mode 100644
index 0000000..69f02ee
--- /dev/null
+++ b/obj/x86/Debug/View/AdmissionsPage.xaml
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/obj/x86/Debug/View/AdmissionsPage.xbf b/obj/x86/Debug/View/AdmissionsPage.xbf
new file mode 100644
index 0000000..1edf919
Binary files /dev/null and b/obj/x86/Debug/View/AdmissionsPage.xbf differ
diff --git a/obj/x86/Debug/View/DiagnosesPage.g.cs b/obj/x86/Debug/View/DiagnosesPage.g.cs
new file mode 100644
index 0000000..80d7b95
--- /dev/null
+++ b/obj/x86/Debug/View/DiagnosesPage.g.cs
@@ -0,0 +1,337 @@
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\DiagnosesPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "507D0D235F37666962632326D8D60175"
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace HospitalServerManager.View
+{
+ partial class DiagnosesPage :
+ global::Windows.UI.Xaml.Controls.Page,
+ global::Windows.UI.Xaml.Markup.IComponentConnector,
+ global::Windows.UI.Xaml.Markup.IComponentConnector2
+ {
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private static class XamlBindingSetters
+ {
+ public static void Set_Windows_UI_Xaml_Controls_TextBlock_Text(global::Windows.UI.Xaml.Controls.TextBlock obj, global::System.String value, string targetNullValue)
+ {
+ if (value == null && targetNullValue != null)
+ {
+ value = targetNullValue;
+ }
+ obj.Text = value ?? global::System.String.Empty;
+ }
+ };
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private class DiagnosesPage_obj5_Bindings :
+ global::Windows.UI.Xaml.IDataTemplateExtension,
+ global::Windows.UI.Xaml.Markup.IDataTemplateComponent,
+ global::Windows.UI.Xaml.Markup.IComponentConnector,
+ IDiagnosesPage_Bindings
+ {
+ private global::HospitalServerManager.ViewModel.DiagnosisViewModel dataRoot;
+ private bool initialized = false;
+ private const int NOT_PHASED = (1 << 31);
+ private const int DATA_CHANGED = (1 << 30);
+ private bool removedDataContextHandler = false;
+
+ // Fields for each control that has bindings.
+ private global::System.WeakReference obj5;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj6;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj7;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj8;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj9;
+
+ public DiagnosesPage_obj5_Bindings()
+ {
+ }
+
+ // IComponentConnector
+
+ public void Connect(int connectionId, global::System.Object target)
+ {
+ switch(connectionId)
+ {
+ case 5: // View\DiagnosesPage.xaml line 132
+ this.obj5 = new global::System.WeakReference((global::Windows.UI.Xaml.Controls.Grid)target);
+ break;
+ case 6: // View\DiagnosesPage.xaml line 139
+ this.obj6 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 7: // View\DiagnosesPage.xaml line 142
+ this.obj7 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 8: // View\DiagnosesPage.xaml line 145
+ this.obj8 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 9: // View\DiagnosesPage.xaml line 147
+ this.obj9 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ default:
+ break;
+ }
+ }
+
+ public void DataContextChangedHandler(global::Windows.UI.Xaml.FrameworkElement sender, global::Windows.UI.Xaml.DataContextChangedEventArgs args)
+ {
+ if (this.SetDataRoot(args.NewValue))
+ {
+ this.Update();
+ }
+ }
+
+ // IDataTemplateExtension
+
+ public bool ProcessBinding(uint phase)
+ {
+ throw new global::System.NotImplementedException();
+ }
+
+ public int ProcessBindings(global::Windows.UI.Xaml.Controls.ContainerContentChangingEventArgs args)
+ {
+ int nextPhase = -1;
+ ProcessBindings(args.Item, args.ItemIndex, (int)args.Phase, out nextPhase);
+ return nextPhase;
+ }
+
+ public void ResetTemplate()
+ {
+ Recycle();
+ }
+
+ // IDataTemplateComponent
+
+ public void ProcessBindings(global::System.Object item, int itemIndex, int phase, out int nextPhase)
+ {
+ nextPhase = -1;
+ switch(phase)
+ {
+ case 0:
+ nextPhase = -1;
+ this.SetDataRoot(item);
+ if (!removedDataContextHandler)
+ {
+ removedDataContextHandler = true;
+ (this.obj5.Target as global::Windows.UI.Xaml.Controls.Grid).DataContextChanged -= this.DataContextChangedHandler;
+ }
+ this.initialized = true;
+ break;
+ }
+ this.Update_((global::HospitalServerManager.ViewModel.DiagnosisViewModel) item, 1 << phase);
+ }
+
+ public void Recycle()
+ {
+ }
+
+ // IDiagnosesPage_Bindings
+
+ public void Initialize()
+ {
+ if (!this.initialized)
+ {
+ this.Update();
+ }
+ }
+
+ public void Update()
+ {
+ this.Update_(this.dataRoot, NOT_PHASED);
+ this.initialized = true;
+ }
+
+ public void StopTracking()
+ {
+ }
+
+ public void DisconnectUnloadedObject(int connectionId)
+ {
+ throw new global::System.ArgumentException("No unloadable elements to disconnect.");
+ }
+
+ public bool SetDataRoot(global::System.Object newDataRoot)
+ {
+ if (newDataRoot != null)
+ {
+ this.dataRoot = (global::HospitalServerManager.ViewModel.DiagnosisViewModel)newDataRoot;
+ return true;
+ }
+ return false;
+ }
+
+ // Update methods for each path node used in binding steps.
+ private void Update_(global::HospitalServerManager.ViewModel.DiagnosisViewModel obj, int phase)
+ {
+ if (obj != null)
+ {
+ if ((phase & (NOT_PHASED | (1 << 0))) != 0)
+ {
+ this.Update_PrimaryKey(obj.PrimaryKey, phase);
+ this.Update_Name(obj.Name, phase);
+ this.Update_FieldOfSurgery(obj.FieldOfSurgery, phase);
+ this.Update_Description(obj.Description, phase);
+ }
+ }
+ }
+ private void Update_PrimaryKey(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\DiagnosesPage.xaml line 139
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj6, obj, null);
+ }
+ }
+ private void Update_Name(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\DiagnosesPage.xaml line 142
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj7, obj, null);
+ }
+ }
+ private void Update_FieldOfSurgery(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\DiagnosesPage.xaml line 145
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj8, obj, null);
+ }
+ }
+ private void Update_Description(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\DiagnosesPage.xaml line 147
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj9, obj, null);
+ }
+ }
+ }
+ ///
+ /// Connect()
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void Connect(int connectionId, object target)
+ {
+ switch(connectionId)
+ {
+ case 1: // View\DiagnosesPage.xaml line 1
+ {
+ global::Windows.UI.Xaml.Controls.Page element1 = (global::Windows.UI.Xaml.Controls.Page)(target);
+ ((global::Windows.UI.Xaml.Controls.Page)element1).Loaded += this.Page_Loaded;
+ }
+ break;
+ case 2: // View\DiagnosesPage.xaml line 12
+ {
+ this.RosterViewModel = (global::HospitalServerManager.ViewModel.RosterViewModel)(target);
+ }
+ break;
+ case 3: // View\DiagnosesPage.xaml line 28
+ {
+ this.pageTitle = (global::Windows.UI.Xaml.Controls.TextBlock)(target);
+ }
+ break;
+ case 4: // View\DiagnosesPage.xaml line 119
+ {
+ this.databaseView = (global::Windows.UI.Xaml.Controls.ListView)(target);
+ }
+ break;
+ case 11: // View\DiagnosesPage.xaml line 82
+ {
+ this.sortComboBox = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
+ ((global::Windows.UI.Xaml.Controls.ComboBox)this.sortComboBox).SelectionChanged += this.SortComboBox_SelectionChanged;
+ }
+ break;
+ case 12: // View\DiagnosesPage.xaml line 85
+ {
+ this.radioBtn1 = (global::Windows.UI.Xaml.Controls.RadioButton)(target);
+ ((global::Windows.UI.Xaml.Controls.RadioButton)this.radioBtn1).Click += this.RadionBtn_Click;
+ }
+ break;
+ case 13: // View\DiagnosesPage.xaml line 86
+ {
+ this.radionBtn2 = (global::Windows.UI.Xaml.Controls.RadioButton)(target);
+ ((global::Windows.UI.Xaml.Controls.RadioButton)this.radionBtn2).Click += this.RadionBtn_Click;
+ }
+ break;
+ case 14: // View\DiagnosesPage.xaml line 55
+ {
+ this.searchBox = (global::Windows.UI.Xaml.Controls.TextBox)(target);
+ }
+ break;
+ case 15: // View\DiagnosesPage.xaml line 57
+ {
+ this.lookInComboBox = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
+ }
+ break;
+ case 16: // View\DiagnosesPage.xaml line 60
+ {
+ global::Windows.UI.Xaml.Controls.Button element16 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element16).Click += this.SearchButton_Click;
+ }
+ break;
+ case 17: // View\DiagnosesPage.xaml line 61
+ {
+ global::Windows.UI.Xaml.Controls.Button element17 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element17).Click += this.ResetButton_Click;
+ }
+ break;
+ case 18: // View\DiagnosesPage.xaml line 31
+ {
+ global::Windows.UI.Xaml.Controls.Button element18 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element18).Click += this.NewRecordButton_Click;
+ }
+ break;
+ case 19: // View\DiagnosesPage.xaml line 32
+ {
+ global::Windows.UI.Xaml.Controls.Button element19 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element19).Click += this.DeleteButton_Click;
+ }
+ break;
+ case 20: // View\DiagnosesPage.xaml line 33
+ {
+ global::Windows.UI.Xaml.Controls.Button element20 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element20).Click += this.EditButton_Click;
+ }
+ break;
+ default:
+ break;
+ }
+ this._contentLoaded = true;
+ }
+
+ ///
+ /// GetBindingConnector(int connectionId, object target)
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target)
+ {
+ global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null;
+ switch(connectionId)
+ {
+ case 5: // View\DiagnosesPage.xaml line 132
+ {
+ global::Windows.UI.Xaml.Controls.Grid element5 = (global::Windows.UI.Xaml.Controls.Grid)target;
+ DiagnosesPage_obj5_Bindings bindings = new DiagnosesPage_obj5_Bindings();
+ returnValue = bindings;
+ bindings.SetDataRoot(element5.DataContext);
+ element5.DataContextChanged += bindings.DataContextChangedHandler;
+ global::Windows.UI.Xaml.DataTemplate.SetExtensionInstance(element5, bindings);
+ global::Windows.UI.Xaml.Markup.XamlBindingHelper.SetDataTemplateComponent(element5, bindings);
+ }
+ break;
+ }
+ return returnValue;
+ }
+ }
+}
+
diff --git a/obj/x86/Debug/View/DiagnosesPage.g.i.cs b/obj/x86/Debug/View/DiagnosesPage.g.i.cs
new file mode 100644
index 0000000..c9f584d
--- /dev/null
+++ b/obj/x86/Debug/View/DiagnosesPage.g.i.cs
@@ -0,0 +1,67 @@
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\DiagnosesPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "507D0D235F37666962632326D8D60175"
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace HospitalServerManager.View
+{
+ partial class DiagnosesPage : global::Windows.UI.Xaml.Controls.Page
+ {
+
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::HospitalServerManager.ViewModel.RosterViewModel RosterViewModel;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBlock pageTitle;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ListView databaseView;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ComboBox sortComboBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.RadioButton radioBtn1;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.RadioButton radionBtn2;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBox searchBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ComboBox lookInComboBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private bool _contentLoaded;
+
+ ///
+ /// InitializeComponent()
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent()
+ {
+ if (_contentLoaded)
+ return;
+
+ _contentLoaded = true;
+
+ global::System.Uri resourceLocator = new global::System.Uri("ms-appx:///View/DiagnosesPage.xaml");
+ global::Windows.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
+ }
+
+ partial void UnloadObject(global::Windows.UI.Xaml.DependencyObject unloadableObject);
+
+ private interface IDiagnosesPage_Bindings
+ {
+ void Initialize();
+ void Update();
+ void StopTracking();
+ void DisconnectUnloadedObject(int connectionId);
+ }
+#pragma warning disable 0169 // Proactively suppress unused field warning in case Bindings is not used.
+ private IDiagnosesPage_Bindings Bindings;
+#pragma warning restore 0169
+ }
+}
+
+
diff --git a/obj/x86/Debug/View/DiagnosesPage.xaml b/obj/x86/Debug/View/DiagnosesPage.xaml
new file mode 100644
index 0000000..a315c2b
--- /dev/null
+++ b/obj/x86/Debug/View/DiagnosesPage.xaml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/obj/x86/Debug/View/DiagnosesPage.xbf b/obj/x86/Debug/View/DiagnosesPage.xbf
new file mode 100644
index 0000000..daca93d
Binary files /dev/null and b/obj/x86/Debug/View/DiagnosesPage.xbf differ
diff --git a/obj/x86/Debug/View/DoctorsPage.xbf b/obj/x86/Debug/View/DoctorsPage.xbf
index 74f454b..0911e6a 100644
Binary files a/obj/x86/Debug/View/DoctorsPage.xbf and b/obj/x86/Debug/View/DoctorsPage.xbf differ
diff --git a/obj/x86/Debug/View/EditRecordDialog.g.cs b/obj/x86/Debug/View/EditRecordDialog.g.cs
new file mode 100644
index 0000000..43a3b09
--- /dev/null
+++ b/obj/x86/Debug/View/EditRecordDialog.g.cs
@@ -0,0 +1,77 @@
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\EditRecordDialog.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "BC4868F661B10C70A944C16530717928"
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace HospitalServerManager.View
+{
+ partial class EditRecordDialog :
+ global::Windows.UI.Xaml.Controls.ContentDialog,
+ global::Windows.UI.Xaml.Markup.IComponentConnector,
+ global::Windows.UI.Xaml.Markup.IComponentConnector2
+ {
+ ///
+ /// Connect()
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void Connect(int connectionId, object target)
+ {
+ switch(connectionId)
+ {
+ case 1: // View\EditRecordDialog.xaml line 1
+ {
+ global::Windows.UI.Xaml.Controls.ContentDialog element1 = (global::Windows.UI.Xaml.Controls.ContentDialog)(target);
+ ((global::Windows.UI.Xaml.Controls.ContentDialog)element1).PrimaryButtonClick += this.ContentDialog_PrimaryButtonClick;
+ }
+ break;
+ case 2: // View\EditRecordDialog.xaml line 15
+ {
+ this.grid = (global::Windows.UI.Xaml.Controls.Grid)(target);
+ }
+ break;
+ case 3: // View\EditRecordDialog.xaml line 24
+ {
+ this.fieldToEdit = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
+ ((global::Windows.UI.Xaml.Controls.ComboBox)this.fieldToEdit).SelectionChanged += this.FieldToEdit_SelectionChanged;
+ }
+ break;
+ case 4: // View\EditRecordDialog.xaml line 27
+ {
+ this.additionalTypeInfo = (global::Windows.UI.Xaml.Controls.TextBlock)(target);
+ }
+ break;
+ case 5: // View\EditRecordDialog.xaml line 29
+ {
+ this.additionalFormatInfo = (global::Windows.UI.Xaml.Controls.TextBlock)(target);
+ }
+ break;
+ case 6: // View\EditRecordDialog.xaml line 31
+ {
+ this.additionalFilterInfo = (global::Windows.UI.Xaml.Controls.TextBlock)(target);
+ }
+ break;
+ default:
+ break;
+ }
+ this._contentLoaded = true;
+ }
+
+ ///
+ /// GetBindingConnector(int connectionId, object target)
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target)
+ {
+ global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null;
+ return returnValue;
+ }
+ }
+}
+
diff --git a/obj/x86/Debug/View/EditRecordDialog.g.i.cs b/obj/x86/Debug/View/EditRecordDialog.g.i.cs
new file mode 100644
index 0000000..1770ed5
--- /dev/null
+++ b/obj/x86/Debug/View/EditRecordDialog.g.i.cs
@@ -0,0 +1,51 @@
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\EditRecordDialog.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "BC4868F661B10C70A944C16530717928"
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace HospitalServerManager.View
+{
+ partial class EditRecordDialog : global::Windows.UI.Xaml.Controls.ContentDialog
+ {
+
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.Grid grid;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ComboBox fieldToEdit;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBlock additionalTypeInfo;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBlock additionalFormatInfo;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBlock additionalFilterInfo;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private bool _contentLoaded;
+
+ ///
+ /// InitializeComponent()
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void InitializeComponent()
+ {
+ if (_contentLoaded)
+ return;
+
+ _contentLoaded = true;
+
+ global::System.Uri resourceLocator = new global::System.Uri("ms-appx:///View/EditRecordDialog.xaml");
+ global::Windows.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
+ }
+
+ partial void UnloadObject(global::Windows.UI.Xaml.DependencyObject unloadableObject);
+
+ }
+}
+
+
diff --git a/obj/x86/Debug/View/EditRecordDialog.xaml b/obj/x86/Debug/View/EditRecordDialog.xaml
new file mode 100644
index 0000000..3a3e4c0
--- /dev/null
+++ b/obj/x86/Debug/View/EditRecordDialog.xaml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/obj/x86/Debug/View/EditRecordDialog.xbf b/obj/x86/Debug/View/EditRecordDialog.xbf
new file mode 100644
index 0000000..6b46ff0
Binary files /dev/null and b/obj/x86/Debug/View/EditRecordDialog.xbf differ
diff --git a/obj/x86/Debug/View/MainFrameView.g.cs b/obj/x86/Debug/View/MainFrameView.g.cs
index cfd7e9f..84859d4 100644
--- a/obj/x86/Debug/View/MainFrameView.g.cs
+++ b/obj/x86/Debug/View/MainFrameView.g.cs
@@ -1,4 +1,4 @@
-#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\MainFrameView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "4F78C6693FE6D4099F3E5FF61C0610DB"
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\MainFrameView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "7F242CBA31C865C289BC4CEE93B799A9"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
diff --git a/obj/x86/Debug/View/MainFrameView.g.i.cs b/obj/x86/Debug/View/MainFrameView.g.i.cs
index 8b25bc1..0f40a94 100644
--- a/obj/x86/Debug/View/MainFrameView.g.i.cs
+++ b/obj/x86/Debug/View/MainFrameView.g.i.cs
@@ -1,4 +1,4 @@
-#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\MainFrameView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "4F78C6693FE6D4099F3E5FF61C0610DB"
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\MainFrameView.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "7F242CBA31C865C289BC4CEE93B799A9"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
diff --git a/obj/x86/Debug/View/MainFrameView.xaml b/obj/x86/Debug/View/MainFrameView.xaml
index 36edebe..06515c9 100644
--- a/obj/x86/Debug/View/MainFrameView.xaml
+++ b/obj/x86/Debug/View/MainFrameView.xaml
@@ -15,9 +15,9 @@
-
-
-
+
+
+
diff --git a/obj/x86/Debug/View/MainFrameView.xbf b/obj/x86/Debug/View/MainFrameView.xbf
index 911e61f..15deffe 100644
Binary files a/obj/x86/Debug/View/MainFrameView.xbf and b/obj/x86/Debug/View/MainFrameView.xbf differ
diff --git a/obj/x86/Debug/View/NewRecordDialog.xbf b/obj/x86/Debug/View/NewRecordDialog.xbf
index 5f8e2f4..f97d487 100644
Binary files a/obj/x86/Debug/View/NewRecordDialog.xbf and b/obj/x86/Debug/View/NewRecordDialog.xbf differ
diff --git a/obj/x86/Debug/View/PatientsPage.xbf b/obj/x86/Debug/View/PatientsPage.xbf
index bd3ab8f..fbab531 100644
Binary files a/obj/x86/Debug/View/PatientsPage.xbf and b/obj/x86/Debug/View/PatientsPage.xbf differ
diff --git a/obj/x86/Debug/View/RoomsPage.g.cs b/obj/x86/Debug/View/RoomsPage.g.cs
index 8206335..5d7b59a 100644
--- a/obj/x86/Debug/View/RoomsPage.g.cs
+++ b/obj/x86/Debug/View/RoomsPage.g.cs
@@ -1,4 +1,4 @@
-#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\RoomsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "5596C7FFBFDB2C6590453F2F2DEE359A"
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\RoomsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "AE94A58F50A7512C3B442BBC09BE499A"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -15,6 +15,192 @@ namespace HospitalServerManager.View
global::Windows.UI.Xaml.Markup.IComponentConnector,
global::Windows.UI.Xaml.Markup.IComponentConnector2
{
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private static class XamlBindingSetters
+ {
+ public static void Set_Windows_UI_Xaml_Controls_TextBlock_Text(global::Windows.UI.Xaml.Controls.TextBlock obj, global::System.String value, string targetNullValue)
+ {
+ if (value == null && targetNullValue != null)
+ {
+ value = targetNullValue;
+ }
+ obj.Text = value ?? global::System.String.Empty;
+ }
+ };
+
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private class RoomsPage_obj5_Bindings :
+ global::Windows.UI.Xaml.IDataTemplateExtension,
+ global::Windows.UI.Xaml.Markup.IDataTemplateComponent,
+ global::Windows.UI.Xaml.Markup.IComponentConnector,
+ IRoomsPage_Bindings
+ {
+ private global::HospitalServerManager.ViewModel.RoomViewModel dataRoot;
+ private bool initialized = false;
+ private const int NOT_PHASED = (1 << 31);
+ private const int DATA_CHANGED = (1 << 30);
+ private bool removedDataContextHandler = false;
+
+ // Fields for each control that has bindings.
+ private global::System.WeakReference obj5;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj6;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj7;
+ private global::Windows.UI.Xaml.Controls.TextBlock obj8;
+
+ public RoomsPage_obj5_Bindings()
+ {
+ }
+
+ // IComponentConnector
+
+ public void Connect(int connectionId, global::System.Object target)
+ {
+ switch(connectionId)
+ {
+ case 5: // View\RoomsPage.xaml line 131
+ this.obj5 = new global::System.WeakReference((global::Windows.UI.Xaml.Controls.Grid)target);
+ break;
+ case 6: // View\RoomsPage.xaml line 137
+ this.obj6 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 7: // View\RoomsPage.xaml line 140
+ this.obj7 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ case 8: // View\RoomsPage.xaml line 142
+ this.obj8 = (global::Windows.UI.Xaml.Controls.TextBlock)target;
+ break;
+ default:
+ break;
+ }
+ }
+
+ public void DataContextChangedHandler(global::Windows.UI.Xaml.FrameworkElement sender, global::Windows.UI.Xaml.DataContextChangedEventArgs args)
+ {
+ if (this.SetDataRoot(args.NewValue))
+ {
+ this.Update();
+ }
+ }
+
+ // IDataTemplateExtension
+
+ public bool ProcessBinding(uint phase)
+ {
+ throw new global::System.NotImplementedException();
+ }
+
+ public int ProcessBindings(global::Windows.UI.Xaml.Controls.ContainerContentChangingEventArgs args)
+ {
+ int nextPhase = -1;
+ ProcessBindings(args.Item, args.ItemIndex, (int)args.Phase, out nextPhase);
+ return nextPhase;
+ }
+
+ public void ResetTemplate()
+ {
+ Recycle();
+ }
+
+ // IDataTemplateComponent
+
+ public void ProcessBindings(global::System.Object item, int itemIndex, int phase, out int nextPhase)
+ {
+ nextPhase = -1;
+ switch(phase)
+ {
+ case 0:
+ nextPhase = -1;
+ this.SetDataRoot(item);
+ if (!removedDataContextHandler)
+ {
+ removedDataContextHandler = true;
+ (this.obj5.Target as global::Windows.UI.Xaml.Controls.Grid).DataContextChanged -= this.DataContextChangedHandler;
+ }
+ this.initialized = true;
+ break;
+ }
+ this.Update_((global::HospitalServerManager.ViewModel.RoomViewModel) item, 1 << phase);
+ }
+
+ public void Recycle()
+ {
+ }
+
+ // IRoomsPage_Bindings
+
+ public void Initialize()
+ {
+ if (!this.initialized)
+ {
+ this.Update();
+ }
+ }
+
+ public void Update()
+ {
+ this.Update_(this.dataRoot, NOT_PHASED);
+ this.initialized = true;
+ }
+
+ public void StopTracking()
+ {
+ }
+
+ public void DisconnectUnloadedObject(int connectionId)
+ {
+ throw new global::System.ArgumentException("No unloadable elements to disconnect.");
+ }
+
+ public bool SetDataRoot(global::System.Object newDataRoot)
+ {
+ if (newDataRoot != null)
+ {
+ this.dataRoot = (global::HospitalServerManager.ViewModel.RoomViewModel)newDataRoot;
+ return true;
+ }
+ return false;
+ }
+
+ // Update methods for each path node used in binding steps.
+ private void Update_(global::HospitalServerManager.ViewModel.RoomViewModel obj, int phase)
+ {
+ if (obj != null)
+ {
+ if ((phase & (NOT_PHASED | (1 << 0))) != 0)
+ {
+ this.Update_PrimaryKey(obj.PrimaryKey, phase);
+ this.Update_PlacesNumber(obj.PlacesNumber, phase);
+ this.Update_IsSpecialCare(obj.IsSpecialCare, phase);
+ }
+ }
+ }
+ private void Update_PrimaryKey(global::System.String obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\RoomsPage.xaml line 137
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj6, obj, null);
+ }
+ }
+ private void Update_PlacesNumber(global::System.Int32 obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\RoomsPage.xaml line 140
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj7, obj.ToString(), null);
+ }
+ }
+ private void Update_IsSpecialCare(global::System.Boolean obj, int phase)
+ {
+ if ((phase & ((1 << 0) | NOT_PHASED )) != 0)
+ {
+ // View\RoomsPage.xaml line 142
+ XamlBindingSetters.Set_Windows_UI_Xaml_Controls_TextBlock_Text(this.obj8, obj.ToString(), null);
+ }
+ }
+ }
///
/// Connect()
///
@@ -22,6 +208,90 @@ namespace HospitalServerManager.View
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void Connect(int connectionId, object target)
{
+ switch(connectionId)
+ {
+ case 1: // View\RoomsPage.xaml line 1
+ {
+ global::Windows.UI.Xaml.Controls.Page element1 = (global::Windows.UI.Xaml.Controls.Page)(target);
+ ((global::Windows.UI.Xaml.Controls.Page)element1).Loaded += this.Page_Loaded;
+ }
+ break;
+ case 2: // View\RoomsPage.xaml line 13
+ {
+ this.RosterViewModel = (global::HospitalServerManager.ViewModel.RosterViewModel)(target);
+ }
+ break;
+ case 3: // View\RoomsPage.xaml line 29
+ {
+ this.pageTitle = (global::Windows.UI.Xaml.Controls.TextBlock)(target);
+ }
+ break;
+ case 4: // View\RoomsPage.xaml line 118
+ {
+ this.databaseView = (global::Windows.UI.Xaml.Controls.ListView)(target);
+ }
+ break;
+ case 10: // View\RoomsPage.xaml line 83
+ {
+ this.sortComboBox = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
+ ((global::Windows.UI.Xaml.Controls.ComboBox)this.sortComboBox).SelectionChanged += this.SortComboBox_SelectionChanged;
+ }
+ break;
+ case 11: // View\RoomsPage.xaml line 86
+ {
+ this.radioBtn1 = (global::Windows.UI.Xaml.Controls.RadioButton)(target);
+ ((global::Windows.UI.Xaml.Controls.RadioButton)this.radioBtn1).Click += this.RadionBtn_Click;
+ }
+ break;
+ case 12: // View\RoomsPage.xaml line 87
+ {
+ this.radionBtn2 = (global::Windows.UI.Xaml.Controls.RadioButton)(target);
+ ((global::Windows.UI.Xaml.Controls.RadioButton)this.radionBtn2).Click += this.RadionBtn_Click;
+ }
+ break;
+ case 13: // View\RoomsPage.xaml line 56
+ {
+ this.searchBox = (global::Windows.UI.Xaml.Controls.TextBox)(target);
+ }
+ break;
+ case 14: // View\RoomsPage.xaml line 58
+ {
+ this.lookInComboBox = (global::Windows.UI.Xaml.Controls.ComboBox)(target);
+ }
+ break;
+ case 15: // View\RoomsPage.xaml line 61
+ {
+ global::Windows.UI.Xaml.Controls.Button element15 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element15).Click += this.SearchButton_Click;
+ }
+ break;
+ case 16: // View\RoomsPage.xaml line 62
+ {
+ global::Windows.UI.Xaml.Controls.Button element16 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element16).Click += this.ResetButton_Click;
+ }
+ break;
+ case 17: // View\RoomsPage.xaml line 32
+ {
+ global::Windows.UI.Xaml.Controls.Button element17 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element17).Click += this.NewRecordButton_Click;
+ }
+ break;
+ case 18: // View\RoomsPage.xaml line 33
+ {
+ global::Windows.UI.Xaml.Controls.Button element18 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element18).Click += this.DeleteButton_Click;
+ }
+ break;
+ case 19: // View\RoomsPage.xaml line 34
+ {
+ global::Windows.UI.Xaml.Controls.Button element19 = (global::Windows.UI.Xaml.Controls.Button)(target);
+ ((global::Windows.UI.Xaml.Controls.Button)element19).Click += this.EditButton_Click;
+ }
+ break;
+ default:
+ break;
+ }
this._contentLoaded = true;
}
@@ -33,6 +303,20 @@ namespace HospitalServerManager.View
public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target)
{
global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null;
+ switch(connectionId)
+ {
+ case 5: // View\RoomsPage.xaml line 131
+ {
+ global::Windows.UI.Xaml.Controls.Grid element5 = (global::Windows.UI.Xaml.Controls.Grid)target;
+ RoomsPage_obj5_Bindings bindings = new RoomsPage_obj5_Bindings();
+ returnValue = bindings;
+ bindings.SetDataRoot(element5.DataContext);
+ element5.DataContextChanged += bindings.DataContextChangedHandler;
+ global::Windows.UI.Xaml.DataTemplate.SetExtensionInstance(element5, bindings);
+ global::Windows.UI.Xaml.Markup.XamlBindingHelper.SetDataTemplateComponent(element5, bindings);
+ }
+ break;
+ }
return returnValue;
}
}
diff --git a/obj/x86/Debug/View/RoomsPage.g.i.cs b/obj/x86/Debug/View/RoomsPage.g.i.cs
index 2eda9b4..0011a26 100644
--- a/obj/x86/Debug/View/RoomsPage.g.i.cs
+++ b/obj/x86/Debug/View/RoomsPage.g.i.cs
@@ -1,4 +1,4 @@
-#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\RoomsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "5596C7FFBFDB2C6590453F2F2DEE359A"
+#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\RoomsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "AE94A58F50A7512C3B442BBC09BE499A"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -14,6 +14,22 @@ namespace HospitalServerManager.View
{
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::HospitalServerManager.ViewModel.RosterViewModel RosterViewModel;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBlock pageTitle;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ListView databaseView;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ComboBox sortComboBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.RadioButton radioBtn1;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.RadioButton radionBtn2;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.TextBox searchBox;
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
+ private global::Windows.UI.Xaml.Controls.ComboBox lookInComboBox;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 10.0.17.0")]
private bool _contentLoaded;
@@ -35,6 +51,16 @@ namespace HospitalServerManager.View
partial void UnloadObject(global::Windows.UI.Xaml.DependencyObject unloadableObject);
+ private interface IRoomsPage_Bindings
+ {
+ void Initialize();
+ void Update();
+ void StopTracking();
+ void DisconnectUnloadedObject(int connectionId);
+ }
+#pragma warning disable 0169 // Proactively suppress unused field warning in case Bindings is not used.
+ private IRoomsPage_Bindings Bindings;
+#pragma warning restore 0169
}
}
diff --git a/obj/x86/Debug/View/RoomsPage.xaml b/obj/x86/Debug/View/RoomsPage.xaml
index fbc4ca2..2a3fccd 100644
--- a/obj/x86/Debug/View/RoomsPage.xaml
+++ b/obj/x86/Debug/View/RoomsPage.xaml
@@ -1,15 +1,157 @@
-
+ Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" >
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/obj/x86/Debug/View/RoomsPage.xbf b/obj/x86/Debug/View/RoomsPage.xbf
index 6ff1276..fa602d0 100644
Binary files a/obj/x86/Debug/View/RoomsPage.xbf and b/obj/x86/Debug/View/RoomsPage.xbf differ
diff --git a/obj/x86/Debug/View/UserControls/ColumnListView.xbf b/obj/x86/Debug/View/UserControls/ColumnListView.xbf
index 455f0e4..0a3df4f 100644
Binary files a/obj/x86/Debug/View/UserControls/ColumnListView.xbf and b/obj/x86/Debug/View/UserControls/ColumnListView.xbf differ
diff --git a/obj/x86/Debug/XamlSaveStateFile.xml b/obj/x86/Debug/XamlSaveStateFile.xml
index 89170d6..ac8940f 100644
--- a/obj/x86/Debug/XamlSaveStateFile.xml
+++ b/obj/x86/Debug/XamlSaveStateFile.xml
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/obj/x86/Debug/XamlTypeInfo.g.cs b/obj/x86/Debug/XamlTypeInfo.g.cs
index 5aaa96c..607516e 100644
--- a/obj/x86/Debug/XamlTypeInfo.g.cs
+++ b/obj/x86/Debug/XamlTypeInfo.g.cs
@@ -189,7 +189,7 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
private void InitTypeTables()
{
- _typeNameTable = new string[37];
+ _typeNameTable = new string[40];
_typeNameTable[0] = "HospitalServerManager.ViewModel.RosterViewModel";
_typeNameTable[1] = "Object";
_typeNameTable[2] = "System.Collections.Generic.IEnumerable`1";
@@ -216,19 +216,22 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
_typeNameTable[23] = "System.RuntimeTypeHandle";
_typeNameTable[24] = "System.Reflection.ConstructorInfo";
_typeNameTable[25] = "System.Collections.Generic.IEnumerable`1";
- _typeNameTable[26] = "HospitalServerManager.View.DoctorsPage";
+ _typeNameTable[26] = "HospitalServerManager.View.AdmissionsPage";
_typeNameTable[27] = "Windows.UI.Xaml.Controls.Page";
_typeNameTable[28] = "Windows.UI.Xaml.Controls.UserControl";
- _typeNameTable[29] = "HospitalServerManager.View.MainFrameView";
- _typeNameTable[30] = "HospitalServerManager.View.NewRecordDialog";
- _typeNameTable[31] = "Windows.UI.Xaml.Controls.ContentDialog";
- _typeNameTable[32] = "Windows.UI.Xaml.Controls.ContentControl";
- _typeNameTable[33] = "System.Collections.Generic.List`1";
- _typeNameTable[34] = "HospitalServerManager.View.PatientsPage";
- _typeNameTable[35] = "HospitalServerManager.View.RoomsPage";
- _typeNameTable[36] = "HospitalServerManager.View.UserControls.ColumnListView";
+ _typeNameTable[29] = "HospitalServerManager.View.DiagnosesPage";
+ _typeNameTable[30] = "HospitalServerManager.View.DoctorsPage";
+ _typeNameTable[31] = "HospitalServerManager.View.EditRecordDialog";
+ _typeNameTable[32] = "Windows.UI.Xaml.Controls.ContentDialog";
+ _typeNameTable[33] = "Windows.UI.Xaml.Controls.ContentControl";
+ _typeNameTable[34] = "HospitalServerManager.View.MainFrameView";
+ _typeNameTable[35] = "HospitalServerManager.View.NewRecordDialog";
+ _typeNameTable[36] = "System.Collections.Generic.List`1";
+ _typeNameTable[37] = "HospitalServerManager.View.PatientsPage";
+ _typeNameTable[38] = "HospitalServerManager.View.RoomsPage";
+ _typeNameTable[39] = "HospitalServerManager.View.UserControls.ColumnListView";
- _typeTable = new global::System.Type[37];
+ _typeTable = new global::System.Type[40];
_typeTable[0] = typeof(global::HospitalServerManager.ViewModel.RosterViewModel);
_typeTable[1] = typeof(global::System.Object);
_typeTable[2] = typeof(global::System.Collections.Generic.IEnumerable);
@@ -255,17 +258,20 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
_typeTable[23] = typeof(global::System.RuntimeTypeHandle);
_typeTable[24] = typeof(global::System.Reflection.ConstructorInfo);
_typeTable[25] = typeof(global::System.Collections.Generic.IEnumerable);
- _typeTable[26] = typeof(global::HospitalServerManager.View.DoctorsPage);
+ _typeTable[26] = typeof(global::HospitalServerManager.View.AdmissionsPage);
_typeTable[27] = typeof(global::Windows.UI.Xaml.Controls.Page);
_typeTable[28] = typeof(global::Windows.UI.Xaml.Controls.UserControl);
- _typeTable[29] = typeof(global::HospitalServerManager.View.MainFrameView);
- _typeTable[30] = typeof(global::HospitalServerManager.View.NewRecordDialog);
- _typeTable[31] = typeof(global::Windows.UI.Xaml.Controls.ContentDialog);
- _typeTable[32] = typeof(global::Windows.UI.Xaml.Controls.ContentControl);
- _typeTable[33] = typeof(global::System.Collections.Generic.List);
- _typeTable[34] = typeof(global::HospitalServerManager.View.PatientsPage);
- _typeTable[35] = typeof(global::HospitalServerManager.View.RoomsPage);
- _typeTable[36] = typeof(global::HospitalServerManager.View.UserControls.ColumnListView);
+ _typeTable[29] = typeof(global::HospitalServerManager.View.DiagnosesPage);
+ _typeTable[30] = typeof(global::HospitalServerManager.View.DoctorsPage);
+ _typeTable[31] = typeof(global::HospitalServerManager.View.EditRecordDialog);
+ _typeTable[32] = typeof(global::Windows.UI.Xaml.Controls.ContentDialog);
+ _typeTable[33] = typeof(global::Windows.UI.Xaml.Controls.ContentControl);
+ _typeTable[34] = typeof(global::HospitalServerManager.View.MainFrameView);
+ _typeTable[35] = typeof(global::HospitalServerManager.View.NewRecordDialog);
+ _typeTable[36] = typeof(global::System.Collections.Generic.List);
+ _typeTable[37] = typeof(global::HospitalServerManager.View.PatientsPage);
+ _typeTable[38] = typeof(global::HospitalServerManager.View.RoomsPage);
+ _typeTable[39] = typeof(global::HospitalServerManager.View.UserControls.ColumnListView);
}
private int LookupTypeIndexByName(string typeName)
@@ -302,12 +308,14 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
private object Activate_0_RosterViewModel() { return new global::HospitalServerManager.ViewModel.RosterViewModel(); }
private object Activate_6_Dictionary() { return new global::System.Collections.Generic.Dictionary(); }
- private object Activate_26_DoctorsPage() { return new global::HospitalServerManager.View.DoctorsPage(); }
- private object Activate_29_MainFrameView() { return new global::HospitalServerManager.View.MainFrameView(); }
- private object Activate_33_List() { return new global::System.Collections.Generic.List(); }
- private object Activate_34_PatientsPage() { return new global::HospitalServerManager.View.PatientsPage(); }
- private object Activate_35_RoomsPage() { return new global::HospitalServerManager.View.RoomsPage(); }
- private object Activate_36_ColumnListView() { return new global::HospitalServerManager.View.UserControls.ColumnListView(); }
+ private object Activate_26_AdmissionsPage() { return new global::HospitalServerManager.View.AdmissionsPage(); }
+ private object Activate_29_DiagnosesPage() { return new global::HospitalServerManager.View.DiagnosesPage(); }
+ private object Activate_30_DoctorsPage() { return new global::HospitalServerManager.View.DoctorsPage(); }
+ private object Activate_34_MainFrameView() { return new global::HospitalServerManager.View.MainFrameView(); }
+ private object Activate_36_List() { return new global::System.Collections.Generic.List(); }
+ private object Activate_37_PatientsPage() { return new global::HospitalServerManager.View.PatientsPage(); }
+ private object Activate_38_RoomsPage() { return new global::HospitalServerManager.View.RoomsPage(); }
+ private object Activate_39_ColumnListView() { return new global::HospitalServerManager.View.UserControls.ColumnListView(); }
private void MapAdd_3_IDictionary(object instance, object key, object item)
{
var collection = (global::System.Collections.Generic.IDictionary)instance;
@@ -322,7 +330,7 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
var newItem = (global::System.Type)item;
collection.Add(newKey, newItem);
}
- private void VectorAdd_33_List(object instance, object item)
+ private void VectorAdd_36_List(object instance, object item)
{
var collection = (global::System.Collections.Generic.ICollection)instance;
var newItem = (global::System.String)item;
@@ -598,9 +606,9 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
xamlType = userType;
break;
- case 26: // HospitalServerManager.View.DoctorsPage
+ case 26: // HospitalServerManager.View.AdmissionsPage
userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
- userType.Activator = Activate_26_DoctorsPage;
+ userType.Activator = Activate_26_AdmissionsPage;
userType.SetIsLocalType();
xamlType = userType;
break;
@@ -613,52 +621,74 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
xamlType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlSystemBaseType(typeName, type);
break;
- case 29: // HospitalServerManager.View.MainFrameView
+ case 29: // HospitalServerManager.View.DiagnosesPage
userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
- userType.Activator = Activate_29_MainFrameView;
+ userType.Activator = Activate_29_DiagnosesPage;
userType.SetIsLocalType();
xamlType = userType;
break;
- case 30: // HospitalServerManager.View.NewRecordDialog
+ case 30: // HospitalServerManager.View.DoctorsPage
+ userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
+ userType.Activator = Activate_30_DoctorsPage;
+ userType.SetIsLocalType();
+ xamlType = userType;
+ break;
+
+ case 31: // HospitalServerManager.View.EditRecordDialog
+ userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.ContentDialog"));
+ userType.AddMemberName("Result");
+ userType.AddMemberName("FieldToUpdate");
+ userType.SetIsLocalType();
+ xamlType = userType;
+ break;
+
+ case 32: // Windows.UI.Xaml.Controls.ContentDialog
+ xamlType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlSystemBaseType(typeName, type);
+ break;
+
+ case 33: // Windows.UI.Xaml.Controls.ContentControl
+ xamlType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlSystemBaseType(typeName, type);
+ break;
+
+ case 34: // HospitalServerManager.View.MainFrameView
+ userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
+ userType.Activator = Activate_34_MainFrameView;
+ userType.SetIsLocalType();
+ xamlType = userType;
+ break;
+
+ case 35: // HospitalServerManager.View.NewRecordDialog
userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.ContentDialog"));
userType.AddMemberName("ValuesOfNewObject");
userType.SetIsLocalType();
xamlType = userType;
break;
- case 31: // Windows.UI.Xaml.Controls.ContentDialog
- xamlType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlSystemBaseType(typeName, type);
- break;
-
- case 32: // Windows.UI.Xaml.Controls.ContentControl
- xamlType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlSystemBaseType(typeName, type);
- break;
-
- case 33: // System.Collections.Generic.List`1
+ case 36: // System.Collections.Generic.List`1
userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Object"));
- userType.CollectionAdd = VectorAdd_33_List;
+ userType.CollectionAdd = VectorAdd_36_List;
userType.SetIsReturnTypeStub();
xamlType = userType;
break;
- case 34: // HospitalServerManager.View.PatientsPage
+ case 37: // HospitalServerManager.View.PatientsPage
userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
- userType.Activator = Activate_34_PatientsPage;
+ userType.Activator = Activate_37_PatientsPage;
userType.SetIsLocalType();
xamlType = userType;
break;
- case 35: // HospitalServerManager.View.RoomsPage
+ case 38: // HospitalServerManager.View.RoomsPage
userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.Page"));
- userType.Activator = Activate_35_RoomsPage;
+ userType.Activator = Activate_38_RoomsPage;
userType.SetIsLocalType();
xamlType = userType;
break;
- case 36: // HospitalServerManager.View.UserControls.ColumnListView
+ case 39: // HospitalServerManager.View.UserControls.ColumnListView
userType = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType(this, typeName, type, GetXamlTypeByName("Windows.UI.Xaml.Controls.UserControl"));
- userType.Activator = Activate_36_ColumnListView;
+ userType.Activator = Activate_39_ColumnListView;
userType.SetIsLocalType();
xamlType = userType;
break;
@@ -1012,7 +1042,17 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
var that = (global::System.Reflection.MemberInfo)instance;
return that.Name;
}
- private object get_69_NewRecordDialog_ValuesOfNewObject(object instance)
+ private object get_69_EditRecordDialog_Result(object instance)
+ {
+ var that = (global::HospitalServerManager.View.EditRecordDialog)instance;
+ return that.Result;
+ }
+ private object get_70_EditRecordDialog_FieldToUpdate(object instance)
+ {
+ var that = (global::HospitalServerManager.View.EditRecordDialog)instance;
+ return that.FieldToUpdate;
+ }
+ private object get_71_NewRecordDialog_ValuesOfNewObject(object instance)
{
var that = (global::HospitalServerManager.View.NewRecordDialog)instance;
return that.ValuesOfNewObject;
@@ -1439,10 +1479,22 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
xamlMember.Getter = get_68_MemberInfo_Name;
xamlMember.SetIsReadOnly();
break;
+ case "HospitalServerManager.View.EditRecordDialog.Result":
+ userType = (global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType)GetXamlTypeByName("HospitalServerManager.View.EditRecordDialog");
+ xamlMember = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlMember(this, "Result", "String");
+ xamlMember.Getter = get_69_EditRecordDialog_Result;
+ xamlMember.SetIsReadOnly();
+ break;
+ case "HospitalServerManager.View.EditRecordDialog.FieldToUpdate":
+ userType = (global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType)GetXamlTypeByName("HospitalServerManager.View.EditRecordDialog");
+ xamlMember = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlMember(this, "FieldToUpdate", "String");
+ xamlMember.Getter = get_70_EditRecordDialog_FieldToUpdate;
+ xamlMember.SetIsReadOnly();
+ break;
case "HospitalServerManager.View.NewRecordDialog.ValuesOfNewObject":
userType = (global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlUserType)GetXamlTypeByName("HospitalServerManager.View.NewRecordDialog");
xamlMember = new global::HospitalServerManager.HospitalServerManager_XamlTypeInfo.XamlMember(this, "ValuesOfNewObject", "System.Collections.Generic.List`1");
- xamlMember.Getter = get_69_NewRecordDialog_ValuesOfNewObject;
+ xamlMember.Getter = get_71_NewRecordDialog_ValuesOfNewObject;
xamlMember.SetIsReadOnly();
break;
}
diff --git a/obj/x86/Debug/filtered.layout.resfiles b/obj/x86/Debug/filtered.layout.resfiles
index a80a834..84fdf06 100644
--- a/obj/x86/Debug/filtered.layout.resfiles
+++ b/obj/x86/Debug/filtered.layout.resfiles
@@ -8,7 +8,10 @@ Assets\StoreLogo.png
Assets\Wide310x150Logo.scale-200.png
App.xbf
HospitalServerManager.xr.xml
+View\AdmissionsPage.xbf
+View\DiagnosesPage.xbf
View\DoctorsPage.xbf
+View\EditRecordDialog.xbf
View\MainFrameView.xbf
View\NewRecordDialog.xbf
View\PatientsPage.xbf
diff --git a/obj/x86/Debug/filtered.layout.resfiles.intermediate b/obj/x86/Debug/filtered.layout.resfiles.intermediate
index a80a834..84fdf06 100644
--- a/obj/x86/Debug/filtered.layout.resfiles.intermediate
+++ b/obj/x86/Debug/filtered.layout.resfiles.intermediate
@@ -8,7 +8,10 @@ Assets\StoreLogo.png
Assets\Wide310x150Logo.scale-200.png
App.xbf
HospitalServerManager.xr.xml
+View\AdmissionsPage.xbf
+View\DiagnosesPage.xbf
View\DoctorsPage.xbf
+View\EditRecordDialog.xbf
View\MainFrameView.xbf
View\NewRecordDialog.xbf
View\PatientsPage.xbf
diff --git a/obj/x86/Debug/intermediatexaml/HospitalServerManager.exe b/obj/x86/Debug/intermediatexaml/HospitalServerManager.exe
index b82e688..a0b938f 100644
Binary files a/obj/x86/Debug/intermediatexaml/HospitalServerManager.exe and b/obj/x86/Debug/intermediatexaml/HospitalServerManager.exe differ
diff --git a/obj/x86/Debug/intermediatexaml/HospitalServerManager.pdb b/obj/x86/Debug/intermediatexaml/HospitalServerManager.pdb
index 39ec449..4cc86e2 100644
Binary files a/obj/x86/Debug/intermediatexaml/HospitalServerManager.pdb and b/obj/x86/Debug/intermediatexaml/HospitalServerManager.pdb differ
diff --git a/obj/x86/Debug/unfiltered.layout.resfiles b/obj/x86/Debug/unfiltered.layout.resfiles
index a80a834..84fdf06 100644
--- a/obj/x86/Debug/unfiltered.layout.resfiles
+++ b/obj/x86/Debug/unfiltered.layout.resfiles
@@ -8,7 +8,10 @@ Assets\StoreLogo.png
Assets\Wide310x150Logo.scale-200.png
App.xbf
HospitalServerManager.xr.xml
+View\AdmissionsPage.xbf
+View\DiagnosesPage.xbf
View\DoctorsPage.xbf
+View\EditRecordDialog.xbf
View\MainFrameView.xbf
View\NewRecordDialog.xbf
View\PatientsPage.xbf
diff --git a/obj/x86/Debug/unfiltered.layout.resfiles.intermediate b/obj/x86/Debug/unfiltered.layout.resfiles.intermediate
index a80a834..84fdf06 100644
--- a/obj/x86/Debug/unfiltered.layout.resfiles.intermediate
+++ b/obj/x86/Debug/unfiltered.layout.resfiles.intermediate
@@ -8,7 +8,10 @@ Assets\StoreLogo.png
Assets\Wide310x150Logo.scale-200.png
App.xbf
HospitalServerManager.xr.xml
+View\AdmissionsPage.xbf
+View\DiagnosesPage.xbf
View\DoctorsPage.xbf
+View\EditRecordDialog.xbf
View\MainFrameView.xbf
View\NewRecordDialog.xbf
View\PatientsPage.xbf