Das Übertragen eines Kalendertermins in die Zeiterfassung geht wieder und wird korrekt im Kalender als übertragen angezeigt.
This commit is contained in:
@@ -1004,7 +1004,7 @@ namespace BeWo.ViewModel
|
||||
? new AddressVM(dc2)
|
||||
: new AddressVM();
|
||||
|
||||
GroßkundenanschriftDatenannahmestelle = pDataContract.GroßkundenanschriftDatenannahmestelle is AddressDC dc3
|
||||
GroßkundenanschriftDatenannahmestelle = pDataContract.GrosskundenanschriftDatenannahmestelle is AddressDC dc3
|
||||
? new AddressVM(dc3)
|
||||
: new AddressVM();
|
||||
|
||||
@@ -1109,9 +1109,9 @@ namespace BeWo.ViewModel
|
||||
pDataContract.PostfachanschriftDatenannahmestelle = null;
|
||||
|
||||
if (GroßkundenanschriftDatenannahmestelle is object)
|
||||
pDataContract.GroßkundenanschriftDatenannahmestelle = GroßkundenanschriftDatenannahmestelle.CommitToDataContract();
|
||||
pDataContract.GrosskundenanschriftDatenannahmestelle = GroßkundenanschriftDatenannahmestelle.CommitToDataContract();
|
||||
else
|
||||
pDataContract.GroßkundenanschriftDatenannahmestelle = null;
|
||||
pDataContract.GrosskundenanschriftDatenannahmestelle = null;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
protected ActionResult Logout()
|
||||
{
|
||||
#if DEBUG
|
||||
Debug.WriteLine($"+++>Logout aufrufende Methode: {(new StackTrace()).GetFrame(1).GetMethod().Name}");
|
||||
Debug.WriteLine($"+++>Logout aufrufende Methode: {new StackTrace().GetFrame(1).GetMethod().Name}");
|
||||
#endif
|
||||
|
||||
MobileSessionFacade.LogUserOut();
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
@@ -21,23 +17,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if (_Model == null)
|
||||
if(_Model is null)
|
||||
{
|
||||
_Model = new DebuggingToolsModel();
|
||||
InitModel(_Model);
|
||||
}
|
||||
|
||||
//if (((DebuggingToolsModel)Session[ModelSessionConstants.DebuggingToolsModelKey])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new DebuggingToolsModel();
|
||||
// InitModel(_Model);
|
||||
// Session[ModelSessionConstants.DebuggingToolsModelKey] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (DebuggingToolsModel) Session[ModelSessionConstants.DebuggingToolsModelKey];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
@@ -50,14 +35,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
Model.MandatorSettings = new MandatorSettings(MobileSessionFacade.Mandator.Settings);
|
||||
|
||||
return View(Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult LoadSettingsPartial()
|
||||
{
|
||||
Model.MandatorSettings = new MandatorSettings(MobileSessionFacade.Mandator.Settings);
|
||||
|
||||
return PartialView("DevToolsSettingsPartial", Model);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Windows.Forms;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
|
||||
using static BeWoPlanerMobil.Util.MobileUtils;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -24,15 +15,23 @@ using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
using DevExpress.XtraScheduler;
|
||||
using DevExpress.XtraScheduler.Compatibility;
|
||||
using DevExpress.XtraScheduler.Native;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Windows.Forms;
|
||||
using static BeWoPlanerMobil.Util.MobileUtils;
|
||||
using static BS.Shared.ServiceRecordValidationResult;
|
||||
using FormCollection = System.Web.Mvc.FormCollection;
|
||||
using GoalRating = BeWoPlanerMobil.Util.GoalRating;
|
||||
using Image = System.Drawing.Image;
|
||||
using ServiceRecordDC = BS.Shared.DataContracts.ServiceRecordDC;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
/*
|
||||
* ToDo: Bug, wenn man auf "bearbeiten" bei einem Eintrag klickt, wird die Leistung nicht geladen
|
||||
@@ -54,24 +53,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if (_Model == null)
|
||||
if(_Model is null)
|
||||
{
|
||||
_Model = new MainModel();
|
||||
InitModel(_Model);
|
||||
InitViewModel();
|
||||
}
|
||||
|
||||
//if(((MainModel) Session[ModelSessionConstants.MainModelKey])?.LoggedInEmployee is null)
|
||||
//{
|
||||
// _Model = new MainModel();
|
||||
// InitModel(_Model);
|
||||
// Session[ModelSessionConstants.MainModelKey] = _Model;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// _Model = (MainModel) Session[ModelSessionConstants.MainModelKey];
|
||||
//}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
@@ -141,7 +129,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.Employees = Model.Employees.OrderBy(e => e.LastName).ThenBy(e => e.FirstName).ToList();
|
||||
|
||||
|
||||
Model.SelectedConceptCostBearerRelations = new List<SupportConceptCostBearerRelDC>();
|
||||
Model.MultiBookingSelectedConceptCostBearerRelations = new List<SupportConceptCostBearerRelDC>();
|
||||
|
||||
@@ -152,14 +139,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
private void SetSelectedObjects()
|
||||
{
|
||||
if (Model.SelectedEmployeeOid.HasValue)
|
||||
{
|
||||
Model.SelectedEmployee = Model.AllEmployees.First(f => f.EmployeeOid.Equals(Model.SelectedEmployeeOid.Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.SelectedEmployee = LoggedInUser.Employee;
|
||||
}
|
||||
Model.SelectedEmployee = Model.SelectedEmployeeOid.HasValue ?
|
||||
Model.AllEmployees.First(f => f.EmployeeOid.Equals(Model.SelectedEmployeeOid.Value)) :
|
||||
LoggedInUser.Employee;
|
||||
|
||||
var isInList = Model.SelectedCostBearerSupportConceptOid.HasValue && Model.SupportConceptListObjects.Exists(s => s.CostBearer2SupportConceptOid == Model.SelectedCostBearerSupportConceptOid);
|
||||
|
||||
@@ -379,7 +361,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if (!Model.SessionInitialized)
|
||||
if(!Model.SessionInitialized)
|
||||
{
|
||||
Model.SessionInitialized = true;
|
||||
var mokSessionTimeout = UserSettingsUtils.GetSettingValueAsInteger(Model.Mandator.Settings, SettingsKeys.MoKSessionTimeout, 20);
|
||||
@@ -407,10 +389,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
TempData[TempDataConstants.ShowPwChPopupKey] = tempDataValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -420,9 +399,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return View(Model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[Authorize]
|
||||
private void UpdateSettings(string key, string value)
|
||||
{
|
||||
@@ -1063,9 +1039,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
// Falls ein Termin in die Zeiterfassung übernommen werden soll
|
||||
SchedulerAppointmentDC appointmentPrototype = null;
|
||||
|
||||
if(TempData[TempDataConstants.AppointmentOidKey] != null && Int64.TryParse(TempData[TempDataConstants.AppointmentOidKey].ToString(), out var appOid) && Model.LoggedInEmployee.EmployeeOid.HasValue)
|
||||
if(Model.TransferringAppointmentOid.HasValue && Model.LoggedInEmployee.EmployeeOid.HasValue)
|
||||
{
|
||||
var app = DAOFactory.GenericDAO.LoadByID<SchedulerAppointment>(appOid);
|
||||
var app = DAOFactory.GenericDAO.LoadByID<SchedulerAppointment>(Model.TransferringAppointmentOid.Value);
|
||||
appointmentPrototype = MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDC(app);
|
||||
}
|
||||
|
||||
@@ -1299,7 +1275,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
TempData[TempDataConstants.ShowSignatureSuggestionPopup] = true;
|
||||
}
|
||||
|
||||
if(!(appointmentPrototype is null))
|
||||
if(appointmentPrototype is object)
|
||||
{
|
||||
var isRecurring = !(appointmentPrototype.RecurrenceInfo is null);
|
||||
|
||||
@@ -1329,7 +1305,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
if(!(appointmentPrototype is null))
|
||||
if(appointmentPrototype is object)
|
||||
{
|
||||
var serviceRecord = OperationsService.GetServiceRecordById(Model.LastCreatedServiceRecordOid);
|
||||
|
||||
@@ -1438,9 +1414,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var serviceRecords = groupDC.ServiceRecordList;
|
||||
|
||||
if (TempData[TempDataConstants.AppointmentOidKey] != null && Int64.TryParse(TempData[TempDataConstants.AppointmentOidKey].ToString(), out var appOid) && Model.LoggedInEmployee.EmployeeOid.HasValue)
|
||||
if(Model.TransferringAppointmentOid.HasValue && Model.LoggedInEmployee.EmployeeOid.HasValue)
|
||||
{
|
||||
var app = DAOFactory.GenericDAO.LoadByID<SchedulerAppointment>(appOid);
|
||||
var app = DAOFactory.GenericDAO.LoadByID<SchedulerAppointment>(Model.TransferringAppointmentOid.Value);
|
||||
var appointment = MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDC(app);
|
||||
|
||||
appointment.ServiceRecordList.AddRange(serviceRecords);
|
||||
@@ -3112,8 +3088,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
TempData[TempDataConstants.IsInTransferModeKey] = null;
|
||||
TempData[TempDataConstants.AppointmentOidKey] = null;
|
||||
Model.TransferringAppointmentOid = null;
|
||||
Model.IsInTransferMode = false;
|
||||
|
||||
var bookingMode = "true,false" == pFormCollection[FormCollectionConstants.IsInGroupBookingModeKey] ? BookingMode.GroupBookingMode : BookingMode.SingleBookingMode;
|
||||
|
||||
@@ -3289,6 +3265,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
ResetModel();
|
||||
|
||||
Model.TransferringAppointmentOid = null;
|
||||
Model.IsInTransferMode = false;
|
||||
|
||||
return RedirectToActionPermanent("Main");
|
||||
}
|
||||
|
||||
@@ -3302,6 +3281,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
Model.TransferringAppointmentOid = null;
|
||||
Model.IsInTransferMode = false;
|
||||
|
||||
ResetModel();
|
||||
|
||||
return RedirectToScheduler();
|
||||
@@ -3315,8 +3297,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return;
|
||||
}
|
||||
|
||||
TempData[TempDataConstants.AppointmentOidKey] = null;
|
||||
TempData[TempDataConstants.IsInTransferModeKey] = null;
|
||||
TempData[TempDataConstants.AfterValidationStateKey] = null;
|
||||
|
||||
Model.NewServiceRecord = new ServiceRecordDC();
|
||||
@@ -3840,16 +3820,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.NewServiceRecord.InsUser = MobileSessionFacade.EmployeeFullname;
|
||||
Model.NewServiceRecord.IsCreatedInMobileClient = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(Model.SetStartTimeToEndTimeAfterSave)
|
||||
{
|
||||
var previousStartDate = Model.IsInEditingMode ? Model.SelectedServiceRecord?.Start : Model.NewServiceRecord?.Start;
|
||||
var previousEndDate = Model.IsInEditingMode ? Model.SelectedServiceRecord?.End : Model.NewServiceRecord?.End;
|
||||
|
||||
if(!(previousStartDate is null) && !(previousEndDate is null))
|
||||
if(previousStartDate.HasValue && previousEndDate.HasValue)
|
||||
{
|
||||
var duration = (previousEndDate - previousStartDate).Value.TotalMinutes;
|
||||
|
||||
@@ -3889,7 +3865,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
/// <summary>
|
||||
/// Bereitet die Übernahme eines Termins in die Zeiterfassung vor. Wird im SchedulerController aufgerufen.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns>Main.cshtml</returns>
|
||||
[Authorize]
|
||||
public ActionResult PrepareServiceRecordInsert()
|
||||
{
|
||||
@@ -3899,11 +3875,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if (TempData[TempDataConstants.AppointmentOidKey] != null && Int64.TryParse(TempData[TempDataConstants.AppointmentOidKey].ToString(), out var appOid) && Model.LoggedInEmployee.EmployeeOid.HasValue)
|
||||
{
|
||||
TempData[TempDataConstants.IsInTransferModeKey] = true;
|
||||
Model.TransferringAppointmentOid = TempData[TempDataConstants.AppointmentOidKey] as long?;
|
||||
|
||||
var app = DAOFactory.GenericDAO.LoadByID<SchedulerAppointment>(appOid);
|
||||
if(Model.TransferringAppointmentOid.HasValue && Model.LoggedInEmployee.EmployeeOid.HasValue)
|
||||
{
|
||||
var app = DAOFactory.GenericDAO.LoadByID<SchedulerAppointment>(Model.TransferringAppointmentOid.Value);
|
||||
|
||||
var appointment = MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDC(app);
|
||||
|
||||
@@ -4043,7 +4019,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.SelectedServiceRecordOid = Model.SelectedServiceRecord?.ServiceRecordOid;
|
||||
|
||||
TempData[TempDataConstants.AppointmentOidKey] = appointment?.SchedulerAppointmentOid;
|
||||
Model.TransferringAppointmentOid = appointment.SchedulerAppointmentOid;
|
||||
Model.IsInTransferMode = true;
|
||||
}
|
||||
|
||||
return View("Main", Model);
|
||||
@@ -4297,8 +4274,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
TempData[TempDataConstants.IsInTransferModeKey] = null;
|
||||
TempData[TempDataConstants.AppointmentOidKey] = null;
|
||||
Model.IsInTransferMode = false;
|
||||
Model.TransferringAppointmentOid = null;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -1437,6 +1437,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
TempData[TempDataConstants.AppointmentOidKey] = appointmentListItem.SchedulerAppointment?.SchedulerAppointmentOid;
|
||||
|
||||
|
||||
return RedirectToActionPermanent("PrepareServiceRecordInsert", "Main");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
@@ -39,14 +40,43 @@ namespace BeWoPlanerMobil.Models
|
||||
get => typeof(MandatorSettings).GetPropertyValue(propertyName);
|
||||
set
|
||||
{
|
||||
var property = typeof(MandatorSettings).GetProperty(propertyName);
|
||||
var propertyInfo = typeof(MandatorSettings).GetProperty(propertyName);
|
||||
|
||||
if(property is null)
|
||||
if(propertyInfo is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
typeof(MandatorSettings).SetPropertyValue(propertyName, value);
|
||||
if(value is null)
|
||||
{
|
||||
typeof(MandatorSettings).SetPropertyValue(propertyName, value);
|
||||
return;
|
||||
}
|
||||
|
||||
var propertyType = propertyInfo.PropertyType;
|
||||
|
||||
var valueToReplace = value;
|
||||
|
||||
if(propertyType == typeof(bool))
|
||||
{
|
||||
typeof(MandatorSettings).SetPropertyValue(propertyName, value.ToString() == "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
valueToReplace = Convert.ChangeType(value, propertyType);
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
valueToReplace = value;
|
||||
}
|
||||
finally
|
||||
{
|
||||
typeof(MandatorSettings).SetPropertyValue(propertyName, valueToReplace);
|
||||
var setValue = typeof(MandatorSettings).GetPropertyValue(propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,14 +91,20 @@ namespace BeWoPlanerMobil.Models
|
||||
public bool IsEndDateVisible { get; set; }
|
||||
public bool IsServiceRecordNoticeMandatory { get; set; }
|
||||
public bool IsZeiterfassDateNormal { get; set; }
|
||||
|
||||
public bool SetStartTimeToEndTimeAfterSave { get; set; }
|
||||
public bool ShowAdditionalService { get; set; }
|
||||
public bool ShowAnnualReport { get; set; }
|
||||
public bool ShowArbeitszeiten { get; set; }
|
||||
public bool ShowBetrag { get; set; }
|
||||
public bool ShowChat { get; set; }
|
||||
public bool ShowCustomerDistanceFields { get; set; }
|
||||
private bool _ShowCustomerDistanceFields;
|
||||
|
||||
public bool ShowCustomerDistanceFields
|
||||
{
|
||||
get => _ShowCustomerDistanceFields;
|
||||
|
||||
set => _ShowCustomerDistanceFields = value;
|
||||
}
|
||||
public bool ShowDatevFields { get; set; }
|
||||
public bool ShowDienstplanung { get; set; }
|
||||
public bool ShowDistanceFields { get; set; }
|
||||
@@ -99,7 +135,6 @@ namespace BeWoPlanerMobil.Models
|
||||
public bool PrinterSettingsUseMargins { get; set; }
|
||||
public bool PrinterSettingsUsePaperKind { get; set; }
|
||||
public bool ShowResources { get; set; }
|
||||
|
||||
public int MaxDaysEditServiceRecordsAllowed { get; set; }
|
||||
public int ZeiterfassungsSchwellwert { get; set; }
|
||||
public int AnzTageZeiterfassErfolgt { get; set; }
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -29,23 +28,48 @@ namespace BeWoPlanerMobil.Models
|
||||
ErrorWert = 1;
|
||||
}
|
||||
|
||||
public MainSessionModel MainSessionModel
|
||||
public MainSessionModel MainSessionModel => SessionModel as MainSessionModel;
|
||||
|
||||
public bool SessionInitialized
|
||||
{
|
||||
get
|
||||
{
|
||||
return SessionModel as MainSessionModel;
|
||||
}
|
||||
get => MainSessionModel.SessionInitialized;
|
||||
set => MainSessionModel.SessionInitialized = value;
|
||||
}
|
||||
|
||||
public bool SessionInitialized { get { return MainSessionModel.SessionInitialized; } set { MainSessionModel.SessionInitialized = value; } }
|
||||
|
||||
[Display(Name = "Nur meine Klienten anzeigen")]
|
||||
public bool ShowOnlyOwnSupportConcepts { get { return MainSessionModel.ShowOnlyOwnSupportConcepts; } set { MainSessionModel.ShowOnlyOwnSupportConcepts = value; } }
|
||||
public bool ShowOnlyOwnSupportConcepts
|
||||
{
|
||||
get => MainSessionModel.ShowOnlyOwnSupportConcepts;
|
||||
set => MainSessionModel.ShowOnlyOwnSupportConcepts = value;
|
||||
}
|
||||
|
||||
[Display(Name = "Nur Klienten meiner Teams anzeigen")]
|
||||
public bool ShowOnlyMyTeamsSupportConcepts { get { return MainSessionModel.ShowOnlyMyTeamsSupportConcepts; } set { MainSessionModel.ShowOnlyMyTeamsSupportConcepts = value; } }
|
||||
public bool ShowOnlyMyTeamsSupportConcepts
|
||||
{
|
||||
get => MainSessionModel.ShowOnlyMyTeamsSupportConcepts;
|
||||
set => MainSessionModel.ShowOnlyMyTeamsSupportConcepts = value;
|
||||
}
|
||||
|
||||
public CustomerFilterEnum SelectedSupportConceptFilter { get { return MainSessionModel.SelectedSupportConceptFilter; } set { MainSessionModel.SelectedSupportConceptFilter = value; } }
|
||||
public CustomerFilterEnum SelectedSupportConceptFilter
|
||||
{
|
||||
get => MainSessionModel.SelectedSupportConceptFilter;
|
||||
set => MainSessionModel.SelectedSupportConceptFilter = value;
|
||||
}
|
||||
|
||||
public long? TransferringAppointmentOid
|
||||
{
|
||||
get => MainSessionModel.TransferringAppointmentOid;
|
||||
|
||||
set
|
||||
{
|
||||
var callingMethodName = new StackTrace().GetFrame(1).GetMethod().Name;
|
||||
|
||||
Debug.WriteLine($">>>>{callingMethodName} ändert TransferringAppointment von {MainSessionModel.TransferringAppointmentOid} zu {value}");
|
||||
|
||||
MainSessionModel.TransferringAppointmentOid = value;
|
||||
}
|
||||
}
|
||||
public bool IsInTransferMode { get; set; }
|
||||
|
||||
public List<SelectListItem> SupportConceptFilter
|
||||
{
|
||||
@@ -113,14 +137,28 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
|
||||
[Display(Name = "Abgelaufene Hilfepläne anzeigen")]
|
||||
public bool ShowExpiredSupportConcepts { get { return MainSessionModel.ShowExpiredSupportConcepts; } set { MainSessionModel.ShowExpiredSupportConcepts = value; } }
|
||||
public bool ShowExpiredSupportConcepts
|
||||
{
|
||||
get => MainSessionModel.ShowExpiredSupportConcepts;
|
||||
set => MainSessionModel.ShowExpiredSupportConcepts = value;
|
||||
}
|
||||
|
||||
[Display(Name = "Hilfeplan")]
|
||||
public long? SelectedCostBearerSupportConceptOid { get { return MainSessionModel.SelectedCostBearerSupportConceptOid; } set { MainSessionModel.SelectedCostBearerSupportConceptOid = value; } }
|
||||
public long? SelectedCostBearerSupportConceptOid
|
||||
{
|
||||
get => MainSessionModel.SelectedCostBearerSupportConceptOid;
|
||||
set => MainSessionModel.SelectedCostBearerSupportConceptOid = value;
|
||||
}
|
||||
|
||||
public long? SelectedServiceCategoryOid { get { return MainSessionModel.SelectedServiceCategoryOid; } set { MainSessionModel.SelectedServiceCategoryOid = value; } }
|
||||
public long? SelectedServiceCategoryOid
|
||||
{
|
||||
get => MainSessionModel.SelectedServiceCategoryOid;
|
||||
set => MainSessionModel.SelectedServiceCategoryOid = value;
|
||||
}
|
||||
|
||||
public long? SelectedServiceDescriptionOid { get { return MainSessionModel.SelectedServiceDescriptionOid; } set { MainSessionModel.SelectedServiceDescriptionOid = value; } }
|
||||
public long? SelectedServiceDescriptionOid { get => MainSessionModel.SelectedServiceDescriptionOid;
|
||||
set => MainSessionModel.SelectedServiceDescriptionOid = value;
|
||||
}
|
||||
|
||||
|
||||
public bool IsAllowedToDeleteServiceRecord(ServiceRecordDC serviceRecord)
|
||||
@@ -195,11 +233,19 @@ namespace BeWoPlanerMobil.Models
|
||||
return allowed;
|
||||
}
|
||||
|
||||
public long? SelectedServiceRecordOid { get { return MainSessionModel.SelectedServiceRecordOid; } set { MainSessionModel.SelectedServiceRecordOid = value; } }
|
||||
public long? SelectedServiceRecordOid
|
||||
{
|
||||
get => MainSessionModel.SelectedServiceRecordOid;
|
||||
set => MainSessionModel.SelectedServiceRecordOid = value;
|
||||
}
|
||||
|
||||
public ServiceRecordDC SelectedServiceRecord { get; set; }
|
||||
|
||||
public long? SelectedSupportConceptOid { get { return MainSessionModel.SelectedSupportConceptOid; } set { MainSessionModel.SelectedSupportConceptOid = value; } }
|
||||
public long? SelectedSupportConceptOid
|
||||
{
|
||||
get => MainSessionModel.SelectedSupportConceptOid;
|
||||
set => MainSessionModel.SelectedSupportConceptOid = value;
|
||||
}
|
||||
|
||||
public SupportConceptDC SelectedSupportConcept { get; set; }
|
||||
|
||||
@@ -209,7 +255,9 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public bool ShowSignature { get; set; }
|
||||
|
||||
public long LastCreatedServiceRecordOid { get { return MainSessionModel.LastCreatedServiceRecordOid; } set { MainSessionModel.LastCreatedServiceRecordOid = value; } }
|
||||
public long LastCreatedServiceRecordOid { get => MainSessionModel.LastCreatedServiceRecordOid;
|
||||
set => MainSessionModel.LastCreatedServiceRecordOid = value;
|
||||
}
|
||||
|
||||
public List<SupportConceptDC> SupportConcepts { get; set; }
|
||||
|
||||
@@ -223,17 +271,22 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_ServiceRecords == null)
|
||||
if(_ServiceRecords is null)
|
||||
{
|
||||
return _ServiceRecords = new List<ServiceRecordDC>();
|
||||
}
|
||||
|
||||
return _ServiceRecords.OrderByDescending(sr => sr.Start).ToList();
|
||||
}
|
||||
|
||||
set => _ServiceRecords = value;
|
||||
}
|
||||
|
||||
public List<long> SelectedGoalOids { get { return MainSessionModel.SelectedGoalOids; } set { MainSessionModel.SelectedGoalOids = value; } }
|
||||
public List<long> SelectedGoalOids
|
||||
{
|
||||
get => MainSessionModel.SelectedGoalOids;
|
||||
set => MainSessionModel.SelectedGoalOids = value;
|
||||
}
|
||||
|
||||
private List<ValueListEntryDC> _SelectedGoals;
|
||||
|
||||
@@ -282,7 +335,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public List<long> SelectedConceptCostBearerRelationOids { get { return MainSessionModel.SelectedConceptCostBearerRelations; } set { MainSessionModel.SelectedConceptCostBearerRelations = value; } }
|
||||
|
||||
public List<SupportConceptCostBearerRelDC> SelectedConceptCostBearerRelations { get; set; }
|
||||
public List<SupportConceptCostBearerRelDC> SelectedConceptCostBearerRelations { get; set; } = new List<SupportConceptCostBearerRelDC>();
|
||||
|
||||
public GroupBookingSelectionObject GroupBookingSelectionObject => new GroupBookingSelectionObject(SelectedConceptCostBearerRelations, GroupBookingSelectedGroupOfPeopleOids);
|
||||
|
||||
@@ -321,7 +374,11 @@ namespace BeWoPlanerMobil.Models
|
||||
public List<CompactEmployeeDC> AllEmployees { get; set; }
|
||||
|
||||
[Display(Name = "Mitarbeiter")]
|
||||
public long? SelectedEmployeeOid { get { return MainSessionModel.SelectedEmployeeOid; } set { MainSessionModel.SelectedEmployeeOid = value; } }
|
||||
public long? SelectedEmployeeOid
|
||||
{
|
||||
get => MainSessionModel.SelectedEmployeeOid;
|
||||
set => MainSessionModel.SelectedEmployeeOid = value;
|
||||
}
|
||||
|
||||
public CompactEmployeeDC SelectedEmployee { get; set; }
|
||||
|
||||
@@ -352,7 +409,7 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
var end = relation.ApprovedEndDate ?? relation.RequestedEndDate;
|
||||
|
||||
if(maxDate == null || end != null && end.Value > maxDate.Value)
|
||||
if(maxDate is null || end != null && end.Value > maxDate.Value)
|
||||
{
|
||||
maxDate = end;
|
||||
}
|
||||
@@ -703,7 +760,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public List<long> MultiBookingSelectedGroupOfPeopleOids { get { return MainSessionModel.MultiBookingSelectedGroupOfPeopleOids; } set { MainSessionModel.MultiBookingSelectedGroupOfPeopleOids = value; } }
|
||||
|
||||
public List<SupportConceptCostBearerRelDC> MultiBookingSelectedConceptCostBearerRelations { get; set; }
|
||||
public List<SupportConceptCostBearerRelDC> MultiBookingSelectedConceptCostBearerRelations { get; set; } = new List<SupportConceptCostBearerRelDC>();
|
||||
|
||||
public GroupBookingSelectionObject MultiBookingSelectionObject => new GroupBookingSelectionObject(MultiBookingSelectedConceptCostBearerRelations, MultiBookingSelectedGroupOfPeopleOids);
|
||||
|
||||
@@ -720,7 +777,7 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostbearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select(
|
||||
allCostbearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate is null || w.EndDate.Value >= DateTime.Now).Select(
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}",
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Controllers;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
@@ -46,6 +37,7 @@ namespace BeWoPlanerMobil.Models
|
||||
public int CurrentPage { get; internal set; }
|
||||
public List<long> SelectedGoalOids { get; internal set; }
|
||||
public long LastCreatedServiceRecordOid { get; internal set; }
|
||||
public long? TransferringAppointmentOid { get; internal set; }
|
||||
|
||||
public void ResetValues()
|
||||
{
|
||||
@@ -83,6 +75,8 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
CurrentPage = 0;
|
||||
LastCreatedServiceRecordOid = 0;
|
||||
|
||||
TransferringAppointmentOid = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,8 +71,6 @@
|
||||
public class TempDataConstants
|
||||
{
|
||||
public static string ShowSignatureSuggestionPopup => "ShowSignatureSuggestionPopup";
|
||||
public static string AppointmentOidKey => "AppointmentOid";
|
||||
public static string IsInTransferModeKey => "IsInTransferMode";
|
||||
public static string AfterValidationStateKey => "AfterValidation";
|
||||
public static string PwChErrKey => "passwd-change-error";
|
||||
public static string ShowPwChPopupKey => "show_pw_change_popup";
|
||||
@@ -85,5 +83,6 @@
|
||||
public static string ErrorAlertPopupMessage => "ErrorAlertPopupMessage";
|
||||
public static string InfoMessageKey => "InfoMessage";
|
||||
public static string ReportMessageKey => "ReportMessage";
|
||||
public static string AppointmentOidKey => "AppointmentOid";
|
||||
}
|
||||
}
|
||||
@@ -338,7 +338,7 @@
|
||||
@* dient nur als Abstandshalter *@
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
@if(TempData[TempDataConstants.IsInTransferModeKey] is bool isInTransferMode && isInTransferMode)
|
||||
@if(Model.IsInTransferMode)
|
||||
{
|
||||
using(Html.BeginForm("ResetTransferMode", "Main", FormMethod.Post))
|
||||
{
|
||||
|
||||
@@ -114,114 +114,121 @@
|
||||
window.saveCollapsibleState($(this).attr("id"), "@Url.Action("SaveCollapsibleStatus")");
|
||||
});
|
||||
|
||||
@if(TempData[TempDataConstants.PwChErrKey] is string passwordChangeError)
|
||||
{
|
||||
<text>
|
||||
$("#password-change-error-alert").html("@passwordChangeError");
|
||||
$("#password-change-error-alert").removeClass("d-none");
|
||||
$("#password-changing-popup").modal("show");
|
||||
@if(TempData[TempDataConstants.PwChErrKey] is string passwordChangeError)
|
||||
{
|
||||
<text>
|
||||
$("#password-change-error-alert").html("@passwordChangeError");
|
||||
$("#password-change-error-alert").removeClass("d-none");
|
||||
$("#password-changing-popup").modal("show");
|
||||
|
||||
$(".pw-prepend").ready(calcChPwPrepend);
|
||||
</text>
|
||||
}
|
||||
$(".pw-prepend").ready(calcChPwPrepend);
|
||||
</text>
|
||||
}
|
||||
|
||||
const supportConceptOid = parseInt($("#CostBearer2SupportConceptOid").val());
|
||||
const supportConceptOid = parseInt($("#CostBearer2SupportConceptOid").val());
|
||||
|
||||
const isSupportConceptSelected = supportConceptOid !== -1;
|
||||
const isSupportConceptSelected = supportConceptOid !== -1;
|
||||
|
||||
$("#single-booking-employee-container").find(".dropdown-toggle").prop("disabled", (isSupportConceptSelected ? false : true));
|
||||
$("#single-booking-employee-container").find(".dropdown-toggle").prop("disabled", (isSupportConceptSelected ? false : true));
|
||||
|
||||
$(
|
||||
$(
|
||||
"#employeesDropDown, " +
|
||||
"#category-select, " +
|
||||
"#leistung-select, " +
|
||||
"#sb-start-date-input, #sb-end-date-input, #sb-start-time-input, #sb-end-time-input, " +
|
||||
"#sb-duration-input, #sb-hours-minutes-dropdown-btn, #sb-distance-input, " +
|
||||
"#sb-start-date-input, #sb-end-date-input, #sb-start-time-input, #sb-end-time-input, " +
|
||||
"#sb-duration-input, #sb-hours-minutes-dropdown-btn, #sb-distance-input, " +
|
||||
|
||||
"#gb-start-date-input, #gb-end-date-input, #gb-start-time-input, #gb-end-time-input, " +
|
||||
"#gb-duration-input, #gb-hours-minutes-dropdown-btn, #gb-distance-input, " +
|
||||
"#gb-start-date-input, #gb-end-date-input, #gb-start-time-input, #gb-end-time-input, " +
|
||||
"#gb-duration-input, #gb-hours-minutes-dropdown-btn, #gb-distance-input, " +
|
||||
|
||||
"#mb-start-date-input, #mb-end-date-input, #mb-start-time-input, #mb-end-time-input, " +
|
||||
"#mb-duration-input, #mb-hours-minutes-dropdown-btn, #mb-distance-input," +
|
||||
".sb-restore-btn, .gb-restore-btn, .mb-restore-btn" +
|
||||
"#mb-start-date-input, #mb-end-date-input, #mb-start-time-input, #mb-end-time-input, " +
|
||||
"#mb-duration-input, #mb-hours-minutes-dropdown-btn, #mb-distance-input," +
|
||||
".sb-restore-btn, .gb-restore-btn, .mb-restore-btn" +
|
||||
|
||||
"#textbausteine-button, " +
|
||||
"#goals-button, " +
|
||||
"textarea, " +
|
||||
"#reset-button, " +
|
||||
"#create-button, " +
|
||||
"#statistics-button, " +
|
||||
"#timeFrameSelect, " +
|
||||
"#marker-cb, " +
|
||||
"#betrag"
|
||||
"#textbausteine-button, " +
|
||||
"#goals-button, " +
|
||||
"textarea, " +
|
||||
"#reset-button, " +
|
||||
"#create-button, " +
|
||||
"#statistics-button, " +
|
||||
"#timeFrameSelect, " +
|
||||
"#marker-cb, " +
|
||||
"#betrag"
|
||||
).prop("disabled", (isSupportConceptSelected ? false : true));
|
||||
|
||||
if("@Model.IsInGroupBookingMode".toLowerCase() === "true") {
|
||||
const hasSelectedSupportConcepts = "@Model.SelectedConceptCostBearerRelations.Any()".toLowerCase() === "true";
|
||||
if("@Model.IsInGroupBookingMode".toLowerCase() === "true") {
|
||||
const hasSelectedSupportConcepts = "@Model.SelectedConceptCostBearerRelations.Any()".toLowerCase() === "true";
|
||||
|
||||
$(
|
||||
"#employees-button, " +
|
||||
"#category-select, " +
|
||||
"#leistung-select, " +
|
||||
"#gb-start-date-input, " +
|
||||
"#gb-end-date-input, " +
|
||||
"#gb-start-time-input, " +
|
||||
"#gb-end-time-input, " +
|
||||
"#gb-duration-input, " +
|
||||
"#distance, " +
|
||||
"textarea, " +
|
||||
"#reset-button, " +
|
||||
"#create-button, " +
|
||||
"#textbausteine-button, " +
|
||||
"#gb-hours-minutes-dropdown-btn, " +
|
||||
"#marker-cb, " +
|
||||
"#betrag," +
|
||||
".gb-restore-btn"
|
||||
).prop("disabled", (hasSelectedSupportConcepts ? false : true));
|
||||
}
|
||||
$(
|
||||
"#employees-button, " +
|
||||
"#category-select, " +
|
||||
"#leistung-select, " +
|
||||
"#gb-start-date-input, " +
|
||||
"#gb-end-date-input, " +
|
||||
"#gb-start-time-input, " +
|
||||
"#gb-end-time-input, " +
|
||||
"#gb-duration-input, " +
|
||||
"#distance, " +
|
||||
"textarea, " +
|
||||
"#reset-button, " +
|
||||
"#create-button, " +
|
||||
"#textbausteine-button, " +
|
||||
"#gb-hours-minutes-dropdown-btn, " +
|
||||
"#marker-cb, " +
|
||||
"#betrag," +
|
||||
".gb-restore-btn"
|
||||
).prop("disabled", (hasSelectedSupportConcepts ? false : true));
|
||||
}
|
||||
|
||||
$("#fehlerdetail-textarea").prop("disabled", false);
|
||||
$("#fehlerdetail-textarea").prop("disabled", false);
|
||||
|
||||
if ("@Model.IsInMultiBookingMode".toLowerCase() === "true") {
|
||||
const isMultiBookingFormDisabled = "@Model.MultiBookingSelectedConceptCostBearerRelations.Any()".toLowerCase() === "false";
|
||||
if ("@Model.IsInMultiBookingMode".toLowerCase() === "true") {
|
||||
const isMultiBookingFormDisabled = "@Model.MultiBookingSelectedConceptCostBearerRelations.Any()".toLowerCase() === "false";
|
||||
|
||||
window.toggleMultiBookingForm(isMultiBookingFormDisabled);
|
||||
}
|
||||
window.toggleMultiBookingForm(isMultiBookingFormDisabled);
|
||||
}
|
||||
|
||||
initializeSignatureImagePopup();
|
||||
initializeSignatureImagePopup();
|
||||
|
||||
@if(TempData[TempDataConstants.ShowPwChPopupKey] is string passwordWarning && !string.IsNullOrEmpty(passwordWarning))
|
||||
{
|
||||
<text>
|
||||
showMessagePopupWithHtml("Achtung!", "@Html.Raw(passwordWarning)");
|
||||
</text>
|
||||
}
|
||||
@if(TempData[TempDataConstants.ShowPwChPopupKey] is string passwordWarning && !string.IsNullOrEmpty(passwordWarning))
|
||||
{
|
||||
<text>
|
||||
showMessagePopupWithHtml("Achtung!", "@Html.Raw(passwordWarning)");
|
||||
</text>
|
||||
}
|
||||
|
||||
setInputFilter();
|
||||
setInputFilter();
|
||||
|
||||
@if(Model.IsInGroupBookingMode)
|
||||
{
|
||||
<text>
|
||||
$("#create-button").prop("disabled", @Model.GroupBookingSelectedEmployees.Count === 0 ? true : false);
|
||||
</text>
|
||||
}
|
||||
@if(Model.IsInGroupBookingMode)
|
||||
{
|
||||
<text>
|
||||
$("#create-button").prop("disabled", @Model.GroupBookingSelectedEmployees.Count === 0 ? true : false);
|
||||
</text>
|
||||
}
|
||||
|
||||
@{
|
||||
var shouldShowSignaturePopup = TempData[TempDataConstants.ShowSignatureSuggestionPopup]?.GetType() == typeof(bool) && (bool) TempData[TempDataConstants.ShowSignatureSuggestionPopup];
|
||||
@{
|
||||
var shouldShowSignaturePopup = TempData[TempDataConstants.ShowSignatureSuggestionPopup]?.GetType() == typeof(bool) && (bool) TempData[TempDataConstants.ShowSignatureSuggestionPopup];
|
||||
|
||||
if(Model.LastCreatedServiceRecordOid > 0)
|
||||
{
|
||||
if(shouldShowSignaturePopup && Model.ShowSignature)
|
||||
{
|
||||
<text>
|
||||
showMessagePopupWithCallback("Erfolgreich gespeichert", "Möchten Sie den Eintrag unterschreiben lassen?", function() {
|
||||
initializeSignature(@Model.LastCreatedServiceRecordOid);
|
||||
}, false);
|
||||
</text>
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(error) {
|
||||
if(Model.LastCreatedServiceRecordOid > 0)
|
||||
{
|
||||
if(shouldShowSignaturePopup && Model.ShowSignature)
|
||||
{
|
||||
<text>
|
||||
showMessagePopupWithCallback("Erfolgreich gespeichert", "Möchten Sie den Eintrag unterschreiben lassen?", function() {
|
||||
initializeSignature(@Model.LastCreatedServiceRecordOid);
|
||||
}, false);
|
||||
</text>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@if(TempData[TempDataConstants.AppointmentOidKey] is long && false == Model.IsInGroupBookingMode && false == Model.IsInMultiBookingMode)
|
||||
{
|
||||
<text>
|
||||
loadServiceRecords();
|
||||
</text>
|
||||
}
|
||||
} catch(error) {
|
||||
window.showErrorPopup(error);
|
||||
}
|
||||
});
|
||||
@@ -715,7 +722,7 @@
|
||||
<button type="submit" class="btn btn-primary" onclick="showSpinner()">Schließen</button>
|
||||
}
|
||||
}
|
||||
else if (TempData[TempDataConstants.IsInTransferModeKey] is bool isInTransferMode && isInTransferMode)
|
||||
else if(Model.IsInTransferMode)
|
||||
{
|
||||
using(Html.BeginForm("ResetTransferMode", "Main", FormMethod.Post))
|
||||
{
|
||||
|
||||
@@ -579,7 +579,8 @@
|
||||
</li>
|
||||
}
|
||||
@{
|
||||
var nextButtonsClass = Model.CurrentPage == Model.ServiceRecordPageCount || Model.ServiceRecordPageCount < 6 ? "disabled" : string.Empty;
|
||||
//var nextButtonsClass = Model.CurrentPage == Model.ServiceRecordPageCount || Model.ServiceRecordPageCount < 6 ? "disabled" : string.Empty;
|
||||
var nextButtonsClass = Model.CurrentPage == Model.ServiceRecordPageCount ? "disabled" : string.Empty;
|
||||
}
|
||||
<li class="page-item @nextButtonsClass">
|
||||
<button type="button" class="page-link" tabindex="-1" onclick="goToServiceRecordListPage(@nextPage)">
|
||||
|
||||
@@ -519,7 +519,7 @@
|
||||
<button type="submit" class="btn btn-primary float-right" onclick="showSpinner()">Abbrechen</button>
|
||||
}
|
||||
}
|
||||
else if(TempData[TempDataConstants.IsInTransferModeKey] is bool isInTransferMode && isInTransferMode)
|
||||
else if(Model.IsInTransferMode)
|
||||
{
|
||||
using(Html.BeginForm("ResetTransferMode", "Main", FormMethod.Post))
|
||||
{
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Data.Entities.Light;
|
||||
using BS.Shared.Core;
|
||||
using NHibernate.Criterion;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeWo.Data.Access
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using BS.Shared;
|
||||
using System.Diagnostics;
|
||||
using BS.Shared.Interface;
|
||||
|
||||
namespace BeWo.Data.Entities.Light
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace BeWo.Data.Entities
|
||||
public virtual bool GkvAusblenden { get; set; }
|
||||
public virtual Address HausanschriftDatenannahmestelle { get; set; }
|
||||
public virtual Address PostfachanschriftDatenannahmestelle { get; set; }
|
||||
public virtual Address GroßkundenanschriftDatenannahmestelle { get; set; }
|
||||
public virtual Address GrosskundenanschriftDatenannahmestelle { get; set; }
|
||||
|
||||
//public virtual Address GetDatenannahmestelleAddress()
|
||||
//{
|
||||
@@ -57,7 +57,7 @@ namespace BeWo.Data.Entities
|
||||
// {
|
||||
// HausanschriftDatenannahmestelle,
|
||||
// PostfachanschriftDatenannahmestelle,
|
||||
// GroßkundenanschriftDatenannahmestelle
|
||||
// GrosskundenanschriftDatenannahmestelle
|
||||
// };
|
||||
|
||||
// foreach (var address in addresses)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<many-to-one name="InvoiceAddress" column="InvoiceAddressOid" class="BeWo.Data.Entities.Address, BeWo.Data" cascade="all" fetch="join"/>
|
||||
<many-to-one name="HausanschriftDatenannahmestelle" column="HausanschriftAddressOid" class="BeWo.Data.Entities.Address, BeWo.Data" cascade="all" fetch="join"/>
|
||||
<many-to-one name="PostfachanschriftDatenannahmestelle" column="PostfachanschriftAddressOid" class="BeWo.Data.Entities.Address, BeWo.Data" cascade="all" fetch="join"/>
|
||||
<many-to-one name="GroßkundenanschriftDatenannahmestelle" column="GroßkundenanschriftAddressOid" class="BeWo.Data.Entities.Address, BeWo.Data" cascade="all" fetch="join"/>
|
||||
<many-to-one name="GrosskundenanschriftDatenannahmestelle" column="GrosskundenanschriftAddressOid" class="BeWo.Data.Entities.Address, BeWo.Data" cascade="all" fetch="join"/>
|
||||
<many-to-one name="BankAccount" column="BankAccountOid" class="BeWo.Data.Entities.BankAccount, BeWo.Data" cascade="all" />
|
||||
<many-to-one name="CostBearer" column="CostBearerOid" cascade="all-delete-orphan" class="BeWo.Data.Entities.CostBearer, BeWo.Data" fetch="join"/>
|
||||
<many-to-one name="Function" column="FunctionValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" fetch="join"/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
ALTER TABLE `organisation`
|
||||
ADD COLUMN `HausanschriftAddressOid` BIGINT NULL DEFAULT NULL AFTER `CostBearerOid`,
|
||||
ADD COLUMN `PostfachanschriftAddressOid` BIGINT NULL DEFAULT NULL AFTER `HausanschriftAddressOid`,
|
||||
ADD COLUMN `GroßkundenanschriftAddressOid` BIGINT NULL DEFAULT NULL AFTER `PostfachanschriftAddressOid`,
|
||||
ADD COLUMN `GrosskundenanschriftAddressOid` BIGINT NULL DEFAULT NULL AFTER `PostfachanschriftAddressOid`,
|
||||
ADD INDEX `FK_ORGANISA_HAUSADD_idx` (`HausanschriftAddressOid` ASC) VISIBLE,
|
||||
ADD INDEX `FK_ORGANISA_POSTADD_idx` (`PostfachanschriftAddressOid` ASC) VISIBLE,
|
||||
ADD INDEX `FK_ORGANISA_GROSADD_idx` (`GroßkundenanschriftAddressOid` ASC) VISIBLE;
|
||||
ADD INDEX `FK_ORGANISA_GROSADD_idx` (`GrosskundenanschriftAddressOid` ASC) VISIBLE;
|
||||
;
|
||||
ALTER TABLE `organisation`
|
||||
ADD CONSTRAINT `FK_ORGANISA_HAUSADD`
|
||||
@@ -18,7 +18,7 @@ ADD CONSTRAINT `FK_ORGANISA_POSTADD`
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `FK_ORGANISA_GROSADD`
|
||||
FOREIGN KEY (`GroßkundenanschriftAddressOid`)
|
||||
FOREIGN KEY (`GrosskundenanschriftAddressOid`)
|
||||
REFERENCES `address` (`Oid`)
|
||||
ON DELETE CASCADE
|
||||
ON UPDATE CASCADE;
|
||||
@@ -92,7 +92,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
pDataContract.HausanschriftDatenannahmestelle = MapperFactory.Address.CreateOrMapToNewDC(pEntity.HausanschriftDatenannahmestelle);
|
||||
pDataContract.PostfachanschriftDatenannahmestelle = MapperFactory.Address.CreateOrMapToNewDC(pEntity.PostfachanschriftDatenannahmestelle);
|
||||
pDataContract.GroßkundenanschriftDatenannahmestelle = MapperFactory.Address.CreateOrMapToNewDC(pEntity.GroßkundenanschriftDatenannahmestelle);
|
||||
pDataContract.GrosskundenanschriftDatenannahmestelle = MapperFactory.Address.CreateOrMapToNewDC(pEntity.GrosskundenanschriftDatenannahmestelle);
|
||||
|
||||
pDataContract.ContactInformations = MapperFactory.ContactDC_Contact.MapToNewDCs(pEntity.Contacts);
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
pEntity.HausanschriftDatenannahmestelle = MapperFactory.Address.MergeOrCreateWithEntity(pDataContract.HausanschriftDatenannahmestelle, pEntity.HausanschriftDatenannahmestelle);
|
||||
pEntity.PostfachanschriftDatenannahmestelle = MapperFactory.Address.MergeOrCreateWithEntity(pDataContract.PostfachanschriftDatenannahmestelle, pEntity.PostfachanschriftDatenannahmestelle);
|
||||
pEntity.GroßkundenanschriftDatenannahmestelle = MapperFactory.Address.MergeOrCreateWithEntity(pDataContract.GroßkundenanschriftDatenannahmestelle, pEntity.GroßkundenanschriftDatenannahmestelle);
|
||||
pEntity.GrosskundenanschriftDatenannahmestelle = MapperFactory.Address.MergeOrCreateWithEntity(pDataContract.GrosskundenanschriftDatenannahmestelle, pEntity.GrosskundenanschriftDatenannahmestelle);
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
|
||||
@@ -4,17 +4,16 @@
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is Organisation2PersonDC)
|
||||
if (obj is Organisation2PersonDC y)
|
||||
{
|
||||
var y = (Organisation2PersonDC)obj;
|
||||
if (this.Organisation2PersonOid == null && y.Organisation2PersonOid == null)
|
||||
if(Organisation2PersonOid is null && y.Organisation2PersonOid is null)
|
||||
{
|
||||
return this.GetHashCode() == y.GetHashCode();
|
||||
}
|
||||
|
||||
if (this.Organisation2PersonOid != null && y.Organisation2PersonOid != null)
|
||||
if(Organisation2PersonOid != null && y.Organisation2PersonOid != null)
|
||||
{
|
||||
return this.Organisation2PersonOid == y.Organisation2PersonOid;
|
||||
return Organisation2PersonOid == y.Organisation2PersonOid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +22,7 @@
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.Organisation2PersonOid.HasValue ? this.GetType().Name.GetHashCode() ^ this.Organisation2PersonOid.GetHashCode() : base.GetHashCode();
|
||||
return Organisation2PersonOid.HasValue ? GetType().Name.GetHashCode() ^ Organisation2PersonOid.GetHashCode() : base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,17 @@
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is OrganisationPersonRelationDC)
|
||||
if(obj is OrganisationPersonRelationDC y)
|
||||
{
|
||||
var y = (OrganisationPersonRelationDC)obj;
|
||||
if (Organisation2PersonOid == null && y.Organisation2PersonOid == null)
|
||||
if(Organisation2PersonOid is null && y.Organisation2PersonOid is null)
|
||||
{
|
||||
return GetHashCode() == y.GetHashCode();
|
||||
}
|
||||
|
||||
if (Organisation2PersonOid != null && y.Organisation2PersonOid != null)
|
||||
if(Organisation2PersonOid != null && y.Organisation2PersonOid != null)
|
||||
{
|
||||
return Organisation2PersonOid == y.Organisation2PersonOid;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -19,9 +22,9 @@
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.Organisation2PersonOid.HasValue
|
||||
? GetType().Name.GetHashCode() ^ this.Organisation2PersonOid.GetHashCode()
|
||||
: base.GetHashCode();
|
||||
return Organisation2PersonOid.HasValue
|
||||
? GetType().Name.GetHashCode() ^ Organisation2PersonOid.GetHashCode()
|
||||
: base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace BS.Shared.DataContracts.Light
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Runtime.Serialization;
|
||||
@@ -53,7 +51,7 @@ namespace BS.Shared.DataContracts
|
||||
[DataMember] public List<FeiertagDC> Feiertage { get; set; }
|
||||
[DataMember] public ValueListEntryDC Function { get; set; }
|
||||
[DataMember] public bool GkvAusblenden { get; set; }
|
||||
[DataMember] public AddressDC GroßkundenanschriftDatenannahmestelle { get; set; }
|
||||
[DataMember] public AddressDC GrosskundenanschriftDatenannahmestelle { get; set; }
|
||||
[DataMember] public AddressDC HausanschriftDatenannahmestelle { get; set; }
|
||||
[DataMember] public string IBAN { get; set; }
|
||||
[DataMember] public string IKDatenannahmestelle { get; set; }
|
||||
@@ -101,7 +99,7 @@ namespace BS.Shared.DataContracts
|
||||
var lst = new List<AddressDC>() {
|
||||
HausanschriftDatenannahmestelle,
|
||||
PostfachanschriftDatenannahmestelle,
|
||||
GroßkundenanschriftDatenannahmestelle};
|
||||
GrosskundenanschriftDatenannahmestelle};
|
||||
|
||||
foreach (var add in lst)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user