public async Task <IEnumerable <AsycudaDocumentSetEntryDataDetail> > GetAsycudaDocumentSetEntryDataDetailByEntryDataDetailsId(string EntryDataDetailsId, List <string> includesLst = null) { if (EntryDataDetailsId == "0") { return(null); } try { using (AsycudaDocumentSetEntryDataDetailClient t = new AsycudaDocumentSetEntryDataDetailClient()) { var res = await t.GetAsycudaDocumentSetEntryDataDetailByEntryDataDetailsId(EntryDataDetailsId, includesLst).ConfigureAwait(continueOnCapturedContext: false); if (res != null) { return(res.Select(x => new AsycudaDocumentSetEntryDataDetail(x)).AsEnumerable()); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task <IEnumerable <AsycudaDocumentSetEntryDataDetail> > AsycudaDocumentSetEntryDataDetails(List <string> includesLst = null) { if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime) { return(new List <AsycudaDocumentSetEntryDataDetail>().AsEnumerable()); } try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { var res = await t.GetAsycudaDocumentSetEntryDataDetails(includesLst).ConfigureAwait(continueOnCapturedContext: false); if (res != null) { return(res.Select(x => new AsycudaDocumentSetEntryDataDetail(x)).AsEnumerable()); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task <AsycudaDocumentSetEntryDataDetail> GetAsycudaDocumentSetEntryDataDetail(string id, List <string> includesLst = null) { try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { var res = await t.GetAsycudaDocumentSetEntryDataDetailByKey(id, includesLst).ConfigureAwait(continueOnCapturedContext: false); if (res != null) { return(new AsycudaDocumentSetEntryDataDetail(res) { // EntryDataDetailsEx = (res.EntryDataDetailsEx != null?new EntryDataDetailsEx(res.EntryDataDetailsEx): null) }); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task <decimal> SumNav(string whereExp, Dictionary <string, string> navExp, string sumExp) { try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { return(await t.SumNav(whereExp, navExp, sumExp).ConfigureAwait(false)); } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public decimal SumField(string whereExp, string sumExp) { try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { return(t.SumField(whereExp, sumExp)); } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task <bool> DeleteAsycudaDocumentSetEntryDataDetail(string id) { try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { return(await t.DeleteAsycudaDocumentSetEntryDataDetail(id).ConfigureAwait(continueOnCapturedContext: false)); } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
//Virtural List Implementation public async Task <Tuple <IEnumerable <AsycudaDocumentSetEntryDataDetail>, int> > LoadRange(int startIndex, int count, string exp, Dictionary <string, string> navExp, IEnumerable <string> includeLst = null) { var overallCount = 0; if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime || exp == null || exp == "None") { return(new Tuple <IEnumerable <AsycudaDocumentSetEntryDataDetail>, int>(new List <AsycudaDocumentSetEntryDataDetail>().AsEnumerable(), overallCount)); } try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { IEnumerable <DTO.AsycudaDocumentSetEntryDataDetail> res = null; res = await t.LoadRangeNav(startIndex, count, exp, navExp, includeLst).ConfigureAwait(continueOnCapturedContext: false); overallCount = await t.CountNav(exp, navExp).ConfigureAwait(continueOnCapturedContext: false); if (res != null) { return(new Tuple <IEnumerable <AsycudaDocumentSetEntryDataDetail>, int>(res.Select(x => new AsycudaDocumentSetEntryDataDetail(x)).AsEnumerable(), overallCount)); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task <IEnumerable <AsycudaDocumentSetEntryDataDetail> > GetAsycudaDocumentSetEntryDataDetailsByExpressionNav(string exp, Dictionary <string, string> navExp, List <string> includesLst = null) { if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime || exp == null || exp == "None") { return(new List <AsycudaDocumentSetEntryDataDetail>().AsEnumerable()); } try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { IEnumerable <DTO.AsycudaDocumentSetEntryDataDetail> res = null; if (exp == "All" && navExp.Count == 0) { res = await t.GetAsycudaDocumentSetEntryDataDetails(includesLst).ConfigureAwait(continueOnCapturedContext: false); } else { res = await t.GetAsycudaDocumentSetEntryDataDetailsByExpressionNav(exp, navExp, includesLst).ConfigureAwait(continueOnCapturedContext: false); } if (res != null) { return(res.Select(x => new AsycudaDocumentSetEntryDataDetail(x)).AsEnumerable()); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task <AsycudaDocumentSetEntryDataDetail> UpdateAsycudaDocumentSetEntryDataDetail(AsycudaDocumentSetEntryDataDetail entity) { if (entity == null) { return(entity); } var entitychanges = entity.ChangeTracker.GetChanges().FirstOrDefault(); if (entitychanges != null) { try { using (var t = new AsycudaDocumentSetEntryDataDetailClient()) { var updatedEntity = await t.UpdateAsycudaDocumentSetEntryDataDetail(entitychanges).ConfigureAwait(false); entity.EntityId = updatedEntity.EntityId; entity.DTO.AcceptChanges(); //var = entity.; //entity.ChangeTracker.MergeChanges(,updatedEntity); //entity. = ; return(entity); } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } } else { return(entity); } }