Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -3806,6 +3806,10 @@ namespace BeWo.ServiceProxy
|
||||
"ult", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.CustomerAPPCodeDC> GetIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllUnreadChatMessages", ReplyAction="http://tempuri.org/IOperationsService/GetAllUnreadChatMessagesResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllUnreadChatMessagesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ChatMessageDC> GetAllUnreadChatMessages(System.Collections.Generic.List<long> personOid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateNewEmployeeAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/CreateNewEmployeeAPPCodeDCResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateNewEmployeeAPPCodeDCBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid);
|
||||
@@ -4470,6 +4474,11 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ChatMessageDC> GetAllUnreadChatMessages(System.Collections.Generic.List<long> personOid)
|
||||
{
|
||||
return base.Channel.GetAllUnreadChatMessages(personOid);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid)
|
||||
{
|
||||
return base.Channel.CreateNewEmployeeAPPCodeDC(employeeOid);
|
||||
|
||||
@@ -1112,12 +1112,6 @@ namespace BeWo.View
|
||||
|
||||
if (x.Contains(anzeige.SenderPersonOid.Value))
|
||||
{
|
||||
|
||||
/* if (sx == 0) // Muss noch getestet werden !!! bzw. muss noch angepast werden.
|
||||
{
|
||||
Chat.Items.Add(new KontakMessageBuilder("", "------------------------ Ungelesene Nachrichten -----------------------", "", 0));
|
||||
sx++;
|
||||
}*/
|
||||
if (anzeige.SenderPersonOid.Value == BeWoApp.LoggedOnUser.Employee.PersonOid)
|
||||
{
|
||||
int zahl = (int)x.IndexOf(anzeige.SenderPersonOid.Value);
|
||||
@@ -1127,15 +1121,25 @@ namespace BeWo.View
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sx == 0 && anzeige.IstGelesen != 1 )
|
||||
{
|
||||
Chat.Items.Add(new KontakMessageBuilder("","------------------------ Ungelesene Nachrichten -----------------------", "", 0,false));
|
||||
sx++;
|
||||
}
|
||||
|
||||
int zahl = (int)x.IndexOf(anzeige.SenderPersonOid.Value);
|
||||
Chat.Items.Add(new KontakMessageBuilder(person[zahl].FirstName, anzeige.ChatText,
|
||||
anzeige.Uhrzeit.ToString(), anzeige.SenderPersonOid.Value, false));
|
||||
}
|
||||
|
||||
if (anzeige.IstGelesen != 1)
|
||||
{
|
||||
ServiceFacade.DoCustomerServiceSync(s => s.UpdateIstGelesen(anzeige.EmpfängerPersonOid.Value,anzeige.SenderPersonOid.Value,true));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1286,6 +1290,69 @@ namespace BeWo.View
|
||||
ChatViewName.Height = 800;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void PruefeInDbObNeueNachrichtenVerfügbar()
|
||||
{
|
||||
try
|
||||
{
|
||||
List<long> listeOid = new List<long>();
|
||||
|
||||
|
||||
foreach (var count in ita)
|
||||
{
|
||||
if (!listeOid.Contains(count.EmpfaengerOid))
|
||||
{
|
||||
listeOid.Add(count.EmpfaengerOid);
|
||||
}
|
||||
}
|
||||
|
||||
var x = ServiceFacade.DoOperationsServiceSync(s => s.GetAllUnreadChatMessages(listeOid));
|
||||
|
||||
foreach (var ChatMessage in x)
|
||||
{
|
||||
if (ChatMessage.IstGelesen != 1)
|
||||
{
|
||||
foreach (var aktChatPersons in ita)
|
||||
{
|
||||
if (aktChatPersons.EmpfaengerOid == ChatMessage.SenderPersonOid && aktChatPersons.TypeChat != ChatType.Team)
|
||||
{
|
||||
int aktc;
|
||||
bool wasdrin = int.TryParse(aktChatPersons.Receivems, out aktc);
|
||||
|
||||
if (wasdrin)
|
||||
{
|
||||
aktc++;
|
||||
aktChatPersons.Receivems = aktc.ToString();
|
||||
|
||||
}
|
||||
else
|
||||
aktChatPersons.Receivems = 1.ToString();
|
||||
|
||||
}else if(aktChatPersons.EmpfaengerOid == ChatMessage.TeamOid)
|
||||
{
|
||||
int aktt;
|
||||
bool wasdrin = int.TryParse(aktChatPersons.Receivems, out aktt);
|
||||
|
||||
if (wasdrin)
|
||||
{
|
||||
aktt++;
|
||||
aktChatPersons.Receivems = aktt.ToString();
|
||||
|
||||
}
|
||||
else
|
||||
aktChatPersons.Receivems = 1.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Fehler :" + e.Message + "\n" + e.StackTrace, "Info", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class KontaktlistBuilder : INotifyPropertyChanged
|
||||
|
||||
@@ -1210,7 +1210,7 @@ namespace BeWo.View
|
||||
(ThreadStart) delegate
|
||||
{
|
||||
chatView.SetServerStats("Verbunden");
|
||||
|
||||
|
||||
chatView.StatusSetting.SelectedIndex = 0;
|
||||
chatView.ButtonAlarmLabel.Visibility = Visibility.Collapsed;
|
||||
});
|
||||
@@ -1236,6 +1236,16 @@ namespace BeWo.View
|
||||
chatView.StatusSetting.SelectedIndex = 1;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart)delegate
|
||||
{
|
||||
//Lade alle Ungelesenen Nachrichten
|
||||
chatView.PruefeInDbObNeueNachrichtenVerfügbar();
|
||||
});
|
||||
|
||||
chatView.Visibility = Visibility.Visible;
|
||||
} //#################### neu ########## <--
|
||||
else
|
||||
@@ -1558,7 +1568,7 @@ namespace BeWo.View
|
||||
|
||||
case DataIdentifier.Message:
|
||||
|
||||
UebergebeNachricht(paket.ChatMessage, person[0].FirstName + " " + person[0].LastName,
|
||||
UebergebeNachricht(paket.ChatMessage, person[0].FirstName,
|
||||
persoid, paket.DataIdentifier, paket.RecipientPersonOid);
|
||||
|
||||
break;
|
||||
|
||||
@@ -252,7 +252,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var dokutypes = ValueListService.GetAllValueListEntrysByType(ValueListEntryType.DocumentType);
|
||||
|
||||
return SerializeObject(dokutypes);
|
||||
var sortDoctypes = dokutypes.OrderBy(s => s.ValueListEntryOid).ToList();
|
||||
|
||||
return SerializeObject(sortDoctypes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -261,11 +261,13 @@ function checkDokuReiter() {
|
||||
document.getElementById('tddokureiter').style.display = 'none';
|
||||
document.getElementById('trnormalDoku').style.display = 'table-row';
|
||||
document.getElementById('notiz_textbox').style.width = '100%'; // 765
|
||||
document.getElementById('trnormalDokuLabel').textContent = s[0].TypeDescription;
|
||||
document.getElementById('trnormalDokuLabel').textContent = s[0].TypeDescription;
|
||||
|
||||
}
|
||||
if (x == 2) {
|
||||
document.getElementById('DokName1').textContent = s[0].TypeDescription;
|
||||
document.getElementById('DokName2').textContent = s[1].TypeDescription;
|
||||
|
||||
|
||||
document.getElementById('notiz_textbox1').style.width = '40%';//100%
|
||||
document.getElementById('notiz_textbox2').style.width = '40%';
|
||||
@@ -280,7 +282,8 @@ function checkDokuReiter() {
|
||||
document.getElementById('DokName1').textContent = s[0].TypeDescription;
|
||||
document.getElementById('DokName2').textContent = s[1].TypeDescription;
|
||||
document.getElementById('DokName3').textContent = s[2].TypeDescription;
|
||||
|
||||
|
||||
|
||||
document.getElementById('notiz_textbox1').style.width = '50%';
|
||||
document.getElementById('notiz_textbox2').style.width = '50%';
|
||||
document.getElementById('notiz_textbox3').style.width = '50%';
|
||||
@@ -298,8 +301,7 @@ function checkDokuReiter() {
|
||||
document.getElementById('DokName2').textContent = s[1].TypeDescription;
|
||||
document.getElementById('DokName3').textContent = s[2].TypeDescription;
|
||||
document.getElementById('DokName4').textContent = s[3].TypeDescription;
|
||||
|
||||
|
||||
|
||||
document.getElementById('notiz_textbox1').style.width = '76.9%';
|
||||
document.getElementById('notiz_textbox2').style.width = '76.9%';
|
||||
document.getElementById('notiz_textbox3').style.width = '76.9%';
|
||||
@@ -314,6 +316,9 @@ function checkDokuReiter() {
|
||||
document.getElementById('Dokumentation2').style = 'width: 130%';
|
||||
document.getElementById('Dokumentation3').style = 'width: 130%';
|
||||
document.getElementById('Dokumentation4').style = 'width: 130%';
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (x == 5) {
|
||||
document.getElementById('DokName1').textContent = s[0].TypeDescription;
|
||||
|
||||
@@ -201,6 +201,10 @@ function getDateObj(isFromStart) {
|
||||
function loadGoals(actionPath) {
|
||||
var selectedSC = $($("#scDropDown")).find(":selected").val();
|
||||
makeAjaxCall("GET", actionPath, loadGoalsOnSuccess, { pCostbearer2SupportConceptOid: selectedSC }, null);
|
||||
|
||||
if (document.getElementById('DokName1').style.display != 'none'){
|
||||
document.getElementById('DokName1').click();
|
||||
}
|
||||
}
|
||||
|
||||
function toggleMenu() {
|
||||
@@ -553,6 +557,7 @@ function validateServiceRecordBeforeSubmit() {
|
||||
var vonDatum = getDateTimeStringWithLeadingZeros(x);
|
||||
var bisDatum = getDateTimeStringWithLeadingZeros(y);
|
||||
|
||||
|
||||
var isValidRecord = true;
|
||||
|
||||
makeAjaxCall("POST", checkRightsUrl, function(json) {
|
||||
|
||||
@@ -164,8 +164,8 @@
|
||||
<tr>
|
||||
<td colspan="2" id="tddokureiter" >
|
||||
<div class="input-wrapper cell-content" style="height: 90px;"> <!--80px-->
|
||||
<article class="infobox ">
|
||||
<section id="Dokumentation1" style="display:none;">
|
||||
<article class="infobox">
|
||||
<section id="Dokumentation1" style="display:none;" >
|
||||
<h2><a href="#Dokumentation1" onfocus="focusOnTab(1);" id="DokName1">Dok1</a></h2>
|
||||
<textarea id="notiz_textbox1" name="Dokumentation" disabled></textarea>
|
||||
</section>
|
||||
|
||||
@@ -526,6 +526,10 @@ namespace BeWo.Service.ServiceContracts
|
||||
[OperationContract]
|
||||
IList<CustomerAPPCodeDC> GetIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ChatMessageDC> GetAllUnreadChatMessages(List<long> personOid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid);
|
||||
|
||||
@@ -3153,9 +3153,9 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
DAOFactory.GenericDAO.Insert(chatMessage);
|
||||
|
||||
var ChatMEssagesDC = MapperFactory.ChatMessagesDC_ChatMessages.MapToNewDC(chatMessage);
|
||||
var ChatMessagesDC = MapperFactory.ChatMessagesDC_ChatMessages.MapToNewDC(chatMessage);
|
||||
|
||||
return ChatMEssagesDC;
|
||||
return ChatMessagesDC;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -3216,6 +3216,22 @@ namespace BeWo.Service.ServiceImplementations
|
||||
return Code;
|
||||
}
|
||||
|
||||
public List<ChatMessageDC> GetAllUnreadChatMessages(List<long>personOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var chatMessage = DAOFactory.SearchDAO.FindAllUnreadChatMessages(personOid);
|
||||
|
||||
var ChatMessagesDC = MapperFactory.ChatMessagesDC_ChatMessages.MapToNewDCs(chatMessage);
|
||||
|
||||
return ChatMessagesDC;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public long InsertNewServiceRecordAndSignature(ServiceRecordDC sr, SignatureDC sig) {
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user