mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2024-11-29 01:35:27 +01:00
Basic funcionality was completed.
- EditRecordDialog has been added and edited; Others pages (View) has been added and completed; - All ViewModel and Models was completed; - WebService, ApiComandProvider has full funcionality, - New interface has been created; - Application is working now :) it's time to refractoring and testing
This commit is contained in:
parent
069f0612da
commit
0806b25c79
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -122,9 +122,18 @@
|
||||
<Compile Include="ViewModel\RosterViewModel.cs" />
|
||||
<Compile Include="ViewModel\SurgeryViewModel.cs" />
|
||||
<Compile Include="ViewModel\Validators\InterfaceImplementValidator.cs" />
|
||||
<Compile Include="View\AdmissionsPage.xaml.cs">
|
||||
<DependentUpon>AdmissionsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\DiagnosesPage.xaml.cs">
|
||||
<DependentUpon>DiagnosesPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\DoctorsPage.xaml.cs">
|
||||
<DependentUpon>DoctorsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\EditRecordDialog.xaml.cs">
|
||||
<DependentUpon>EditRecordDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\MainFrameView.xaml.cs">
|
||||
<DependentUpon>MainFrameView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -162,10 +171,22 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="View\AdmissionsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\DiagnosesPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\DoctorsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\EditRecordDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\MainFrameView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -7,8 +7,9 @@ using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace HospitalServerManager.InterfacesAndEnums
|
||||
{
|
||||
public interface ISqlTableModelable : IPrimaryKeyGetable
|
||||
public interface ISqlTableModel
|
||||
{
|
||||
|
||||
List<string> GetColumnNames();
|
||||
}
|
||||
public interface IPrimaryKeyGetable
|
||||
|
@ -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<string>())
|
||||
{
|
||||
AdmissionDate = admissionDate;
|
||||
LeavingDate = endDate ?? null;
|
||||
PatientPESEL = patientPESEL;
|
||||
DiagnosisSymbol = diagnosisSymbol;
|
||||
MainDoctor = mainDoctor;
|
||||
OperationID = planedOperation;
|
||||
RoomNumber = roomNumber;
|
||||
IsPlanned = isPlanned;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<SurgeryField>();
|
||||
Description = listOfValues[3];
|
||||
}
|
||||
[JsonConstructor]
|
||||
protected Diagnosis(string icdSymbol, string name, string fieldOfSurgery, string description)
|
||||
: base(icdSymbol, "Symbol_ICD", new List<string>())
|
||||
{
|
||||
Name = name;
|
||||
FieldOfSurgery = fieldOfSurgery.GetEnumFromDescription<SurgeryField>();
|
||||
Description = description;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<string>())
|
||||
{
|
||||
PlacesNumber = numberOfBeds;
|
||||
IsSpecialCare = increasedCare;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<string> 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<string> GetColumnNames()
|
||||
{
|
||||
return ColumnNames;
|
||||
}
|
||||
}
|
||||
public List<string> GetColumnNames()
|
||||
{
|
||||
return ColumnNames;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace HospitalServerManager.Model.Controllers
|
||||
{
|
||||
return @"/getcolumntypes/" + tableName;
|
||||
}
|
||||
public static string CreateNewRecordAsync(string tableName, List<string> valuesList)
|
||||
public static string CreateNewRecord(string tableName, List<string> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<IEnumerable<T>> GetRecordAsync<T>(string tableName)
|
||||
{
|
||||
// TODO: SPRAWDZIC CZY IMPLEMENTUJE INTERFACE!!
|
||||
List<ISqlTableModelable> modelsList = new List<ISqlTableModelable>();
|
||||
//using (var client = httpClient)
|
||||
List<ISqlTableModel> modelsList = new List<ISqlTableModel>();
|
||||
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<IEnumerable<T>>(stream);
|
||||
//return JsonConvert.DeserializeObject<List<T>>(content);
|
||||
}
|
||||
}
|
||||
public async Task<IEnumerable<T>> GetSortedRecordsAsync<T>(string tableName, string orderBy, string criterium)
|
||||
{
|
||||
List<ISqlTableModel> modelsList = new List<ISqlTableModel>();
|
||||
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<IEnumerable<T>>(stream);
|
||||
}
|
||||
}
|
||||
public async Task<IEnumerable<T>> SearchRecordsAsync<T>(string tableName, string orderBy, string criterium, string searchIn, string searchValue)
|
||||
{
|
||||
List<ISqlTableModel> modelsList = new List<ISqlTableModel>();
|
||||
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<IEnumerable<T>>(stream);
|
||||
}
|
||||
}
|
||||
public async Task<IEnumerable<string>> 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<bool> CreateNewRecordAsync(string tableName, IEnumerable<string> 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<bool> 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<bool> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<ISqlTableModelable> _modelsList = new List<ISqlTableModelable>();
|
||||
private List<ISqlTableModel> _modelsList = new List<ISqlTableModel>();
|
||||
private WebService webService = new WebService(new Uri("http://localhost:8080/"));
|
||||
public string ActualTableName { get; private set; }
|
||||
public IEnumerable<string> ColumnNames { get; private set; }
|
||||
public IDictionary<int, string> ColumnTypes { get; private set; }
|
||||
public Dictionary<string, Type> EnumTypes { get; protected set; }
|
||||
public IEnumerable<ISqlTableModelable> ModelsEnumerable { get => _modelsList; }
|
||||
public IEnumerable<ISqlTableModel> 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<ISqlTableModelable> response = new List<ISqlTableModelable>();
|
||||
/*ColumnNames = await GetColumnNames();
|
||||
ColumnTypes = await GetColumnTypes();*/
|
||||
IEnumerable<ISqlTableModel> response = new List<ISqlTableModel>();
|
||||
if(tableName == "Pacjenci") response = await webService.GetRecordAsync<Patient>(tableName);
|
||||
else if(tableName == "Lekarze") response = await webService.GetRecordAsync<Doctor>(tableName);
|
||||
_modelsList.AddRange(response);
|
||||
|
||||
//ColumnNames = await GetColumnNames();
|
||||
}
|
||||
public async Task<IEnumerable<string>> GetColumnNames()
|
||||
public async Task<IEnumerable<string>> 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<IDictionary<int, string>> GetColumnTypes()
|
||||
public async Task<IDictionary<int, string>> 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<string> 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<Admission>("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<string, Type> 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<ISqlTableModelable> modelsList)
|
||||
|
||||
public void AddRange(IEnumerable<ISqlTableModel> 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<Admission> 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<ISqlTableModel> response = new List<ISqlTableModel>();
|
||||
switch (tableName)
|
||||
{
|
||||
case "Przyjecia":
|
||||
response = await webService.GetSortedRecordsAsync<Admission>(tableName, orderBy, criterium);
|
||||
break;
|
||||
case "Pacjenci":
|
||||
response = await webService.GetSortedRecordsAsync<Patient>(tableName, orderBy, criterium);
|
||||
break;
|
||||
case "Lekarze":
|
||||
response = await webService.GetSortedRecordsAsync<Doctor>(tableName, orderBy, criterium);
|
||||
break;
|
||||
case "Diagnozy":
|
||||
response = await webService.GetSortedRecordsAsync<Diagnosis>(tableName, orderBy, criterium);
|
||||
break;
|
||||
case "Operacje":
|
||||
response = await webService.GetSortedRecordsAsync<Surgery>(tableName, orderBy, criterium);
|
||||
break;
|
||||
case "Sale":
|
||||
response = await webService.GetSortedRecordsAsync<Room>(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<ISqlTableModel> response = new List<ISqlTableModel>();
|
||||
switch (tableName)
|
||||
{
|
||||
case "Przyjecia":
|
||||
response = await webService.SearchRecordsAsync<Admission>(tableName, orderBy, criterium, searchIn, searchValue);
|
||||
break;
|
||||
case "Pacjenci":
|
||||
response = await webService.SearchRecordsAsync<Patient>(tableName, orderBy, criterium, searchIn, searchValue);
|
||||
break;
|
||||
case "Lekarze":
|
||||
response = await webService.SearchRecordsAsync<Doctor>(tableName, orderBy, criterium, searchIn, searchValue);
|
||||
break;
|
||||
case "Diagnozy":
|
||||
response = await webService.SearchRecordsAsync<Diagnosis>(tableName, orderBy, criterium, searchIn, searchValue);
|
||||
break;
|
||||
case "Operacje":
|
||||
response = await webService.SearchRecordsAsync<Surgery>(tableName, orderBy, criterium, searchIn, searchValue);
|
||||
break;
|
||||
case "Sale":
|
||||
response = await webService.SearchRecordsAsync<Room>(tableName, orderBy, criterium, searchIn, searchValue);
|
||||
break;
|
||||
default:
|
||||
response = null;
|
||||
break;
|
||||
}
|
||||
if(response != null && response.Any())
|
||||
_modelsList.AddRange(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
190
View/AdmissionsPage.xaml
Normal file
190
View/AdmissionsPage.xaml
Normal file
@ -0,0 +1,190 @@
|
||||
<Page
|
||||
x:Class="HospitalServerManager.View.AdmissionsPage"
|
||||
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}" Loaded="Page_Loaded">
|
||||
<Page.Resources>
|
||||
<viewmodel:RosterViewModel x:Name="RosterViewModel"/>
|
||||
</Page.Resources>
|
||||
<!-- <Grid DataContext="{StaticResource ResourceKey=RosterViewModel}">
|
||||
<userControls:ColumnListView DataContext="{StaticResource RosterViewModel}" Name="lv"/>
|
||||
</Grid> -->
|
||||
|
||||
<Grid Background="DimGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Przyjęcia" HorizontalAlignment="Left" Margin="15, 5, 0, 0" FontSize="20"
|
||||
VerticalAlignment="Top" Name="pageTitle" Grid.ColumnSpan="2"/>
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Content="Nowy rekord" Margin="30, 0, 30, 0" Grid.Row="1" Click="NewRecordButton_Click" Width="150"/>
|
||||
<Button Content="Usuń zaznaczone" Margin="30, 0, 30, 0" Grid.Row="1" Grid.Column="1" Click="DeleteButton_Click" Width="150"/>
|
||||
<Button Content="Edytuj rekord" Margin="30, 0, 30, 0" Grid.Row="1" Click="EditButton_Click" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- </StackPanel> -->
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
|
||||
<TextBlock Text="Szukaj" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Szukaj wyrażenia:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBlock Text="Szukaj w:" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBox Name="searchBox" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10"
|
||||
Name="lookInComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="10">
|
||||
<Button Content="Przeszukaj bazę" HorizontalAlignment="Stretch" Margin="10" Click="SearchButton_Click"/>
|
||||
<Button Content="Resetuj" HorizontalAlignment="Stretch" Margin="10" Click="ResetButton_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.RowSpan="3" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Text="Sortowanie i filtry" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Sortuj według:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="10" Name="sortComboBox" SelectionChanged="SortComboBox_SelectionChanged" />
|
||||
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<RadioButton Content="Rosnąco" Margin="15, 0, 15, 0" IsChecked="True" Tag="0" Name="radioBtn1" Click="RadionBtn_Click"/>
|
||||
<RadioButton Content="Malejąco" Margin="15, 0, 15, 0" Tag="1" Name="radionBtn2" Click="RadionBtn_Click"/>
|
||||
</StackPanel>
|
||||
<Button Content="Zaawansowane filtry" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
Margin="15, 0, 15, 0"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch">
|
||||
<ListView.HeaderTemplate >
|
||||
|
||||
<DataTemplate >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="ID przyjęcia" Margin="8,0" Foreground="DarkRed" Grid.Column="0"/>
|
||||
<TextBlock Text="Data przyjęcia" Foreground="DarkRed" Grid.Column="1"/>
|
||||
<TextBlock Text="Data zwolnienia" Foreground="DarkRed" Grid.Column="2"/>
|
||||
<TextBlock Text="Pesel pacjenta" Foreground="DarkRed" Grid.Column="3"/>
|
||||
<TextBlock Text="Symbol diagnozy" Foreground="DarkRed" Grid.Column="4"/>
|
||||
<TextBlock Text="ID lekarza" Foreground="DarkRed" Grid.Column="5"/>
|
||||
<TextBlock Text="ID operacji" Foreground="DarkRed" Grid.Column="6"/>
|
||||
<TextBlock Text="Nr pokoju" Foreground="DarkRed" Grid.Column="7"/>
|
||||
<TextBlock Text="Planowane?" Foreground="DarkRed" Grid.Column="8"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.HeaderTemplate>
|
||||
</ListView>
|
||||
<ListView Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" Name="databaseView"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsVerticalRailEnabled="True"
|
||||
ScrollViewer.VerticalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate x:DataType="viewmodel:AdmissionViewModel">
|
||||
|
||||
<Grid Name="valueStoreGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="ItemId"
|
||||
Text="{x:Bind PrimaryKey}"
|
||||
Grid.Column="0" />
|
||||
<TextBlock Name="ItemName"
|
||||
Text="{x:Bind AdmissionDate}"
|
||||
Grid.Column="1"/>
|
||||
<TextBlock Text="{x:Bind LeavingDate}"
|
||||
Grid.Column="2"/>
|
||||
<TextBlock Text="{x:Bind PatientPESEL}"
|
||||
Grid.Column="3"/>
|
||||
<TextBlock Text="{x:Bind DiagnosisSymbol}"
|
||||
Grid.Column="4"/>
|
||||
<TextBlock Text="{x:Bind MainDoctor}"
|
||||
Grid.Column="5"/>
|
||||
<TextBlock Text="{x:Bind OperationID}"
|
||||
Grid.Column="6"/>
|
||||
<TextBlock Text="{x:Bind RoomNumber}"
|
||||
Grid.Column="7"/>
|
||||
<TextBlock Text="{x:Bind IsPlanned}"
|
||||
Grid.Column="8"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
147
View/AdmissionsPage.xaml.cs
Normal file
147
View/AdmissionsPage.xaml.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
|
||||
/// </summary>
|
||||
public sealed partial class AdmissionsPage : Page, IPageNavigateable
|
||||
{
|
||||
public AdmissionsPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
private async void NewRecord()
|
||||
{
|
||||
Dictionary<int, string> typesOfColumnDictionary = (Dictionary<int, string>)RosterViewModel.ColumnTypes;
|
||||
NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
|
||||
RosterViewModel.EnumTypes);
|
||||
ContentDialogResult dialogResult = await createDialog.ShowAsync();
|
||||
if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
|
||||
{
|
||||
List<string> 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();
|
||||
}
|
||||
}
|
||||
}
|
161
View/DiagnosesPage.xaml
Normal file
161
View/DiagnosesPage.xaml
Normal file
@ -0,0 +1,161 @@
|
||||
<Page
|
||||
x:Class="HospitalServerManager.View.DiagnosesPage"
|
||||
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}" Loaded="Page_Loaded">
|
||||
<Page.Resources>
|
||||
<viewmodel:RosterViewModel x:Name="RosterViewModel"/>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid Background="DimGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Lekarze" HorizontalAlignment="Left" Margin="15, 5, 0, 0" FontSize="20"
|
||||
VerticalAlignment="Top" Name="pageTitle" Grid.ColumnSpan="2"/>
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Content="Nowy rekord" Margin="30, 0, 30, 0" Grid.Row="1" Click="NewRecordButton_Click" Width="150"/>
|
||||
<Button Content="Usuń zaznaczone" Margin="30, 0, 30, 0" Grid.Row="1" Grid.Column="1" Click="DeleteButton_Click" Width="150"/>
|
||||
<Button Content="Edytuj rekord" Margin="30, 0, 30, 0" Grid.Row="1" Click="EditButton_Click" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- </StackPanel> -->
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
|
||||
<TextBlock Text="Szukaj" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Szukaj wyrażenia:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBlock Text="Szukaj w:" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBox Name="searchBox" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10"
|
||||
Name="lookInComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="10">
|
||||
<Button Content="Przeszukaj bazę" HorizontalAlignment="Stretch" Margin="10" Click="SearchButton_Click"/>
|
||||
<Button Content="Resetuj" HorizontalAlignment="Stretch" Margin="10" Click="ResetButton_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.RowSpan="3" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Text="Sortowanie i filtry" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Sortuj według:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="10" Name="sortComboBox" SelectionChanged="SortComboBox_SelectionChanged" />
|
||||
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<RadioButton Content="Rosnąco" Margin="15, 0, 15, 0" IsChecked="True" Tag="0" Name="radioBtn1" Click="RadionBtn_Click"/>
|
||||
<RadioButton Content="Malejąco" Margin="15, 0, 15, 0" Tag="1" Name="radionBtn2" Click="RadionBtn_Click"/>
|
||||
</StackPanel>
|
||||
<Button Content="Zaawansowane filtry" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
Margin="15, 0, 15, 0"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch">
|
||||
<ListView.HeaderTemplate >
|
||||
|
||||
<DataTemplate >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="ID diagnozy" Margin="8,0" Foreground="DarkRed" Grid.Column="0"/>
|
||||
<TextBlock Text="Nazwa diagnozy" Foreground="DarkRed" Grid.Column="1"/>
|
||||
<TextBlock Text="Dziedzina chirurgii" Foreground="DarkRed" Grid.Column="2"/>
|
||||
<TextBlock Text="Opis" Foreground="DarkRed" Grid.Column="3"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.HeaderTemplate>
|
||||
</ListView>
|
||||
<ListView Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" Name="databaseView"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsVerticalRailEnabled="True"
|
||||
ScrollViewer.VerticalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate x:DataType="viewmodel:DiagnosisViewModel">
|
||||
|
||||
<Grid Name="valueStoreGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="ItemId"
|
||||
Text="{x:Bind PrimaryKey}"
|
||||
Grid.Column="0"/>
|
||||
<TextBlock Name="ItemName"
|
||||
Text="{x:Bind Name}"
|
||||
Grid.Column="1" />
|
||||
<TextBlock Text="{x:Bind FieldOfSurgery}"
|
||||
Grid.Column="2" />
|
||||
<TextBlock Text="{x:Bind Description}"
|
||||
Grid.Column="3"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
147
View/DiagnosesPage.xaml.cs
Normal file
147
View/DiagnosesPage.xaml.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
|
||||
/// </summary>
|
||||
public sealed partial class DiagnosesPage : Page, IPageNavigateable
|
||||
{
|
||||
public DiagnosesPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
private async void NewRecord()
|
||||
{
|
||||
Dictionary<int, string> typesOfColumnDictionary = (Dictionary<int, string>)RosterViewModel.ColumnTypes;
|
||||
NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
|
||||
RosterViewModel.EnumTypes);
|
||||
ContentDialogResult dialogResult = await createDialog.ShowAsync();
|
||||
if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
|
||||
{
|
||||
List<string> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -29,53 +29,115 @@ namespace HospitalServerManager.View
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private async void NewRecord()
|
||||
{
|
||||
Dictionary<int, string> typesOfColumnDictionary = (Dictionary<int, string>)RosterViewModel.ColumnTypes;
|
||||
NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
|
||||
RosterViewModel.EnumTypes);
|
||||
ContentDialogResult dialogResult = await createDialog.ShowAsync();
|
||||
if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
|
||||
{
|
||||
List<string> 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()
|
||||
|
39
View/EditRecordDialog.xaml
Normal file
39
View/EditRecordDialog.xaml
Normal file
@ -0,0 +1,39 @@
|
||||
<ContentDialog
|
||||
x:Class="HospitalServerManager.View.EditRecordDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:HospitalServerManager.View"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Title="TITLE"
|
||||
PrimaryButtonText="Potwierź"
|
||||
PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
|
||||
SecondaryButtonText="Anuluj" DefaultButton="Secondary" MinWidth="800">
|
||||
|
||||
|
||||
<Grid Name="grid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<ComboBox Name="fieldToEdit" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="20" Grid.Row="0" SelectionChanged="FieldToEdit_SelectionChanged" />
|
||||
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Name="additionalTypeInfo" Text="Typ: " HorizontalAlignment="Center" Foreground="#FFBD8989"
|
||||
Margin="0, 5, 0, 5" FontSize="12"/>
|
||||
<TextBlock Text="Format: " Name="additionalFormatInfo" HorizontalAlignment="Center" Foreground="#FFBD8989"
|
||||
Margin="0, 5, 0, 5" FontSize="12"/>
|
||||
<TextBlock Grid.Row="1" Text="DODATKOWE INFO" Grid.ColumnSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="Gray" Name="additionalFilterInfo"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- <TextBox Name="valueToUpdateTextBox" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Grid.Column="1" Margin="20" Grid.Row="2"/> -->
|
||||
|
||||
</Grid>
|
||||
</ContentDialog>
|
141
View/EditRecordDialog.xaml.cs
Normal file
141
View/EditRecordDialog.xaml.cs
Normal file
@ -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<int, ComboBox> comboBoxes = new Dictionary<int, ComboBox>();
|
||||
private Dictionary<int, Control> controlsDictionary = new Dictionary<int, Control>();
|
||||
private Dictionary<int, string> _TypesDictionary { get; set; }
|
||||
private Dictionary<string, Type> enumTypes;
|
||||
public EditRecordDialog(IEnumerable<string> comboboxSource, IDictionary<int, string> typesDictionary, string editedFieldToTitle,
|
||||
IDictionary<string, Type> enumTypesDictionary)
|
||||
{
|
||||
this.InitializeComponent();
|
||||
var valuesToCombobox = new List<string>( comboboxSource);
|
||||
_TypesDictionary = new Dictionary<int, string>( typesDictionary as Dictionary<int, string>);
|
||||
valuesToCombobox.RemoveAt(0);
|
||||
_TypesDictionary.Remove(0);
|
||||
enumTypes = enumTypesDictionary as Dictionary<string, Type>;
|
||||
CreateBasicInterface(valuesToCombobox, editedFieldToTitle);
|
||||
fieldToEdit.SelectedIndex = 0;
|
||||
|
||||
}
|
||||
private void CreateBasicInterface(IEnumerable<string> 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<string> list = new List<string>(Enum.GetNames(enumTypes[selectedText]).ToList());
|
||||
List<string> descriptionsList = new List<string>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
@ -15,9 +15,9 @@
|
||||
</Grid.RowDefinitions>
|
||||
<CommandBar FlowDirection="LeftToRight" VerticalAlignment="Top" Style="{StaticResource CommandBarRevealStyle}"
|
||||
Name="navigationBar" Grid.Row="0">
|
||||
<AppBarButton Icon="Street" Label="Sale" Tag="6" Click="AppBarButton_Click"/>
|
||||
<AppBarButton Icon="Cut" Label="Operacje" Tag="5" Click="AppBarButton_Click" />
|
||||
<AppBarButton Icon="Paste" Label="Diagnozy" Tag="4" Click="AppBarButton_Click" />
|
||||
<AppBarButton Icon="Street" Label="Sale" Tag="RoomsPage" Click="AppBarButton_Click"/>
|
||||
<AppBarButton Icon="Cut" Label="Operacje" Tag="SurgerionPage" Click="AppBarButton_Click" />
|
||||
<AppBarButton Icon="Paste" Label="Diagnozy" Tag="DiagnosesPage" Click="AppBarButton_Click" />
|
||||
<AppBarButton Icon="WebCam" Label="Pracownicy" Tag="DoctorsPage" Click="AppBarButton_Click"/>
|
||||
<AppBarButton Icon="People" Label="Pacjenci" Tag="PatientsPage" Click="AppBarButton_Click" />
|
||||
<AppBarButton Icon="AddFriend" Label="Przyjęcia" Tag="AdmissionsPage" Click="AppBarButton_Click"/>
|
||||
|
@ -19,9 +19,7 @@ using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace HospitalServerManager.View
|
||||
{
|
||||
/// <summary>
|
||||
/// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
|
||||
/// </summary>
|
||||
/// 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<Type>
|
||||
{
|
||||
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*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -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<int, string> typesOfColumnDictionary = (Dictionary<int,string>) 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()
|
||||
|
@ -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">
|
||||
|
||||
<Grid>
|
||||
<Page.Resources>
|
||||
<viewmodel:RosterViewModel x:Name="RosterViewModel"/>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid Background="DimGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="Lekarze" HorizontalAlignment="Left" Margin="15, 5, 0, 0" FontSize="20"
|
||||
VerticalAlignment="Top" Name="pageTitle" Grid.ColumnSpan="2"/>
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Content="Nowy rekord" Margin="30, 0, 30, 0" Grid.Row="1" Click="NewRecordButton_Click" Width="150"/>
|
||||
<Button Content="Usuń zaznaczone" Margin="30, 0, 30, 0" Grid.Row="1" Grid.Column="1" Click="DeleteButton_Click" Width="150"/>
|
||||
<Button Content="Edytuj rekord" Margin="30, 0, 30, 0" Grid.Row="1" Click="EditButton_Click" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- </StackPanel> -->
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
|
||||
<TextBlock Text="Szukaj" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Szukaj wyrażenia:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBlock Text="Szukaj w:" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBox Name="searchBox" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10"
|
||||
Name="lookInComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="10">
|
||||
<Button Content="Przeszukaj bazę" HorizontalAlignment="Stretch" Margin="10" Click="SearchButton_Click"/>
|
||||
<Button Content="Resetuj" HorizontalAlignment="Stretch" Margin="10" Click="ResetButton_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.RowSpan="3" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Text="Sortowanie i filtry" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Sortuj według:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="10" Name="sortComboBox" SelectionChanged="SortComboBox_SelectionChanged" />
|
||||
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<RadioButton Content="Rosnąco" Margin="15, 0, 15, 0" IsChecked="True" Tag="0" Name="radioBtn1" Click="RadionBtn_Click"/>
|
||||
<RadioButton Content="Malejąco" Margin="15, 0, 15, 0" Tag="1" Name="radionBtn2" Click="RadionBtn_Click"/>
|
||||
</StackPanel>
|
||||
<Button Content="Zaawansowane filtry" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
Margin="15, 0, 15, 0"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch">
|
||||
<ListView.HeaderTemplate >
|
||||
|
||||
<DataTemplate >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="Numer sali" Margin="8,0" Foreground="DarkRed" Grid.Column="0"/>
|
||||
<TextBlock Text="Ilość łóżek" Foreground="DarkRed" Grid.Column="1"/>
|
||||
<TextBlock Text="Intensywna opieka?" Foreground="DarkRed" Grid.Column="2"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.HeaderTemplate>
|
||||
</ListView>
|
||||
<ListView Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" Name="databaseView"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsVerticalRailEnabled="True"
|
||||
ScrollViewer.VerticalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate x:DataType="viewmodel:RoomViewModel">
|
||||
|
||||
<Grid Name="valueStoreGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="ItemId"
|
||||
Text="{x:Bind PrimaryKey}"
|
||||
Grid.Column="0"/>
|
||||
<TextBlock Text="{x:Bind PlacesNumber}"
|
||||
Grid.Column="1" />
|
||||
<TextBlock Text="{x:Bind IsSpecialCare}"
|
||||
Grid.Column="2"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
@ -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
|
||||
/// <summary>
|
||||
/// Pusta strona, która może być używana samodzielnie lub do której można nawigować wewnątrz ramki.
|
||||
/// </summary>
|
||||
public sealed partial class RoomsPage : Page
|
||||
public sealed partial class RoomsPage : Page, IPageNavigateable
|
||||
{
|
||||
public RoomsPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
private async void NewRecord()
|
||||
{
|
||||
Dictionary<int, string> typesOfColumnDictionary = (Dictionary<int, string>)RosterViewModel.ColumnTypes;
|
||||
NewRecordDialog createDialog = new NewRecordDialog(RosterViewModel.ColumnNames, typesOfColumnDictionary,
|
||||
RosterViewModel.EnumTypes);
|
||||
ContentDialogResult dialogResult = await createDialog.ShowAsync();
|
||||
if (dialogResult == ContentDialogResult.Primary && createDialog.ValuesOfNewObject.Any())
|
||||
{
|
||||
List<string> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,12 +11,12 @@ namespace HospitalServerManager.ViewModel.Controllers
|
||||
{
|
||||
class DatabaseReader
|
||||
{
|
||||
private List<ISqlTableModelable> _ModelsList { get; set; }
|
||||
private List<ISqlTableModel> _ModelsList { get; set; }
|
||||
|
||||
public IReadOnlyList<ISqlTableModelable> LastReadedModels { get => _ModelsList; }
|
||||
public IReadOnlyList<ISqlTableModel> LastReadedModels { get => _ModelsList; }
|
||||
public DatabaseReader()
|
||||
{
|
||||
_ModelsList = new List<ISqlTableModelable>();
|
||||
_ModelsList = new List<ISqlTableModel>();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<string> GetColumnNames()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetPrimaryKey()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return PrimaryKey;
|
||||
}
|
||||
|
||||
public string GetPrimaryKeyName()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return model.PrimaryKeyName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<string> GetColumnNames()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetPrimaryKey()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return PrimaryKey;
|
||||
}
|
||||
|
||||
public string GetPrimaryKeyName()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return model.PrimaryKeyName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<ISqlTableModelable> ModelsList => _Roster.ModelsEnumerable.ToList();
|
||||
public RangeObservableCollection<ISqlTableModelable> ModelsCollection = new RangeObservableCollection<ISqlTableModelable>();
|
||||
private List<ISqlTableModel> ModelsList => _Roster.ModelsEnumerable.ToList();
|
||||
public RangeObservableCollection<IPrimaryKeyGetable> ModelsCollection = new RangeObservableCollection<IPrimaryKeyGetable>();
|
||||
public IEnumerable<string> ColumnNames { get => _Roster.ColumnNames; }
|
||||
public IDictionary<int, string> ColumnTypes { get => _Roster.ColumnTypes; }
|
||||
public Dictionary<string, Type> 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<ISqlTableModelable> lista = new List<ISqlTableModelable>();
|
||||
// DbReader.LastReadedModels.ToList().ForEach(model => lista.Add(new PatientViewModel(model as HospitalServerManager.Model.Basic.Patient)));
|
||||
List<IPrimaryKeyGetable> lista = new List<IPrimaryKeyGetable>();
|
||||
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<string> 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<IPrimaryKeyGetable> lista = new List<IPrimaryKeyGetable>();
|
||||
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<IPrimaryKeyGetable> lista = new List<IPrimaryKeyGetable>();
|
||||
await _Roster.Search(tableName, orderBy, criterium, searchIn, searchValue);
|
||||
ModelsList.ToList().ForEach(model => lista.Add((IPrimaryKeyGetable)Activator.CreateInstance(viewModel, model)));
|
||||
ModelsCollection.AddRange(lista);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
@ -128,7 +128,20 @@
|
||||
<RootProperty Name="VerticalAlignment" />
|
||||
<RootProperty Name="Margin" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.AdmissionsPage" />
|
||||
<RootType FullName="HospitalServerManager.View.DiagnosesPage" />
|
||||
<RootType FullName="HospitalServerManager.View.DoctorsPage" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ContentDialog">
|
||||
<RootProperty Name="Title" />
|
||||
<RootProperty Name="PrimaryButtonText" />
|
||||
<RootProperty Name="SecondaryButtonText" />
|
||||
<RootProperty Name="DefaultButton" />
|
||||
<RootProperty Name="MinWidth" />
|
||||
<RootProperty Name="Content" />
|
||||
<RootEvent Name="PrimaryButtonClick" />
|
||||
<RootEvent Name="SecondaryButtonClick" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.EditRecordDialog" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.CommandBar">
|
||||
<RootProperty Name="Name" />
|
||||
<RootProperty Name="FlowDirection" />
|
||||
@ -148,14 +161,6 @@
|
||||
<RootEvent Name="Click" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.MainFrameView" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ContentDialog">
|
||||
<RootProperty Name="Title" />
|
||||
<RootProperty Name="PrimaryButtonText" />
|
||||
<RootProperty Name="SecondaryButtonText" />
|
||||
<RootProperty Name="Content" />
|
||||
<RootEvent Name="PrimaryButtonClick" />
|
||||
<RootEvent Name="SecondaryButtonClick" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.NewRecordDialog" />
|
||||
<RootType FullName="HospitalServerManager.View.PatientsPage" />
|
||||
<RootType FullName="HospitalServerManager.View.RoomsPage" />
|
||||
|
BIN
bin/x86/Debug/AppX/View/AdmissionsPage.xbf
Normal file
BIN
bin/x86/Debug/AppX/View/AdmissionsPage.xbf
Normal file
Binary file not shown.
BIN
bin/x86/Debug/AppX/View/DiagnosesPage.xbf
Normal file
BIN
bin/x86/Debug/AppX/View/DiagnosesPage.xbf
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/x86/Debug/AppX/View/EditRecordDialog.xbf
Normal file
BIN
bin/x86/Debug/AppX/View/EditRecordDialog.xbf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -30,13 +30,13 @@
|
||||
<AppXManifest Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\Core\AppxManifest.xml">
|
||||
<PackagePath>AppxManifest.xml</PackagePath>
|
||||
<ReRegisterAppIfChanged>true</ReRegisterAppIfChanged>
|
||||
<Modified>2018-12-28T18:47:53.642</Modified>
|
||||
<Modified>2019-01-06T18:01:50.131</Modified>
|
||||
</AppXManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\HospitalServerManager.exe">
|
||||
<PackagePath>entrypoint\HospitalServerManager.exe</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.301</Modified>
|
||||
<Modified>2019-01-06T18:01:49.804</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\.nuget\packages\newtonsoft.json\12.0.1\lib\netstandard2.0\Newtonsoft.Json.dll">
|
||||
<PackagePath>Newtonsoft.Json.dll</PackagePath>
|
||||
@ -738,35 +738,47 @@
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\HospitalServerManager.xr.xml">
|
||||
<PackagePath>HospitalServerManager.xr.xml</PackagePath>
|
||||
<Modified>2018-12-28T18:09:39.467</Modified>
|
||||
<Modified>2019-01-06T14:54:13.864</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\App.xbf">
|
||||
<PackagePath>App.xbf</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.110</Modified>
|
||||
<Modified>2019-01-06T18:01:49.561</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\AdmissionsPage.xbf">
|
||||
<PackagePath>View\AdmissionsPage.xbf</PackagePath>
|
||||
<Modified>2019-01-06T18:01:49.561</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\DiagnosesPage.xbf">
|
||||
<PackagePath>View\DiagnosesPage.xbf</PackagePath>
|
||||
<Modified>2019-01-06T18:01:49.562</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\DoctorsPage.xbf">
|
||||
<PackagePath>View\DoctorsPage.xbf</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.111</Modified>
|
||||
<Modified>2019-01-06T18:01:49.562</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\EditRecordDialog.xbf">
|
||||
<PackagePath>View\EditRecordDialog.xbf</PackagePath>
|
||||
<Modified>2019-01-06T18:01:49.562</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\MainFrameView.xbf">
|
||||
<PackagePath>View\MainFrameView.xbf</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.111</Modified>
|
||||
<Modified>2019-01-06T18:01:49.562</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\NewRecordDialog.xbf">
|
||||
<PackagePath>View\NewRecordDialog.xbf</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.111</Modified>
|
||||
<Modified>2019-01-06T18:01:49.562</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\PatientsPage.xbf">
|
||||
<PackagePath>View\PatientsPage.xbf</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.112</Modified>
|
||||
<Modified>2019-01-06T18:01:49.563</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\RoomsPage.xbf">
|
||||
<PackagePath>View\RoomsPage.xbf</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.112</Modified>
|
||||
<Modified>2019-01-06T18:01:49.563</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\UserControls\ColumnListView.xbf">
|
||||
<PackagePath>View\UserControls\ColumnListView.xbf</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.112</Modified>
|
||||
<Modified>2019-01-06T18:01:49.563</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Program Files %28x86%29\Windows Kits\10\UnionMetadata\10.0.17134.0\Windows.winmd">
|
||||
<PackagePath>WinMetadata\Windows.winmd</PackagePath>
|
||||
@ -774,11 +786,11 @@
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\resources.pri">
|
||||
<PackagePath>resources.pri</PackagePath>
|
||||
<Modified>2018-12-28T18:09:40.377</Modified>
|
||||
<Modified>2019-01-06T14:54:14.579</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\Core\HospitalServerManager.exe">
|
||||
<PackagePath>HospitalServerManager.exe</PackagePath>
|
||||
<Modified>2018-12-28T18:47:53.637</Modified>
|
||||
<Modified>2019-01-06T18:01:50.126</Modified>
|
||||
</AppxPackagedFile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -559,9 +559,18 @@
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\App.xbf">
|
||||
<PackagePath>App.xbf</PackagePath>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\AdmissionsPage.xbf">
|
||||
<PackagePath>View\AdmissionsPage.xbf</PackagePath>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\DiagnosesPage.xbf">
|
||||
<PackagePath>View\DiagnosesPage.xbf</PackagePath>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\DoctorsPage.xbf">
|
||||
<PackagePath>View\DoctorsPage.xbf</PackagePath>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\EditRecordDialog.xbf">
|
||||
<PackagePath>View\EditRecordDialog.xbf</PackagePath>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\bin\x86\Debug\View\MainFrameView.xbf">
|
||||
<PackagePath>View\MainFrameView.xbf</PackagePath>
|
||||
</AppxPackagedFile>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -128,7 +128,20 @@
|
||||
<RootProperty Name="VerticalAlignment" />
|
||||
<RootProperty Name="Margin" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.AdmissionsPage" />
|
||||
<RootType FullName="HospitalServerManager.View.DiagnosesPage" />
|
||||
<RootType FullName="HospitalServerManager.View.DoctorsPage" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ContentDialog">
|
||||
<RootProperty Name="Title" />
|
||||
<RootProperty Name="PrimaryButtonText" />
|
||||
<RootProperty Name="SecondaryButtonText" />
|
||||
<RootProperty Name="DefaultButton" />
|
||||
<RootProperty Name="MinWidth" />
|
||||
<RootProperty Name="Content" />
|
||||
<RootEvent Name="PrimaryButtonClick" />
|
||||
<RootEvent Name="SecondaryButtonClick" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.EditRecordDialog" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.CommandBar">
|
||||
<RootProperty Name="Name" />
|
||||
<RootProperty Name="FlowDirection" />
|
||||
@ -148,14 +161,6 @@
|
||||
<RootEvent Name="Click" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.MainFrameView" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ContentDialog">
|
||||
<RootProperty Name="Title" />
|
||||
<RootProperty Name="PrimaryButtonText" />
|
||||
<RootProperty Name="SecondaryButtonText" />
|
||||
<RootProperty Name="Content" />
|
||||
<RootEvent Name="PrimaryButtonClick" />
|
||||
<RootEvent Name="SecondaryButtonClick" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.NewRecordDialog" />
|
||||
<RootType FullName="HospitalServerManager.View.PatientsPage" />
|
||||
<RootType FullName="HospitalServerManager.View.RoomsPage" />
|
||||
|
BIN
bin/x86/Debug/View/AdmissionsPage.xbf
Normal file
BIN
bin/x86/Debug/View/AdmissionsPage.xbf
Normal file
Binary file not shown.
BIN
bin/x86/Debug/View/DiagnosesPage.xbf
Normal file
BIN
bin/x86/Debug/View/DiagnosesPage.xbf
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/x86/Debug/View/EditRecordDialog.xbf
Normal file
BIN
bin/x86/Debug/View/EditRecordDialog.xbf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
941c3f1a8423bd3d7083b7479824892c4db76de2
|
||||
f03c17be22ceb22b1ce3324e21e3371a79db21a6
|
||||
|
@ -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
|
||||
|
Binary file not shown.
Binary file not shown.
@ -128,7 +128,20 @@
|
||||
<RootProperty Name="VerticalAlignment" />
|
||||
<RootProperty Name="Margin" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.AdmissionsPage" />
|
||||
<RootType FullName="HospitalServerManager.View.DiagnosesPage" />
|
||||
<RootType FullName="HospitalServerManager.View.DoctorsPage" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ContentDialog">
|
||||
<RootProperty Name="Title" />
|
||||
<RootProperty Name="PrimaryButtonText" />
|
||||
<RootProperty Name="SecondaryButtonText" />
|
||||
<RootProperty Name="DefaultButton" />
|
||||
<RootProperty Name="MinWidth" />
|
||||
<RootProperty Name="Content" />
|
||||
<RootEvent Name="PrimaryButtonClick" />
|
||||
<RootEvent Name="SecondaryButtonClick" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.EditRecordDialog" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.CommandBar">
|
||||
<RootProperty Name="Name" />
|
||||
<RootProperty Name="FlowDirection" />
|
||||
@ -148,14 +161,6 @@
|
||||
<RootEvent Name="Click" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.MainFrameView" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ContentDialog">
|
||||
<RootProperty Name="Title" />
|
||||
<RootProperty Name="PrimaryButtonText" />
|
||||
<RootProperty Name="SecondaryButtonText" />
|
||||
<RootProperty Name="Content" />
|
||||
<RootEvent Name="PrimaryButtonClick" />
|
||||
<RootEvent Name="SecondaryButtonClick" />
|
||||
</RootType>
|
||||
<RootType FullName="HospitalServerManager.View.NewRecordDialog" />
|
||||
<RootType FullName="HospitalServerManager.View.PatientsPage" />
|
||||
<RootType FullName="HospitalServerManager.View.RoomsPage" />
|
||||
|
402
obj/x86/Debug/View/AdmissionsPage.g.cs
Normal file
402
obj/x86/Debug/View/AdmissionsPage.g.cs
Normal file
@ -0,0 +1,402 @@
|
||||
#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\AdmissionsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E7F790C1DC46B1BD7555B0808C61D134"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<global::System.DateTime> 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<global::System.Int32> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Connect()
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetBindingConnector(int connectionId, object target)
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
67
obj/x86/Debug/View/AdmissionsPage.g.i.cs
Normal file
67
obj/x86/Debug/View/AdmissionsPage.g.i.cs
Normal file
@ -0,0 +1,67 @@
|
||||
#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\AdmissionsPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E7F790C1DC46B1BD7555B0808C61D134"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent()
|
||||
/// </summary>
|
||||
[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
|
||||
}
|
||||
}
|
||||
|
||||
|
191
obj/x86/Debug/View/AdmissionsPage.xaml
Normal file
191
obj/x86/Debug/View/AdmissionsPage.xaml
Normal file
@ -0,0 +1,191 @@
|
||||
<Page x:ConnectionId='1'
|
||||
x:Class="HospitalServerManager.View.AdmissionsPage"
|
||||
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}" >
|
||||
<Page.Resources>
|
||||
<viewmodel:RosterViewModel x:ConnectionId='2' x:Name="RosterViewModel"/>
|
||||
</Page.Resources>
|
||||
<!-- <Grid DataContext="{StaticResource ResourceKey=RosterViewModel}">
|
||||
<userControls:ColumnListView DataContext="{StaticResource RosterViewModel}" Name="lv"/>
|
||||
</Grid> -->
|
||||
|
||||
<Grid Background="DimGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:ConnectionId='3' Text="Przyjęcia" HorizontalAlignment="Left" Margin="15, 5, 0, 0" FontSize="20"
|
||||
VerticalAlignment="Top" Name="pageTitle" Grid.ColumnSpan="2"/>
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button x:ConnectionId='23' Content="Nowy rekord" Margin="30, 0, 30, 0" Grid.Row="1" Width="150"/>
|
||||
<Button x:ConnectionId='24' Content="Usuń zaznaczone" Margin="30, 0, 30, 0" Grid.Row="1" Grid.Column="1" Width="150"/>
|
||||
<Button x:ConnectionId='25' Content="Edytuj rekord" Margin="30, 0, 30, 0" Grid.Row="1" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- </StackPanel> -->
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
|
||||
<TextBlock Text="Szukaj" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Szukaj wyrażenia:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBlock Text="Szukaj w:" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBox x:ConnectionId='19' Name="searchBox" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox x:ConnectionId='20' Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10"
|
||||
Name="lookInComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="10">
|
||||
<Button x:ConnectionId='21' Content="Przeszukaj bazę" HorizontalAlignment="Stretch" Margin="10" />
|
||||
<Button x:ConnectionId='22' Content="Resetuj" HorizontalAlignment="Stretch" Margin="10" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.RowSpan="3" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Text="Sortowanie i filtry" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Sortuj według:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox x:ConnectionId='16' Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="10" Name="sortComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<RadioButton x:ConnectionId='17' Content="Rosnąco" Margin="15, 0, 15, 0" IsChecked="True" Tag="0" Name="radioBtn1" />
|
||||
<RadioButton x:ConnectionId='18' Content="Malejąco" Margin="15, 0, 15, 0" Tag="1" Name="radionBtn2" />
|
||||
</StackPanel>
|
||||
<Button Content="Zaawansowane filtry" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
Margin="15, 0, 15, 0"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch">
|
||||
<ListView.HeaderTemplate >
|
||||
|
||||
<DataTemplate >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="ID przyjęcia" Margin="8,0" Foreground="DarkRed" Grid.Column="0"/>
|
||||
<TextBlock Text="Data przyjęcia" Foreground="DarkRed" Grid.Column="1"/>
|
||||
<TextBlock Text="Data zwolnienia" Foreground="DarkRed" Grid.Column="2"/>
|
||||
<TextBlock Text="Pesel pacjenta" Foreground="DarkRed" Grid.Column="3"/>
|
||||
<TextBlock Text="Symbol diagnozy" Foreground="DarkRed" Grid.Column="4"/>
|
||||
<TextBlock Text="ID lekarza" Foreground="DarkRed" Grid.Column="5"/>
|
||||
<TextBlock Text="ID operacji" Foreground="DarkRed" Grid.Column="6"/>
|
||||
<TextBlock Text="Nr pokoju" Foreground="DarkRed" Grid.Column="7"/>
|
||||
<TextBlock Text="Planowane?" Foreground="DarkRed" Grid.Column="8"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.HeaderTemplate>
|
||||
</ListView>
|
||||
<ListView x:ConnectionId='4' Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" Name="databaseView"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsVerticalRailEnabled="True"
|
||||
ScrollViewer.VerticalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate >
|
||||
|
||||
<Grid x:ConnectionId='5' Name="valueStoreGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:ConnectionId='6' Name="ItemId"
|
||||
|
||||
Grid.Column="0" />
|
||||
<TextBlock x:ConnectionId='7' Name="ItemName"
|
||||
|
||||
Grid.Column="1"/>
|
||||
<TextBlock x:ConnectionId='8'
|
||||
Grid.Column="2"/>
|
||||
<TextBlock x:ConnectionId='9'
|
||||
Grid.Column="3"/>
|
||||
<TextBlock x:ConnectionId='10'
|
||||
Grid.Column="4"/>
|
||||
<TextBlock x:ConnectionId='11'
|
||||
Grid.Column="5"/>
|
||||
<TextBlock x:ConnectionId='12'
|
||||
Grid.Column="6"/>
|
||||
<TextBlock x:ConnectionId='13'
|
||||
Grid.Column="7"/>
|
||||
<TextBlock x:ConnectionId='14'
|
||||
Grid.Column="8"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Page>
|
||||
|
BIN
obj/x86/Debug/View/AdmissionsPage.xbf
Normal file
BIN
obj/x86/Debug/View/AdmissionsPage.xbf
Normal file
Binary file not shown.
337
obj/x86/Debug/View/DiagnosesPage.g.cs
Normal file
337
obj/x86/Debug/View/DiagnosesPage.g.cs
Normal file
@ -0,0 +1,337 @@
|
||||
#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\DiagnosesPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "507D0D235F37666962632326D8D60175"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Connect()
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetBindingConnector(int connectionId, object target)
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
67
obj/x86/Debug/View/DiagnosesPage.g.i.cs
Normal file
67
obj/x86/Debug/View/DiagnosesPage.g.i.cs
Normal file
@ -0,0 +1,67 @@
|
||||
#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\DiagnosesPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "507D0D235F37666962632326D8D60175"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent()
|
||||
/// </summary>
|
||||
[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
|
||||
}
|
||||
}
|
||||
|
||||
|
162
obj/x86/Debug/View/DiagnosesPage.xaml
Normal file
162
obj/x86/Debug/View/DiagnosesPage.xaml
Normal file
@ -0,0 +1,162 @@
|
||||
<Page x:ConnectionId='1'
|
||||
x:Class="HospitalServerManager.View.DiagnosesPage"
|
||||
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}" >
|
||||
<Page.Resources>
|
||||
<viewmodel:RosterViewModel x:ConnectionId='2' x:Name="RosterViewModel"/>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid Background="DimGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:ConnectionId='3' Text="Lekarze" HorizontalAlignment="Left" Margin="15, 5, 0, 0" FontSize="20"
|
||||
VerticalAlignment="Top" Name="pageTitle" Grid.ColumnSpan="2"/>
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button x:ConnectionId='18' Content="Nowy rekord" Margin="30, 0, 30, 0" Grid.Row="1" Width="150"/>
|
||||
<Button x:ConnectionId='19' Content="Usuń zaznaczone" Margin="30, 0, 30, 0" Grid.Row="1" Grid.Column="1" Width="150"/>
|
||||
<Button x:ConnectionId='20' Content="Edytuj rekord" Margin="30, 0, 30, 0" Grid.Row="1" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- </StackPanel> -->
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
|
||||
<TextBlock Text="Szukaj" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Szukaj wyrażenia:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBlock Text="Szukaj w:" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBox x:ConnectionId='14' Name="searchBox" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox x:ConnectionId='15' Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10"
|
||||
Name="lookInComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="10">
|
||||
<Button x:ConnectionId='16' Content="Przeszukaj bazę" HorizontalAlignment="Stretch" Margin="10" />
|
||||
<Button x:ConnectionId='17' Content="Resetuj" HorizontalAlignment="Stretch" Margin="10" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.RowSpan="3" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Text="Sortowanie i filtry" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Sortuj według:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox x:ConnectionId='11' Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="10" Name="sortComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<RadioButton x:ConnectionId='12' Content="Rosnąco" Margin="15, 0, 15, 0" IsChecked="True" Tag="0" Name="radioBtn1" />
|
||||
<RadioButton x:ConnectionId='13' Content="Malejąco" Margin="15, 0, 15, 0" Tag="1" Name="radionBtn2" />
|
||||
</StackPanel>
|
||||
<Button Content="Zaawansowane filtry" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
Margin="15, 0, 15, 0"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch">
|
||||
<ListView.HeaderTemplate >
|
||||
|
||||
<DataTemplate >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="ID diagnozy" Margin="8,0" Foreground="DarkRed" Grid.Column="0"/>
|
||||
<TextBlock Text="Nazwa diagnozy" Foreground="DarkRed" Grid.Column="1"/>
|
||||
<TextBlock Text="Dziedzina chirurgii" Foreground="DarkRed" Grid.Column="2"/>
|
||||
<TextBlock Text="Opis" Foreground="DarkRed" Grid.Column="3"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.HeaderTemplate>
|
||||
</ListView>
|
||||
<ListView x:ConnectionId='4' Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" Name="databaseView"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsVerticalRailEnabled="True"
|
||||
ScrollViewer.VerticalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate >
|
||||
|
||||
<Grid x:ConnectionId='5' Name="valueStoreGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:ConnectionId='6' Name="ItemId"
|
||||
|
||||
Grid.Column="0"/>
|
||||
<TextBlock x:ConnectionId='7' Name="ItemName"
|
||||
|
||||
Grid.Column="1" />
|
||||
<TextBlock x:ConnectionId='8'
|
||||
Grid.Column="2" />
|
||||
<TextBlock x:ConnectionId='9'
|
||||
Grid.Column="3"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
BIN
obj/x86/Debug/View/DiagnosesPage.xbf
Normal file
BIN
obj/x86/Debug/View/DiagnosesPage.xbf
Normal file
Binary file not shown.
Binary file not shown.
77
obj/x86/Debug/View/EditRecordDialog.g.cs
Normal file
77
obj/x86/Debug/View/EditRecordDialog.g.cs
Normal file
@ -0,0 +1,77 @@
|
||||
#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\EditRecordDialog.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "BC4868F661B10C70A944C16530717928"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace HospitalServerManager.View
|
||||
{
|
||||
partial class EditRecordDialog :
|
||||
global::Windows.UI.Xaml.Controls.ContentDialog,
|
||||
global::Windows.UI.Xaml.Markup.IComponentConnector,
|
||||
global::Windows.UI.Xaml.Markup.IComponentConnector2
|
||||
{
|
||||
/// <summary>
|
||||
/// Connect()
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetBindingConnector(int connectionId, object target)
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
51
obj/x86/Debug/View/EditRecordDialog.g.i.cs
Normal file
51
obj/x86/Debug/View/EditRecordDialog.g.i.cs
Normal file
@ -0,0 +1,51 @@
|
||||
#pragma checksum "C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\View\EditRecordDialog.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "BC4868F661B10C70A944C16530717928"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// InitializeComponent()
|
||||
/// </summary>
|
||||
[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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
40
obj/x86/Debug/View/EditRecordDialog.xaml
Normal file
40
obj/x86/Debug/View/EditRecordDialog.xaml
Normal file
@ -0,0 +1,40 @@
|
||||
<ContentDialog x:ConnectionId='1'
|
||||
x:Class="HospitalServerManager.View.EditRecordDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:HospitalServerManager.View"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Title="TITLE"
|
||||
PrimaryButtonText="Potwierź"
|
||||
|
||||
SecondaryButtonText="Anuluj" DefaultButton="Secondary" MinWidth="800">
|
||||
|
||||
|
||||
<Grid x:ConnectionId='2' Name="grid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<ComboBox x:ConnectionId='3' Name="fieldToEdit" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="20" Grid.Row="0" />
|
||||
<StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock x:ConnectionId='4' Name="additionalTypeInfo" Text="Typ: " HorizontalAlignment="Center" Foreground="#FFBD8989"
|
||||
Margin="0, 5, 0, 5" FontSize="12"/>
|
||||
<TextBlock x:ConnectionId='5' Text="Format: " Name="additionalFormatInfo" HorizontalAlignment="Center" Foreground="#FFBD8989"
|
||||
Margin="0, 5, 0, 5" FontSize="12"/>
|
||||
<TextBlock x:ConnectionId='6' Grid.Row="1" Text="DODATKOWE INFO" Grid.ColumnSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Foreground="Gray" Name="additionalFilterInfo"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- <TextBox Name="valueToUpdateTextBox" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Grid.Column="1" Margin="20" Grid.Row="2"/> -->
|
||||
|
||||
</Grid>
|
||||
</ContentDialog>
|
||||
|
BIN
obj/x86/Debug/View/EditRecordDialog.xbf
Normal file
BIN
obj/x86/Debug/View/EditRecordDialog.xbf
Normal file
Binary file not shown.
@ -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"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -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"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -15,9 +15,9 @@
|
||||
</Grid.RowDefinitions>
|
||||
<CommandBar x:ConnectionId='2' FlowDirection="LeftToRight" VerticalAlignment="Top" Style="{StaticResource CommandBarRevealStyle}"
|
||||
Name="navigationBar" Grid.Row="0">
|
||||
<AppBarButton x:ConnectionId='4' Icon="Street" Label="Sale" Tag="6" />
|
||||
<AppBarButton x:ConnectionId='5' Icon="Cut" Label="Operacje" Tag="5" />
|
||||
<AppBarButton x:ConnectionId='6' Icon="Paste" Label="Diagnozy" Tag="4" />
|
||||
<AppBarButton x:ConnectionId='4' Icon="Street" Label="Sale" Tag="RoomsPage" />
|
||||
<AppBarButton x:ConnectionId='5' Icon="Cut" Label="Operacje" Tag="SurgerionPage" />
|
||||
<AppBarButton x:ConnectionId='6' Icon="Paste" Label="Diagnozy" Tag="DiagnosesPage" />
|
||||
<AppBarButton x:ConnectionId='7' Icon="WebCam" Label="Pracownicy" Tag="DoctorsPage" />
|
||||
<AppBarButton x:ConnectionId='8' Icon="People" Label="Pacjenci" Tag="PatientsPage" />
|
||||
<AppBarButton x:ConnectionId='9' Icon="AddFriend" Label="Przyjęcia" Tag="AdmissionsPage" />
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Connect()
|
||||
/// </summary>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,157 @@
|
||||
<Page
|
||||
<Page x:ConnectionId='1'
|
||||
x:Class="HospitalServerManager.View.RoomsPage"
|
||||
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}" >
|
||||
|
||||
<Grid>
|
||||
<Page.Resources>
|
||||
<viewmodel:RosterViewModel x:ConnectionId='2' x:Name="RosterViewModel"/>
|
||||
</Page.Resources>
|
||||
|
||||
<Grid Background="DimGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:ConnectionId='3' Text="Lekarze" HorizontalAlignment="Left" Margin="15, 5, 0, 0" FontSize="20"
|
||||
VerticalAlignment="Top" Name="pageTitle" Grid.ColumnSpan="2"/>
|
||||
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button x:ConnectionId='17' Content="Nowy rekord" Margin="30, 0, 30, 0" Grid.Row="1" Width="150"/>
|
||||
<Button x:ConnectionId='18' Content="Usuń zaznaczone" Margin="30, 0, 30, 0" Grid.Row="1" Grid.Column="1" Width="150"/>
|
||||
<Button x:ConnectionId='19' Content="Edytuj rekord" Margin="30, 0, 30, 0" Grid.Row="1" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- </StackPanel> -->
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
|
||||
<TextBlock Text="Szukaj" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Szukaj wyrażenia:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBlock Text="Szukaj w:" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<TextBox x:ConnectionId='13' Name="searchBox" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox x:ConnectionId='14' Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10"
|
||||
Name="lookInComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Margin="10">
|
||||
<Button x:ConnectionId='15' Content="Przeszukaj bazę" HorizontalAlignment="Stretch" Margin="10" />
|
||||
<Button x:ConnectionId='16' Content="Resetuj" HorizontalAlignment="Stretch" Margin="10" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="LightBlue" BorderThickness="2" CornerRadius="10" Grid.RowSpan="3" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Text="Sortowanie i filtry" Margin="5, 0, 0, 0" />
|
||||
<TextBlock Text="Sortuj według:" Grid.Row="1" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center" Margin="10"/>
|
||||
<ComboBox x:ConnectionId='10' Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center"
|
||||
Margin="10" Name="sortComboBox" />
|
||||
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<RadioButton x:ConnectionId='11' Content="Rosnąco" Margin="15, 0, 15, 0" IsChecked="True" Tag="0" Name="radioBtn1" />
|
||||
<RadioButton x:ConnectionId='12' Content="Malejąco" Margin="15, 0, 15, 0" Tag="1" Name="radionBtn2" />
|
||||
</StackPanel>
|
||||
<Button Content="Zaawansowane filtry" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
Margin="15, 0, 15, 0"/>
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch">
|
||||
<ListView.HeaderTemplate >
|
||||
|
||||
<DataTemplate >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="Numer sali" Margin="8,0" Foreground="DarkRed" Grid.Column="0"/>
|
||||
<TextBlock Text="Ilość łóżek" Foreground="DarkRed" Grid.Column="1"/>
|
||||
<TextBlock Text="Intensywna opieka?" Foreground="DarkRed" Grid.Column="2"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.HeaderTemplate>
|
||||
</ListView>
|
||||
<ListView x:ConnectionId='4' Grid.Row="3" Grid.ColumnSpan="4" Margin="20, 5, 20, 5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
BorderBrush="AliceBlue" BorderThickness="2" Name="databaseView"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsVerticalRailEnabled="True"
|
||||
ScrollViewer.VerticalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.IsHorizontalRailEnabled="True">
|
||||
|
||||
<ListView.ItemTemplate>
|
||||
|
||||
<DataTemplate >
|
||||
|
||||
<Grid x:ConnectionId='5' Name="valueStoreGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:ConnectionId='6' Name="ItemId"
|
||||
|
||||
Grid.Column="0"/>
|
||||
<TextBlock x:ConnectionId='7'
|
||||
Grid.Column="1" />
|
||||
<TextBlock x:ConnectionId='8'
|
||||
Grid.Column="2"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><XamlCompilerSaveState><ReferenceAssemblyList /><XamlSourceFileDataList><XamlSourceFileData XamlFileName="App.xaml" ClassFullName="HospitalServerManager.App" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\App" XamlFileTimeAtLastCompileInTicks="636807519556072439" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\MainFrameView.xaml" ClassFullName="HospitalServerManager.View.MainFrameView" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\MainFrameView" XamlFileTimeAtLastCompileInTicks="636807519556461398" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\PatientsPage.xaml" ClassFullName="HospitalServerManager.View.PatientsPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\PatientsPage" XamlFileTimeAtLastCompileInTicks="636809413194965253" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\UserControls\ColumnListView.xaml" ClassFullName="HospitalServerManager.View.UserControls.ColumnListView" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\UserControls\ColumnListView" XamlFileTimeAtLastCompileInTicks="636807519556521243" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\DoctorsPage.xaml" ClassFullName="HospitalServerManager.View.DoctorsPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\DoctorsPage" XamlFileTimeAtLastCompileInTicks="636812527087135541" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\RoomsPage.xaml" ClassFullName="HospitalServerManager.View.RoomsPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\RoomsPage" XamlFileTimeAtLastCompileInTicks="636810885636308434" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\NewRecordDialog.xaml" ClassFullName="HospitalServerManager.View.NewRecordDialog" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\NewRecordDialog" XamlFileTimeAtLastCompileInTicks="636816189280521117" HasBoundEventAssignments="False" /></XamlSourceFileDataList></XamlCompilerSaveState>
|
||||
<?xml version="1.0" encoding="utf-8"?><XamlCompilerSaveState><ReferenceAssemblyList /><XamlSourceFileDataList><XamlSourceFileData XamlFileName="App.xaml" ClassFullName="HospitalServerManager.App" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\App" XamlFileTimeAtLastCompileInTicks="636807519556072439" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\MainFrameView.xaml" ClassFullName="HospitalServerManager.View.MainFrameView" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\MainFrameView" XamlFileTimeAtLastCompileInTicks="636823871119445938" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\PatientsPage.xaml" ClassFullName="HospitalServerManager.View.PatientsPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\PatientsPage" XamlFileTimeAtLastCompileInTicks="636809413194965253" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\UserControls\ColumnListView.xaml" ClassFullName="HospitalServerManager.View.UserControls.ColumnListView" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\UserControls\ColumnListView" XamlFileTimeAtLastCompileInTicks="636807519556521243" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\DoctorsPage.xaml" ClassFullName="HospitalServerManager.View.DoctorsPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\DoctorsPage" XamlFileTimeAtLastCompileInTicks="636812527087135541" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\RoomsPage.xaml" ClassFullName="HospitalServerManager.View.RoomsPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\RoomsPage" XamlFileTimeAtLastCompileInTicks="636823978065209074" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\NewRecordDialog.xaml" ClassFullName="HospitalServerManager.View.NewRecordDialog" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\NewRecordDialog" XamlFileTimeAtLastCompileInTicks="636816189280521117" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\EditRecordDialog.xaml" ClassFullName="HospitalServerManager.View.EditRecordDialog" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\EditRecordDialog" XamlFileTimeAtLastCompileInTicks="636823795499894654" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\AdmissionsPage.xaml" ClassFullName="HospitalServerManager.View.AdmissionsPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\AdmissionsPage" XamlFileTimeAtLastCompileInTicks="636823855352195513" HasBoundEventAssignments="False" /><XamlSourceFileData XamlFileName="View\DiagnosesPage.xaml" ClassFullName="HospitalServerManager.View.DiagnosesPage" GeneratedCodePathPrefix="C:\Users\Marcel\Documents\GitHub\HospitalServerManagerApp\HospitalServerManager\obj\x86\Debug\View\DiagnosesPage" XamlFileTimeAtLastCompileInTicks="636823872335617119" HasBoundEventAssignments="False" /></XamlSourceFileDataList></XamlCompilerSaveState>
|
@ -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<String>";
|
||||
@ -216,19 +216,22 @@ namespace HospitalServerManager.HospitalServerManager_XamlTypeInfo
|
||||
_typeNameTable[23] = "System.RuntimeTypeHandle";
|
||||
_typeNameTable[24] = "System.Reflection.ConstructorInfo";
|
||||
_typeNameTable[25] = "System.Collections.Generic.IEnumerable`1<System.Reflection.CustomAttributeData>";
|
||||
_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<String>";
|
||||
_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<String>";
|
||||
_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<global::System.String>);
|
||||
@ -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<global::System.Reflection.CustomAttributeData>);
|
||||
_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<global::System.String>);
|
||||
_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<global::System.String>);
|
||||
_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<global::System.String, global::System.Type>(); }
|
||||
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<global::System.String>(); }
|
||||
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<global::System.String>(); }
|
||||
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<global::System.Int32, global::System.String>)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<global::System.String>)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<String>
|
||||
case 36: // System.Collections.Generic.List`1<String>
|
||||
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<String>");
|
||||
xamlMember.Getter = get_69_NewRecordDialog_ValuesOfNewObject;
|
||||
xamlMember.Getter = get_71_NewRecordDialog_ValuesOfNewObject;
|
||||
xamlMember.SetIsReadOnly();
|
||||
break;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Binary file not shown.
Binary file not shown.
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user